diff mbox series

[v3,4/4] mm/slub: correct the default value of slub_min_objects in doc

Message ID 20231209135203.303508-5-sxwjean@me.com (mailing list archive)
State New
Headers show
Series supplement of slab allocator removal | expand

Commit Message

Xiongwei Song Dec. 9, 2023, 1:52 p.m. UTC
From: Xiongwei Song <xiongwei.song@windriver.com>

There is no a value assigned to slub_min_objects by default, it always
is 0 that is initialized by compiler if no assigned value by command line.
min_objects is calculated based on processor numbers in calculate_order().
For more details, see commit 9b2cd506e5f2 ("slub: Calculate min_objects
based on number of processors.")

Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com>
---
 Documentation/mm/slub.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Song, Xiongwei Dec. 9, 2023, 1:59 p.m. UTC | #1
Hi Vlastimil,

I didn't change description as you mentioned because slab_min_objects doesn't
save the calculated value based on the number of processors, but the local
variables min_objects doesn't.

Regards,
Xiongwei 

> -----Original Message-----
> From: owner-linux-mm@kvack.org <owner-linux-mm@kvack.org> On Behalf Of
> sxwjean@me.com
> Sent: Saturday, December 9, 2023 9:52 PM
> To: vbabka@suse.cz; 42.hyeyoo@gmail.com; cl@linux.com; linux-mm@kvack.org
> Cc: penberg@kernel.org; rientjes@google.com; iamjoonsoo.kim@lge.com;
> roman.gushchin@linux.dev; corbet@lwn.net; keescook@chromium.org; arnd@arndb.de;
> akpm@linux-foundation.org; gregkh@linuxfoundation.org; linux-doc@vger.kernel.org; linux-
> kernel@vger.kernel.org; Song, Xiongwei <Xiongwei.Song@windriver.com>
> Subject: [PATCH v3 4/4] mm/slub: correct the default value of slub_min_objects in doc
> 
> From: Xiongwei Song <xiongwei.song@windriver.com>
> 
> There is no a value assigned to slub_min_objects by default, it always
> is 0 that is initialized by compiler if no assigned value by command line.
> min_objects is calculated based on processor numbers in calculate_order().
> For more details, see commit 9b2cd506e5f2 ("slub: Calculate min_objects
> based on number of processors.")
> 
> Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com>
> ---
>  Documentation/mm/slub.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/mm/slub.rst b/Documentation/mm/slub.rst
> index 6579a55b7852..56b27f493ba7 100644
> --- a/Documentation/mm/slub.rst
> +++ b/Documentation/mm/slub.rst
> @@ -150,7 +150,7 @@ list_lock once in a while to deal with partial slabs. That overhead is
>  governed by the order of the allocation for each slab. The allocations
>  can be influenced by kernel parameters:
> 
> -.. slab_min_objects=x          (default 4)
> +.. slab_min_objects=x          (default 0)
>  .. slab_min_order=x            (default 0)
>  .. slab_max_order=x            (default 3 (PAGE_ALLOC_COSTLY_ORDER))
> 
> --
> 2.34.1
>
Vlastimil Babka Dec. 13, 2023, 11:23 a.m. UTC | #2
On 12/9/23 14:59, Song, Xiongwei wrote:
> I didn't change description as you mentioned because slab_min_objects doesn't
> save the calculated value based on the number of processors, but the local
> variables min_objects doesn't.

Hm I think that's less helpful. The user/admin who will read the doc doesn't
care about implementation details such as value of a variable, but what's
the actual observable default behavior, and that is still the automatic
scaling, right?

> Regards,
> Xiongwei
Song, Xiongwei Dec. 14, 2023, 2:11 p.m. UTC | #3
> -----Original Message-----
> From: Vlastimil Babka <vbabka@suse.cz>
> Sent: Wednesday, December 13, 2023 7:23 PM
> To: Song, Xiongwei <Xiongwei.Song@windriver.com>; sxwjean@me.com;
> 42.hyeyoo@gmail.com; cl@linux.com; linux-mm@kvack.org
> Cc: penberg@kernel.org; rientjes@google.com; iamjoonsoo.kim@lge.com;
> roman.gushchin@linux.dev; corbet@lwn.net; keescook@chromium.org; arnd@arndb.de;
> akpm@linux-foundation.org; gregkh@linuxfoundation.org; linux-doc@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH v3 4/4] mm/slub: correct the default value of slub_min_objects in doc
> 
> 
> On 12/9/23 14:59, Song, Xiongwei wrote:
> > I didn't change description as you mentioned because slab_min_objects doesn't
> > save the calculated value based on the number of processors, but the local
> > variables min_objects doesn't.
> 
> Hm I think that's less helpful. The user/admin who will read the doc doesn't
> care about implementation details such as value of a variable, but what's
> the actual observable default behavior, and that is still the automatic
> scaling, right?

Ok, sure. Will update. 

Thanks.
diff mbox series

Patch

diff --git a/Documentation/mm/slub.rst b/Documentation/mm/slub.rst
index 6579a55b7852..56b27f493ba7 100644
--- a/Documentation/mm/slub.rst
+++ b/Documentation/mm/slub.rst
@@ -150,7 +150,7 @@  list_lock once in a while to deal with partial slabs. That overhead is
 governed by the order of the allocation for each slab. The allocations
 can be influenced by kernel parameters:
 
-.. slab_min_objects=x		(default 4)
+.. slab_min_objects=x		(default 0)
 .. slab_min_order=x		(default 0)
 .. slab_max_order=x		(default 3 (PAGE_ALLOC_COSTLY_ORDER))