linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mike Galbraith <efault@gmx.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>
Cc: kbuild-all@lists.01.org, linux-rt-users@vger.kernel.org,
	Mel Gorman <mgorman@suse.de>, Vlastimil Babka <vbabka@suse.cz>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [patch] v2 mm/slub: restore/expand unfreeze_partials() local exclusion scope
Date: Tue, 20 Jul 2021 10:46:44 +0800	[thread overview]
Message-ID: <202107201030.Ibz9DeS2-lkp@intel.com> (raw)
In-Reply-To: <476d147ab6eec386a1e8b8e11cb09708377f8c3e.camel@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 8002 bytes --]

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 <lkp@intel.com>

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 <anonymous>'} 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 <anonymous>'} 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 <anonymous>'} 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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 65639 bytes --]

  parent reply	other threads:[~2021-07-20  6:13 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08  9:42 [ANNOUNCE] v5.13-rt1 Thomas Gleixner
2021-07-09  5:20 ` [patch] mm/slub: Fix kmem_cache_alloc_bulk() error path Mike Galbraith
2021-07-09  5:20 ` [patch] mm/slub: Replace do_slab_free() local_lock_irqsave/restore() calls in PREEMPT_RT scope Mike Galbraith
2021-07-09  5:21 ` [rfc/patch] mm/slub: restore/expand unfreeze_partials() local exclusion scope Mike Galbraith
2021-07-09  5:25   ` Mike Galbraith
2021-07-09 19:28   ` Thomas Gleixner
2021-07-10  1:12     ` Mike Galbraith
2021-07-15 16:34       ` Mike Galbraith
2021-07-17 14:58         ` [patch] v2 " Mike Galbraith
2021-07-18  7:58           ` Vlastimil Babka
2021-07-18  8:11             ` Mike Galbraith
2021-07-18 15:43           ` Mike Galbraith
2021-07-18 21:19           ` Vlastimil Babka
2021-07-19  4:01             ` Mike Galbraith
2021-07-19 13:15               ` Mike Galbraith
2021-07-20  2:46           ` kernel test robot [this message]
2021-07-20  8:56         ` [rfc/patch] " Vlastimil Babka
2021-07-20 11:26           ` Mike Galbraith
2021-07-21  4:56             ` Mike Galbraith
2021-07-21  8:44               ` Vlastimil Babka
2021-07-21  9:33                 ` Mike Galbraith
2021-07-23 22:39                   ` Vlastimil Babka
2021-07-24  2:25                     ` Mike Galbraith
2021-07-25 14:09                     ` Mike Galbraith
2021-07-25 14:16                       ` Vlastimil Babka
2021-07-25 15:02                         ` Mike Galbraith
2021-07-25 16:27                           ` Vlastimil Babka
2021-07-25 19:12                             ` Vlastimil Babka
2021-07-25 19:34                               ` Vlastimil Babka
2021-07-26 10:04                                 ` Mike Galbraith
2021-07-26 17:00                                 ` Mike Galbraith
2021-07-26 21:26                                   ` Vlastimil Babka
2021-07-27  4:09                                     ` Mike Galbraith
2021-07-28 16:59                                       ` Vlastimil Babka
2021-07-29  4:51                                         ` Mike Galbraith
2021-07-29  9:51                                           ` Vlastimil Babka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202107201030.Ibz9DeS2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=efault@gmx.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).