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)