Re: [PATCH] x86,mm: print likely CPU at segfault time
From: Thomas Gleixner
Date: Wed Jul 21 2021 - 16:38:40 EST
On Mon, Jul 19 2021 at 15:34, Rik van Riel wrote:
> On Mon, 2021-07-19 at 12:20 -0700, Dave Hansen wrote:
>
>> If it's as trivial as:
>>
>> printk(KERN_CONT " on cpu/core %d/%d",
>> raw_smp_processor_id(),
>> topology_core_id(raw_smp_processor_id()));
>>
>> it would be handy. But, it's also not hard to look at 10 segfaults,
>> see
>> that they happened only on 2 CPUs and realize that hyperthreading is
>> enabled.
>
> One problem with topology_core_id() is that that, on a
> multi-socket system, the core number may not be unique.
Just add topology_physical_package_id() and you have a complete picture.
Thanks,
tglx