* [PATCH] docs: ABI: sysfs-kernel-slab: mark cpu_partial attributes deprecated
@ 2026-07-01 14:17 Seongjun Hong
2026-07-02 5:18 ` Harry Yoo
0 siblings, 1 reply; 3+ messages in thread
From: Seongjun Hong @ 2026-07-01 14:17 UTC (permalink / raw)
To: Vlastimil Babka, Harry Yoo, Andrew Morton
Cc: linux-mm, linux-doc, linux-kernel, Seongjun Hong
The per-cpu slab and per-cpu partial slab mechanisms were removed when
SLUB was converted to per-cpu sheaves in Linux 7.0. The cpu_slabs,
slabs_cpu_partial and cpu_partial sysfs attributes were kept as stubs
that always return 0 for backwards compatibility, but their
documentation still described them as if they were functional.
Update the three descriptions to state that the attributes are
deprecated and always read 0, and note that they are retained only for
compatibility. While here, fix a "partialli" typo in the
slabs_cpu_partial description.
Signed-off-by: Seongjun Hong <hsj0512@snu.ac.kr>
---
Documentation/ABI/testing/sysfs-kernel-slab | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-kernel-slab b/Documentation/ABI/testing/sysfs-kernel-slab
index b26e4299f822..9b0085b86309 100644
--- a/Documentation/ABI/testing/sysfs-kernel-slab
+++ b/Documentation/ABI/testing/sysfs-kernel-slab
@@ -113,8 +113,10 @@ KernelVersion: 2.6.22
Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
Christoph Lameter <cl@gentwo.org>
Description:
- The cpu_slabs file is read-only and displays how many cpu slabs
- are active and their NUMA locality.
+ The cpu_slabs file is read-only. It is deprecated and always
+ reads "0" since the removal of per-cpu slabs in Linux 7.0. It
+ previously displayed how many cpu slabs were active and their
+ NUMA locality. The file is kept for backwards compatibility.
What: /sys/kernel/slab/<cache>/cpuslab_flush
Date: April 2009
@@ -509,12 +511,16 @@ What: /sys/kernel/slab/<cache>/slabs_cpu_partial
Date: Aug 2011
Contact: Christoph Lameter <cl@gentwo.org>
Description:
- This read-only file shows the number of partialli allocated
- frozen slabs.
+ This read-only file is deprecated and always reads "0(0)" since
+ the removal of per-cpu partial slabs in Linux 7.0. It previously
+ showed the number of partially allocated frozen slabs. The file
+ is kept for backwards compatibility.
What: /sys/kernel/slab/<cache>/cpu_partial
Date: Aug 2011
Contact: Christoph Lameter <cl@gentwo.org>
Description:
- This read-only file shows the number of per cpu partial
- pages to keep around.
+ This file is deprecated and always reads "0" since the removal of
+ per-cpu partial slabs in Linux 7.0. It previously showed the
+ number of per-cpu partial pages to keep around. The file is kept
+ for backwards compatibility.
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] docs: ABI: sysfs-kernel-slab: mark cpu_partial attributes deprecated
2026-07-01 14:17 [PATCH] docs: ABI: sysfs-kernel-slab: mark cpu_partial attributes deprecated Seongjun Hong
@ 2026-07-02 5:18 ` Harry Yoo
2026-07-02 8:28 ` Vlastimil Babka (SUSE)
0 siblings, 1 reply; 3+ messages in thread
From: Harry Yoo @ 2026-07-02 5:18 UTC (permalink / raw)
To: Seongjun Hong, Vlastimil Babka, Andrew Morton
Cc: linux-mm, linux-doc, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1396 bytes --]
On 7/1/26 11:17 PM, Seongjun Hong wrote:
> The per-cpu slab and per-cpu partial slab mechanisms were removed when
> SLUB was converted to per-cpu sheaves in Linux 7.0. The cpu_slabs,
small nit: sheaves were introduced in v6.18,
but the cpu (partial) slabs layer were removed later in v7.0.
> slabs_cpu_partial and cpu_partial sysfs attributes were kept as stubs
> that always return 0 for backwards compatibility, but their
> documentation still described them as if they were functional.
Right, for backward compatibility, because, unlike files that
might not exist w/o SLUB_STATS, userspace tools might assume that
they always exist.
> Update the three descriptions to state that the attributes are
> deprecated and always read 0, and note that they are retained only for
> compatibility. While here, fix a "partialli" typo in the
> slabs_cpu_partial description.
>
> Signed-off-by: Seongjun Hong <hsj0512@snu.ac.kr>
> ---
Overall looks good to me, so:
Acked-by: Harry Yoo (Oracle) <harry@kernel.org>
By the way.
There's still some gap between the documentation
and the implementation :)
We've dropped a bunch of files that exist only on
SLUB_STATS and new files introduced with by
sheaves were not documented.
Also, tools/mm/slabinfo.c needs some attention as
it hasn't been updated for a while.
Thanks.
--
Cheers,
Harry / Hyeonggon
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] docs: ABI: sysfs-kernel-slab: mark cpu_partial attributes deprecated
2026-07-02 5:18 ` Harry Yoo
@ 2026-07-02 8:28 ` Vlastimil Babka (SUSE)
0 siblings, 0 replies; 3+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-07-02 8:28 UTC (permalink / raw)
To: Harry Yoo, Seongjun Hong, Andrew Morton
Cc: linux-mm, linux-doc, linux-kernel, Christoph Lameter
On 7/2/26 07:18, Harry Yoo wrote:
>
>
> On 7/1/26 11:17 PM, Seongjun Hong wrote:
>> The per-cpu slab and per-cpu partial slab mechanisms were removed when
>> SLUB was converted to per-cpu sheaves in Linux 7.0. The cpu_slabs,
>
> small nit: sheaves were introduced in v6.18,
> but the cpu (partial) slabs layer were removed later in v7.0.
Fixed up when applying by saying "fully converted" :)
>
>> slabs_cpu_partial and cpu_partial sysfs attributes were kept as stubs
>> that always return 0 for backwards compatibility, but their
>> documentation still described them as if they were functional.
>
> Right, for backward compatibility, because, unlike files that
> might not exist w/o SLUB_STATS, userspace tools might assume that
> they always exist.
>
>> Update the three descriptions to state that the attributes are
>> deprecated and always read 0, and note that they are retained only for
>> compatibility. While here, fix a "partialli" typo in the
>> slabs_cpu_partial description.
>>
>> Signed-off-by: Seongjun Hong <hsj0512@snu.ac.kr>
>> ---
>
> Overall looks good to me, so:
> Acked-by: Harry Yoo (Oracle) <harry@kernel.org>
Added to slab/for-next, thanks!
> By the way.
>
> There's still some gap between the documentation
> and the implementation :)
>
> We've dropped a bunch of files that exist only on
> SLUB_STATS and new files introduced with by
> sheaves were not documented.
While we are touching these files, the question is what contact to use
there. Some have Christoph, some Pekka, some both.
Seems inflexible to me and should ideally point to the slab MAINTAINERS
entry. But not sure if it's possible. Documentation/ABI/README says:
Contact: Primary contact for this interface (may be a mailing list)
Maybe we can propose that it can also say
See the SLAB ALLOCATOR subsystem in MAINTAINERS.
> Also, tools/mm/slabinfo.c needs some attention as
> it hasn't been updated for a while.
There were some fixes in 7.2, but perhaps not enough.
> Thanks.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-02 8:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 14:17 [PATCH] docs: ABI: sysfs-kernel-slab: mark cpu_partial attributes deprecated Seongjun Hong
2026-07-02 5:18 ` Harry Yoo
2026-07-02 8:28 ` Vlastimil Babka (SUSE)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox