linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Thorsten Leemhuis <linux@leemhuis.info>,
	Suren Baghdasaryan <surenb@google.com>,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Christoph Lameter <cl@gentwo.org>,
	David Rientjes <rientjes@google.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>,
	Harry Yoo <harry.yoo@oracle.com>,
	Uladzislau Rezki <urezki@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	rcu@vger.kernel.org, maple-tree@lists.infradead.org,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH v6 02/10] slab: add opt-in caching layer of percpu sheaves
Date: Thu, 28 Aug 2025 11:03:20 +0200	[thread overview]
Message-ID: <d883b845-28ce-4804-b2bb-0ccea0100fa2@suse.cz> (raw)
In-Reply-To: <4585de6e-a7ec-45a3-8421-dc9e1490cdf7@leemhuis.info>

On 8/28/25 10:53, Thorsten Leemhuis wrote:
> On 28.08.25 10:01, Vlastimil Babka wrote:
>> On 8/28/25 09:43, Thorsten Leemhuis wrote:
>>> On 27.08.25 10:26, Vlastimil Babka wrote:
>>>> Specifying a non-zero value for a new struct kmem_cache_args field
>>>> sheaf_capacity will setup a caching layer of percpu arrays called
>>>> sheaves of given capacity for the created cache.
>>>>
>>>> Allocations from the cache will allocate via the percpu sheaves (main or
>>>> spare) as long as they have no NUMA node preference. Frees will also
>>>> put the object back into one of the sheaves.
>>>> [...]
>>>
>>> This patch showed up in linux-next today and from a *quick* glance at
>>> things I suspect it might be the reason why my daily next rpm builds for
>>> Fedora failed today like this:
>> 
>> Hi, thanks for the report.
>>> ""
>>> In file included from ./include/linux/spinlock.h:63,
>>>                  from ./include/linux/mmzone.h:8,
>>>                  from ./include/linux/gfp.h:7,
>>>                  from ./include/linux/mm.h:7,
>>>                  from mm/slub.c:13:
>>> mm/slub.c: In function ‘__pcs_replace_empty_main’:
>>> mm/slub.c:4727:64: error: ‘local_trylock_t’ {aka ‘__seg_gs struct spinlock’} has no member named ‘llock’; did you mean ‘lock’?
>>>  4727 |         lockdep_assert_held(this_cpu_ptr(&s->cpu_sheaves->lock.llock));
>>>       |                                                                ^~~~~
>>> ./include/linux/lockdep.h:392:61: note: in definition of macro ‘lockdep_assert_held’
>>>   392 | #define lockdep_assert_held(l)                  do { (void)(l); } while (0)
>>>       |                                                             ^
>>> [...]
>>> mm/slub.c:5653:29: note: in expansion of macro ‘this_cpu_ptr’
>>>  5653 |         lockdep_assert_held(this_cpu_ptr(&s->cpu_sheaves->lock.llock));
>>>       |                             ^~~~~~~~~~~~
>>> make[3]: *** [scripts/Makefile.build:287: mm/slub.o] Error 1
>>> make[2]: *** [scripts/Makefile.build:556: mm] Error 2
>>> make[2]: *** Waiting for unfinished jobs....
>>> make[1]: *** [/builddir/build/BUILD/kernel-6.17.0-build/kernel-next-20250828/linux-6.17.0-0.0.next.20250828.432.vanilla.fc44.x86_64/Makefile:2017: .] Error 2
>>> make: *** [Makefile:256: __sub-make] Error 2
>>> ""
>>>
>>> Full log: https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-rawhide-x86_64/09498568-next-next-all/builder-live.log.gz
>> 
>> Oh so I assume the .config here has both LOCKDEP and PREEMPT_RT?
> 
> PREEMPT_RT yes, LOCKDEP no.

Ah right the compiler evaluates that assert param even if not enabled.
> The config the failed build actually used is generated on the buildsys,
> but it should be identical to the one I attached here when you process
> it with olddefconfig.
> 
>> I tried to make lockdep_assert_held() with trylock but forgot about the RT
>> difference. The solution is Alexei's patch
>> 
>> https://lore.kernel.org/all/20250718021646.73353-2-
>> alexei.starovoitov@gmail.com/
> 
> Hmmm, that one didn't do the trick for me.

Yeah it won't help alone, the lockdep_assert_held() calls in this patch will
also need to remove the ".llock" part. But if we did that without Alexei's
patch, it would fix RT but break !RT.



  reply	other threads:[~2025-08-28  9:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27  8:26 [PATCH v6 00/10] SLUB percpu sheaves Vlastimil Babka
2025-08-27  8:26 ` [PATCH v6 01/10] slab: simplify init_kmem_cache_nodes() error handling Vlastimil Babka
2025-08-27  8:26 ` [PATCH v6 02/10] slab: add opt-in caching layer of percpu sheaves Vlastimil Babka
2025-08-28  7:43   ` Thorsten Leemhuis
2025-08-28  8:01     ` Vlastimil Babka
2025-08-28  8:53       ` Thorsten Leemhuis
2025-08-28  9:03         ` Vlastimil Babka [this message]
2025-08-28 15:00       ` Vlastimil Babka
2025-08-29  7:12         ` Thorsten Leemhuis
2025-08-27  8:26 ` [PATCH v6 03/10] slab: add sheaf support for batching kfree_rcu() operations Vlastimil Babka
2025-08-27  8:26 ` [PATCH v6 04/10] slab: sheaf prefilling for guaranteed allocations Vlastimil Babka
2025-08-27  8:26 ` [PATCH v6 05/10] slab: determine barn status racily outside of lock Vlastimil Babka
2025-08-27  8:26 ` [PATCH v6 06/10] slab: skip percpu sheaves for remote object freeing Vlastimil Babka
2025-08-27  8:26 ` [PATCH v6 07/10] slab: allow NUMA restricted allocations to use percpu sheaves Vlastimil Babka
2025-08-27  8:26 ` [PATCH v6 08/10] mm, vma: use percpu sheaves for vm_area_struct cache Vlastimil Babka
2025-09-02 11:13   ` Lorenzo Stoakes
2025-09-03 12:47     ` Vlastimil Babka
2025-09-03 13:31       ` Lorenzo Stoakes
2025-08-27  8:26 ` [PATCH v6 09/10] tools/testing: Add testing support for slab caches with sheaves Vlastimil Babka
2025-08-27  8:26 ` [PATCH v6 10/10] maple_tree: use percpu sheaves for maple_node_cache 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=d883b845-28ce-4804-b2bb-0ccea0100fa2@suse.cz \
    --to=vbabka@suse.cz \
    --cc=Liam.Howlett@oracle.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=cl@gentwo.org \
    --cc=harry.yoo@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=maple-tree@lists.infradead.org \
    --cc=rcu@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=sfr@canb.auug.org.au \
    --cc=surenb@google.com \
    --cc=urezki@gmail.com \
    /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).