[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2241a2a53f48448c9fb435f893444cd7@AcuMS.aculab.com>
Date: Sun, 31 Dec 2023 10:36:42 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Waiman Long' <longman@...hat.com>, 'Ingo Molnar' <mingo@...nel.org>
CC: "'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
"'peterz@...radead.org'" <peterz@...radead.org>, "'mingo@...hat.com'"
<mingo@...hat.com>, "'will@...nel.org'" <will@...nel.org>,
"'boqun.feng@...il.com'" <boqun.feng@...il.com>, 'Linus Torvalds'
<torvalds@...ux-foundation.org>, "'xinhui.pan@...ux.vnet.ibm.com'"
<xinhui.pan@...ux.vnet.ibm.com>,
"'virtualization@...ts.linux-foundation.org'"
<virtualization@...ts.linux-foundation.org>, 'Zeng Heng'
<zengheng4@...wei.com>
Subject: RE: [PATCH next 4/5] locking/osq_lock: Optimise per-cpu data
accesses.
From: Waiman Long
> Sent: 31 December 2023 03:04
....
> The presence of debug_smp_processor_id in your compiled code is likely
> due to the setting of CONFIG_DEBUG_PREEMPT in your kernel config.
>
> #ifdef CONFIG_DEBUG_PREEMPT
> extern unsigned int debug_smp_processor_id(void);
> # define smp_processor_id() debug_smp_processor_id()
> #else
> # define smp_processor_id() __smp_processor_id()
> #endif
>
> I don't have that config entry in my kernel config and so I only get 2
> instructions for this_cpu_ptr(). We are not going to optimize the code
> specifically for CONFIG_DEBUG_PREEMPT and so this patch should be dropped.
Yes, I discovered that late last night.
I've no idea why it is set.
It might even be inherited from the ubuntu 18.04 (I think) .config
I started with (mostly removing extra modules to reduce compile
time and the size of uramdisk).
I'll look at the patches again.
Saving node->prev->cpu as node->prev_cpu will definitely save
the cache-line bounce.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists