* [PATCH] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on systems with AMD preferred cores
@ 2024-12-02 4:37 Mario Limonciello
2024-12-02 8:54 ` kernel test robot
2024-12-02 15:34 ` kernel test robot
0 siblings, 2 replies; 4+ messages in thread
From: Mario Limonciello @ 2024-12-02 4:37 UTC (permalink / raw)
To: Borislav Petkov
Cc: Thomas Gleixner, Ingo Molnar, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Mario Limonciello, open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
Shyam Sundar S K, Perry Yuan
From: Mario Limonciello <mario.limonciello@amd.com>
For the scheduler to use and prefer AMD preferred core rankings set
SD_ASYM_PACKING for x86_die_flags().
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
arch/x86/kernel/smpboot.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index b5a8f0891135b..419e7ae096395 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -62,6 +62,8 @@
#include <linux/mc146818rtc.h>
#include <linux/acpi.h>
+#include <acpi/cppc_acpi.h>
+
#include <asm/acpi.h>
#include <asm/cacheinfo.h>
#include <asm/desc.h>
@@ -497,10 +499,19 @@ static int x86_cluster_flags(void)
static int x86_die_flags(void)
{
- if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU) ||
- cpu_feature_enabled(X86_FEATURE_AMD_HETEROGENEOUS_CORES))
+ if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU))
return x86_sched_itmt_flags();
+ switch (boot_cpu_data.x86_vendor) {
+ case X86_VENDOR_AMD:
+ case X86_VENDOR_HYGON:
+ bool prefcore = false;
+
+ amd_detect_prefcore(&prefcore);
+ if (prefcore || cpu_feature_enabled(X86_FEATURE_AMD_HETEROGENEOUS_CORES))
+ return x86_sched_itmt_flags();
+ };
+
return 0;
}
base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on systems with AMD preferred cores
2024-12-02 4:37 [PATCH] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on systems with AMD preferred cores Mario Limonciello
@ 2024-12-02 8:54 ` kernel test robot
2024-12-02 15:34 ` kernel test robot
1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2024-12-02 8:54 UTC (permalink / raw)
To: Mario Limonciello, Borislav Petkov
Cc: llvm, oe-kbuild-all, Thomas Gleixner, Ingo Molnar, Dave Hansen,
(maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)),
H . Peter Anvin, Mario Limonciello,
(open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)),
Shyam Sundar S K, Perry Yuan
Hi Mario,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 40384c840ea1944d7c5a392e8975ed088ecf0b37]
url: https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/x86-cpu-Enable-SD_ASYM_PACKING-for-PKG-domain-on-systems-with-AMD-preferred-cores/20241202-124012
base: 40384c840ea1944d7c5a392e8975ed088ecf0b37
patch link: https://lore.kernel.org/r/20241202043724.3929062-1-superm1%40kernel.org
patch subject: [PATCH] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on systems with AMD preferred cores
config: i386-buildonly-randconfig-005-20241202 (https://download.01.org/0day-ci/archive/20241202/202412021625.Q3QQhOi8-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241202/202412021625.Q3QQhOi8-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412021625.Q3QQhOi8-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/x86/kernel/smpboot.c:50:
In file included from include/linux/memblock.h:12:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> arch/x86/kernel/smpboot.c:508:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
508 | bool prefcore = false;
| ^
2 warnings generated.
vim +508 arch/x86/kernel/smpboot.c
499
500 static int x86_die_flags(void)
501 {
502 if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU))
503 return x86_sched_itmt_flags();
504
505 switch (boot_cpu_data.x86_vendor) {
506 case X86_VENDOR_AMD:
507 case X86_VENDOR_HYGON:
> 508 bool prefcore = false;
509
510 amd_detect_prefcore(&prefcore);
511 if (prefcore || cpu_feature_enabled(X86_FEATURE_AMD_HETEROGENEOUS_CORES))
512 return x86_sched_itmt_flags();
513 };
514
515 return 0;
516 }
517
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on systems with AMD preferred cores
2024-12-02 4:37 [PATCH] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on systems with AMD preferred cores Mario Limonciello
2024-12-02 8:54 ` kernel test robot
@ 2024-12-02 15:34 ` kernel test robot
1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2024-12-02 15:34 UTC (permalink / raw)
To: Mario Limonciello, Borislav Petkov
Cc: oe-kbuild-all, Thomas Gleixner, Ingo Molnar, Dave Hansen,
(maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)),
H . Peter Anvin, Mario Limonciello,
(open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)),
Shyam Sundar S K, Perry Yuan
Hi Mario,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 40384c840ea1944d7c5a392e8975ed088ecf0b37]
url: https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/x86-cpu-Enable-SD_ASYM_PACKING-for-PKG-domain-on-systems-with-AMD-preferred-cores/20241202-124012
base: 40384c840ea1944d7c5a392e8975ed088ecf0b37
patch link: https://lore.kernel.org/r/20241202043724.3929062-1-superm1%40kernel.org
patch subject: [PATCH] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on systems with AMD preferred cores
config: x86_64-randconfig-r061-20241202 (https://download.01.org/0day-ci/archive/20241202/202412022352.jwqoAZXs-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412022352.jwqoAZXs-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> arch/x86/kernel/smpboot.c:513:2-3: Unneeded semicolon
vim +513 arch/x86/kernel/smpboot.c
499
500 static int x86_die_flags(void)
501 {
502 if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU))
503 return x86_sched_itmt_flags();
504
505 switch (boot_cpu_data.x86_vendor) {
506 case X86_VENDOR_AMD:
507 case X86_VENDOR_HYGON:
508 bool prefcore = false;
509
510 amd_detect_prefcore(&prefcore);
511 if (prefcore || cpu_feature_enabled(X86_FEATURE_AMD_HETEROGENEOUS_CORES))
512 return x86_sched_itmt_flags();
> 513 };
514
515 return 0;
516 }
517
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on systems with AMD preferred cores
@ 2024-12-02 17:48 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2024-12-02 17:48 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20241202043724.3929062-1-superm1@kernel.org>
References: <20241202043724.3929062-1-superm1@kernel.org>
TO: Mario Limonciello <superm1@kernel.org>
TO: Borislav Petkov <bp@alien8.de>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@redhat.com>
CC: Dave Hansen <dave.hansen@linux.intel.com>
CC: "(maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\))" <x86@kernel.org>
CC: "H . Peter Anvin" <hpa@zytor.com>
CC: Mario Limonciello <mario.limonciello@amd.com>
CC: "(open list:X86 ARCHITECTURE \(32-BIT AND 64-BIT\))" <linux-kernel@vger.kernel.org>
CC: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
CC: Perry Yuan <perry.yuan@amd.com>
Hi Mario,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 40384c840ea1944d7c5a392e8975ed088ecf0b37]
url: https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/x86-cpu-Enable-SD_ASYM_PACKING-for-PKG-domain-on-systems-with-AMD-preferred-cores/20241202-124012
base: 40384c840ea1944d7c5a392e8975ed088ecf0b37
patch link: https://lore.kernel.org/r/20241202043724.3929062-1-superm1%40kernel.org
patch subject: [PATCH] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on systems with AMD preferred cores
:::::: branch date: 13 hours ago
:::::: commit date: 13 hours ago
config: x86_64-randconfig-161-20241202 (https://download.01.org/0day-ci/archive/20241203/202412030147.iL04d26O-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202412030147.iL04d26O-lkp@intel.com/
smatch warnings:
arch/x86/kernel/smpboot.c:508 x86_die_flags() warn: statement has no effect 3
vim +508 arch/x86/kernel/smpboot.c
108af4b4bd3813 Ricardo Neri 2023-08-14 499
108af4b4bd3813 Ricardo Neri 2023-08-14 500 static int x86_die_flags(void)
108af4b4bd3813 Ricardo Neri 2023-08-14 501 {
d5fec370ef73d0 Mario Limonciello 2024-12-01 502 if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU))
108af4b4bd3813 Ricardo Neri 2023-08-14 503 return x86_sched_itmt_flags();
108af4b4bd3813 Ricardo Neri 2023-08-14 504
d5fec370ef73d0 Mario Limonciello 2024-12-01 505 switch (boot_cpu_data.x86_vendor) {
d5fec370ef73d0 Mario Limonciello 2024-12-01 506 case X86_VENDOR_AMD:
d5fec370ef73d0 Mario Limonciello 2024-12-01 507 case X86_VENDOR_HYGON:
d5fec370ef73d0 Mario Limonciello 2024-12-01 @508 bool prefcore = false;
d5fec370ef73d0 Mario Limonciello 2024-12-01 509
d5fec370ef73d0 Mario Limonciello 2024-12-01 510 amd_detect_prefcore(&prefcore);
d5fec370ef73d0 Mario Limonciello 2024-12-01 511 if (prefcore || cpu_feature_enabled(X86_FEATURE_AMD_HETEROGENEOUS_CORES))
d5fec370ef73d0 Mario Limonciello 2024-12-01 512 return x86_sched_itmt_flags();
d5fec370ef73d0 Mario Limonciello 2024-12-01 513 };
d5fec370ef73d0 Mario Limonciello 2024-12-01 514
108af4b4bd3813 Ricardo Neri 2023-08-14 515 return 0;
108af4b4bd3813 Ricardo Neri 2023-08-14 516 }
d3d37d850d1d77 Tim Chen 2016-11-22 517
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-02 17:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02 4:37 [PATCH] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on systems with AMD preferred cores Mario Limonciello
2024-12-02 8:54 ` kernel test robot
2024-12-02 15:34 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2024-12-02 17:48 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.