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.
next prev parent reply other threads:[~2025-08-28 9:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250827-slub-percpu-caches-v6-0-f0f775a3f73f@suse.cz>
[not found] ` <20250827-slub-percpu-caches-v6-2-f0f775a3f73f@suse.cz>
2025-08-28 7:43 ` [PATCH v6 02/10] slab: add opt-in caching layer of percpu sheaves 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
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$(echo .)cz \
--cc=Liam.Howlett@oracle$(echo .)com \
--cc=alexei.starovoitov@gmail$(echo .)com \
--cc=bigeasy@linutronix$(echo .)de \
--cc=cl@gentwo$(echo .)org \
--cc=harry.yoo@oracle$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mm@kvack$(echo .)org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=linux@leemhuis$(echo .)info \
--cc=maple-tree@lists$(echo .)infradead.org \
--cc=rcu@vger$(echo .)kernel.org \
--cc=rientjes@google$(echo .)com \
--cc=roman.gushchin@linux$(echo .)dev \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=surenb@google$(echo .)com \
--cc=urezki@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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