Hi Mike, Thank you for the patch! Yet something to improve: [auto build test ERROR on linux-rt-devel/linux-5.13.y-rt-testing] [cannot apply to hnaz-linux-mm/master linux/master linus/master v5.14-rc2 next-20210719] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Mike-Galbraith/v2-mm-slub-restore-expand-unfreeze_partials-local-exclusion-scope/20210718-092133 base: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.13.y-rt-testing config: x86_64-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/9398c1a5075cbaa4a610319cfceeab417d1f3e12 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Mike-Galbraith/v2-mm-slub-restore-expand-unfreeze_partials-local-exclusion-scope/20210718-092133 git checkout 9398c1a5075cbaa4a610319cfceeab417d1f3e12 # save the attached .config to linux build tree mkdir build_dir make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from arch/x86/include/asm/bug.h:84, from include/linux/bug.h:5, from include/linux/mmdebug.h:5, from include/linux/mm.h:9, from mm/slub.c:13: mm/slub.c: In function '__unfreeze_partials': >> mm/slub.c:2428:54: error: 'local_lock_t' {aka 'struct '} has no member named 'lock' 2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock)); | ^ include/asm-generic/bug.h:119:25: note: in definition of macro 'WARN_ON' 119 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held' 311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \ | ^~~~~~~~~~~~~~~ mm/slub.c:2428:3: note: in expansion of macro 'lockdep_assert_held' 2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock)); | ^~~~~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:241:2: note: in expansion of macro '__verify_pcpu_ptr' 241 | __verify_pcpu_ptr(ptr); \ | ^~~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr' 252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr) | ^~~~~~~~~~~ mm/slub.c:2428:23: note: in expansion of macro 'this_cpu_ptr' 2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock)); | ^~~~~~~~~~~~ >> mm/slub.c:2428:54: error: 'local_lock_t' {aka 'struct '} has no member named 'lock' 2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock)); | ^ include/asm-generic/bug.h:119:25: note: in definition of macro 'WARN_ON' 119 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held' 311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \ | ^~~~~~~~~~~~~~~ mm/slub.c:2428:3: note: in expansion of macro 'lockdep_assert_held' 2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock)); | ^~~~~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr' 242 | arch_raw_cpu_ptr(ptr); \ | ^~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr' 252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr) | ^~~~~~~~~~~ mm/slub.c:2428:23: note: in expansion of macro 'this_cpu_ptr' 2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock)); | ^~~~~~~~~~~~ >> mm/slub.c:2428:54: error: 'local_lock_t' {aka 'struct '} has no member named 'lock' 2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock)); | ^ include/asm-generic/bug.h:119:25: note: in definition of macro 'WARN_ON' 119 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held' 311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \ | ^~~~~~~~~~~~~~~ mm/slub.c:2428:3: note: in expansion of macro 'lockdep_assert_held' 2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock)); | ^~~~~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr' 242 | arch_raw_cpu_ptr(ptr); \ | ^~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr' 252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr) | ^~~~~~~~~~~ mm/slub.c:2428:23: note: in expansion of macro 'this_cpu_ptr' 2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock)); | ^~~~~~~~~~~~ vim +2428 mm/slub.c 2369 2370 #ifdef CONFIG_SLUB_CPU_PARTIAL 2371 static void __unfreeze_partials(struct kmem_cache *s, struct page *partial_page) 2372 { 2373 struct kmem_cache_node *n = NULL, *n2 = NULL; 2374 struct page *page, *discard_page = NULL; 2375 unsigned long flags = 0; 2376 2377 while (partial_page) { 2378 struct page new; 2379 struct page old; 2380 2381 page = partial_page; 2382 partial_page = page->next; 2383 2384 n2 = get_node(s, page_to_nid(page)); 2385 if (n != n2) { 2386 if (n) 2387 spin_unlock_irqrestore(&n->list_lock, flags); 2388 2389 n = n2; 2390 spin_lock_irqsave(&n->list_lock, flags); 2391 } 2392 2393 do { 2394 2395 old.freelist = page->freelist; 2396 old.counters = page->counters; 2397 VM_BUG_ON(!old.frozen); 2398 2399 new.counters = old.counters; 2400 new.freelist = old.freelist; 2401 2402 new.frozen = 0; 2403 2404 } while (!__cmpxchg_double_slab(s, page, 2405 old.freelist, old.counters, 2406 new.freelist, new.counters, 2407 "unfreezing slab")); 2408 2409 if (unlikely(!new.inuse && n->nr_partial >= s->min_partial)) { 2410 page->next = discard_page; 2411 discard_page = page; 2412 } else { 2413 add_partial(n, page, DEACTIVATE_TO_TAIL); 2414 stat(s, FREE_ADD_PARTIAL); 2415 } 2416 } 2417 2418 if (n) 2419 spin_unlock_irqrestore(&n->list_lock, flags); 2420 2421 /* 2422 * If we got here via __slab_free() -> put_cpu_partial(), 2423 * memcg_free_page_obj_cgroups() ->kfree() may send us 2424 * back to __slab_free() -> put_cpu_partial() for an 2425 * unfortunate second encounter with cpu_slab->lock. 2426 */ 2427 if (IS_ENABLED(CONFIG_PREEMPT_RT) && memcg_kmem_enabled()) { > 2428 lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock)); 2429 local_unlock(&s->cpu_slab->lock); 2430 } 2431 2432 while (discard_page) { 2433 page = discard_page; 2434 discard_page = discard_page->next; 2435 2436 stat(s, DEACTIVATE_EMPTY); 2437 discard_slab(s, page); 2438 stat(s, FREE_SLAB); 2439 } 2440 2441 if (IS_ENABLED(CONFIG_PREEMPT_RT) && memcg_kmem_enabled()) 2442 local_lock(&s->cpu_slab->lock); 2443 } 2444 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org