Skip to content

Commit f0d339d

Browse files
rchatresuryasaimadhu
authored andcommitted
x86/resctrl: Remove unnecessary RMID checks
The cache and memory bandwidth monitoring properties are read using CPUID on every CPU. After the information is read from the system a sanity check is run to (1) ensure that the RMID data is initialized for the boot CPU in case the information was not available on the boot CPU and (2) the boot CPU's RMID is set to the minimum of RMID obtained from all CPUs. Every known platform that supports resctrl has the same maximum RMID on all CPUs. Both sanity checks found in x86_init_cache_qos() can thus safely be removed. Suggested-by: Borislav Petkov <[email protected]> Signed-off-by: Reinette Chatre <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/c9a3b60d34091840c8b0bd1c6fab15e5ba92cb17.1588715690.git.reinette.chatre@intel.com
1 parent 0118ad8 commit f0d339d

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

arch/x86/kernel/cpu/common.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,20 +1354,6 @@ static void generic_identify(struct cpuinfo_x86 *c)
13541354
#endif
13551355
}
13561356

1357-
static void x86_init_cache_qos(struct cpuinfo_x86 *c)
1358-
{
1359-
/*
1360-
* The heavy lifting of max_rmid and cache_occ_scale are handled
1361-
* in get_cpu_cap(). Here we just set the max_rmid for the boot_cpu
1362-
* in case CQM bits really aren't there in this CPU.
1363-
*/
1364-
if (c != &boot_cpu_data) {
1365-
boot_cpu_data.x86_cache_max_rmid =
1366-
min(boot_cpu_data.x86_cache_max_rmid,
1367-
c->x86_cache_max_rmid);
1368-
}
1369-
}
1370-
13711357
/*
13721358
* Validate that ACPI/mptables have the same information about the
13731359
* effective APIC id and update the package map.
@@ -1480,7 +1466,6 @@ static void identify_cpu(struct cpuinfo_x86 *c)
14801466
#endif
14811467

14821468
x86_init_rdrand(c);
1483-
x86_init_cache_qos(c);
14841469
setup_pku(c);
14851470

14861471
/*

0 commit comments

Comments
 (0)