On Fri, Jul 17, 2020 at 03:45:10PM +0200, Alberto Milone wrote: > On 17/07/2020 15:21, Sebastian Andrzej Siewior wrote: > > On 2020-07-17 14:33:31 [+0200], Alberto Milone wrote: > >> I checked and CONFIG_DEBUG_LOCK_ALLOC is not enabled in our kernels. > > The access to that variable is optimized away if not for debug. I made > > this: > > | #include <linux/module.h> > > | #include <linux/idr.h> > > | > > | static int le_init(void) > > | { > > | idr_preload_end(); > > | return 0; > > | } > > | module_init(le_init); > > | > > | static void le_exit(void) > > | { > > | } > > | module_exit(le_exit); > > | > > | MODULE_DESCRIPTION("driver"); > > | MODULE_LICENSE("prop"); > > > > and it produced a .ko. Here the "idr_preload_end()" was reduced to > > "preempt_enable()" as intended. No access to > > "&radix_tree_preloads.lock". > > > > Sebastian > * Subscribing Seth Looks like the driver is not using idr_preload_end() though, it is calling radix_tree_preload_end() which uses radix_tree_preloads whether or not CONFIG_DEBUG_LOCK_ALLOC is enabled. Thanks, Seth