Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp652602rdb; Tue, 5 Dec 2023 16:23:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMVR2koaj74HeCadxO+5Tb5MyBShGoUcuwfSsYv1tklRYMdpWRFkmHfhIv8kwShHATF2V/ X-Received: by 2002:a17:902:c94d:b0:1d0:cd48:e05c with SMTP id i13-20020a170902c94d00b001d0cd48e05cmr59422pla.75.1701822180548; Tue, 05 Dec 2023 16:23:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701822180; cv=none; d=google.com; s=arc-20160816; b=e8FVm4nnNwfRPJ8kHIxtByWXDthIaEf5uO3z312YqtcJ7H8c9675bxKId86hFneBWD kMFFlUGbRFMmFG3q+LEDBZdYoBJ2D/F0QYjfkWr4T0Xl0suaOt/7QEKmbMQYqAUhvmDK 6pvmNZxKvTqTT+/XICM6cCtncisotPiPzPO0SeKsAtmabXP0u3ajuQovaG8VClwHJOBE Dy2m4jrEINYFmyYrJeQkWAkM7rXkOLIyb60Eocv7EtSZqu+8dI5nWMg+HFsmunYubPbE 5OI4tegCQlnhugYr1H3NOSsagEa7O7EnCx/eHmN5l9PcYvS6OJxUGhP5nSxaWZ0vKmYd +iqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=PUFVrntTy1cLOik0xNDwq8kH21En+z5/DrAlh/czNd4=; fh=QjPlaivLG8mZgexZ/tpAejRXv0lKnXckcu3psGSpy1s=; b=j4sSYMIV6wvs7vRanntGGAedhlQyFx1Bsy4z9Y1hQ9elrKTA2l97KbAggpDP/hFdc+ KMX0KctZkh5Y4JuRxMT95SpYscA44so8ZzPYkumcXzM7EbxwYdjsFsTRKT0otUFahZ01 lgXVFpLFkbENYfdwZ0o8akdmiFhJRPzmJ4qWbbM4tw3EtA6+7ldc5/lyk12i741d8yKj OsGHIFwdHoKH2oKkQID3IdPMTs5QV3b9NIi9bFcyJZRoCwvDLFpcaUUAMI9ZcJwYATw8 xVmYL9zQO770WT+J/2Q83nE8RdwTy8Nq3l7ntu+2MTq7Ouh6zFbczCFaKYW9Df0uOT4h bQbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Jnyz45az; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id j3-20020a17090276c300b001cf5c99f036si10478487plt.90.2023.12.05.16.23.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 16:23:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Jnyz45az; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 071DD805ED3C; Tue, 5 Dec 2023 16:22:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346643AbjLFAWi (ORCPT + 99 others); Tue, 5 Dec 2023 19:22:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346658AbjLFAWh (ORCPT ); Tue, 5 Dec 2023 19:22:37 -0500 Received: from mail-ua1-x930.google.com (mail-ua1-x930.google.com [IPv6:2607:f8b0:4864:20::930]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C1941AA; Tue, 5 Dec 2023 16:22:43 -0800 (PST) Received: by mail-ua1-x930.google.com with SMTP id a1e0cc1a2514c-7c58518503aso877888241.1; Tue, 05 Dec 2023 16:22:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701822162; x=1702426962; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PUFVrntTy1cLOik0xNDwq8kH21En+z5/DrAlh/czNd4=; b=Jnyz45az5guo8PWzLpoGLQN1XQJ3IBRXhwiHc+YRzHhTvlJKhPpSglO4ABxG92PvaZ OU7vwaF2558qN70y6+OQVnWJEOsd1y5w3jpFVQsvEOb7igreA8hT1+3MJP3OTf+YuJha aPMb8TondWgNfxvESsqLihPKmI4UTMIleqRAv8WgTi2WL8m1LEaAkvW7mQ9HPcOWhX0c O8hmMklQr9TGBXsR/MevW9cASGes5u8g4Rce1UCyKBGtOkzAMq5eZAeQkwAMGoS5ieHE bJwobOZbW5B6K8fGKvvcmXZRS9Sx7tWtjee+9wUegvE3TkotFbqygi8ABmOYlm6nheFX cAOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701822162; x=1702426962; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PUFVrntTy1cLOik0xNDwq8kH21En+z5/DrAlh/czNd4=; b=HokF2CI1GbUi4iLWBAOgf0YWuggEJ7euUUw8E1aZchvOw9ttSjNzFVOnGFffXljZL+ xyKYh2TaMfU9Rct/PImml6vCXaTP+5GDDuafmlEHxmr2wjIASdoWZiTseE9PSvkGZPEW lmFTRRK2WYP0kDVnMNpCVM3ysDSER0rdxkIHNS4RdriWYBavU/YGpN+yKfCIeg4sGUNE G6vA210OJgH/ab7chGbC/uEDTLqNwAzGPgz+6qyILfFMRF09R76LMnVusIXwCWO0k8P6 8Sw2gL3YR9F9/K+9gnY7Q/gaWoNhRVDvFtoz+viwwvz8TG/K6u4NwRSn++bNs3EiCRqB fXFw== X-Gm-Message-State: AOJu0Ywb/ntQZr+xj3pDOgaz/wG8bAArQwfO2NLa0nDvuekwFXPbOtHo awgb+35PY3L19Qf0e+mKGPcccdjq30TIHYzuIEk= X-Received: by 2002:a67:ee1a:0:b0:464:9e34:e452 with SMTP id f26-20020a67ee1a000000b004649e34e452mr107173vsp.2.1701822162132; Tue, 05 Dec 2023 16:22:42 -0800 (PST) MIME-Version: 1.0 References: <20231203001501.126339-1-sxwjean@me.com> <20231203001501.126339-4-sxwjean@me.com> In-Reply-To: From: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Wed, 6 Dec 2023 09:22:32 +0900 Message-ID: Subject: Re: [PATCH v2 3/3] mm/slub: correct the default value of slub_min_objects in doc To: "Song, Xiongwei" Cc: "sxwjean@me.com" , "vbabka@suse.cz" , "cl@linux.com" , "linux-mm@kvack.org" , "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" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 05 Dec 2023 16:22:56 -0800 (PST) On Tue, Dec 5, 2023 at 11:11=E2=80=AFPM Song, Xiongwei wrote: > > Hi Hyeonggon, > > > -----Original Message----- > > From: Hyeonggon Yoo <42.hyeyoo@gmail.com> > > Sent: Tuesday, December 5, 2023 8:54 AM > > To: sxwjean@me.com > > Cc: vbabka@suse.cz; cl@linux.com; linux-mm@kvack.org; penberg@kernel.or= g; > > rientjes@google.com; iamjoonsoo.kim@lge.com; roman.gushchin@linux.dev; > > corbet@lwn.net; keescook@chromium.org; arnd@arndb.de; akpm@linux-founda= tion.org; > > gregkh@linuxfoundation.org; linux-doc@vger.kernel.org; linux-kernel@vge= r.kernel.org; Song, > > Xiongwei > > Subject: Re: [PATCH v2 3/3] mm/slub: correct the default value of slub_= min_objects in doc > > > > On Sun, Dec 3, 2023 at 9:16=E2=80=AFAM wrote: > > > > > > From: Xiongwei Song > > > > > > There is no a value assigned to slub_min_objects by default, it alway= s > > > is 0 that is initialized by compiler if no assigned value by command = line. > > > min_objects is calculated based on processor numbers in calculate_ord= er(). > > > For more details, see commit 9b2cd506e5f2 ("slub: Calculate min_objec= ts > > > based on number of processors.") > > > > > > Signed-off-by: Xiongwei Song > > > > While slub_min_objects equals zero by default, 'min_objects' overrides = it to > > 4 * (fls(nr_cpus) + 1) when not set. so when slub_min_objects is not > > set, it would be > > equal to or higher than 4. I'm not sure this level of implementation > > detail is worth documenting. > > commit 9b2cd506e5f2 ("slub: Calculate min_objects based on number of proc= essors.") > has already given "processors min_objects" pair, do we really need to doc= ument > the specific detail? No, I don't think it needs to be documented, but neither do I think "slub_min_objects is 0 by default" is correctly documented... > > Also, I think patch 2 should update Documentation/mm/slub.rst too. > > (slub_$param -> slab_param) > I think people can know slub_$params are still supported by > Documentation/mm/slub.rst, so we don't need to say the info again in > this file. Is it better to do so just before removing slub_$params > completely? If we're deprecating and planning to drop slub_$params in the future, IMHO it'd be less confusing if we change it now, rather than when removing slub_$params completely (probably 10 years later)? Thanks, Hyeonggon > > > --- > > > 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 be75971532f5..1f4399581449 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 sl= abs. That overhead is > > > governed by the order of the allocation for each slab. The allocatio= ns > > > can be influenced by kernel parameters: > > > > > > -.. slub_min_objects=3Dx (default 4) > > > +.. slub_min_objects=3Dx (default 0) > > > .. slub_min_order=3Dx (default 0) > > > .. slub_max_order=3Dx (default 3 (PAGE_ALLOC_COSTLY_ORDER= )) > > > > > > -- > > > 2.34.1 > > >