Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1100304rdb; Wed, 6 Dec 2023 08:34:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzb9yYheoUqZ1smaiCPHGu9cJ3IQcyIBEYIoClYksBQXcDVqofMs/hWoJuWh8j+L5O3Y5j X-Received: by 2002:a05:6a00:4396:b0:6cd:fd83:7a1d with SMTP id bt22-20020a056a00439600b006cdfd837a1dmr1067903pfb.8.1701880457754; Wed, 06 Dec 2023 08:34:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701880457; cv=none; d=google.com; s=arc-20160816; b=avWD0gmu7Voh54+rm6nyHpE78K+Lj32+ahINvuqd0WakiWQ2Mn/V0icVEoJpBr/bCq ZAI+ODUZvVrfAx+fWO0mLP2sRkT20PwXduOZ9r35pPvCYMX9xzeqrvxb157T/sAWIOuI 4qYe29hH7uNcxV6w+A1OOz1+y7uSRYzZnEh2QMGGbug5uo+yJ0L6Rt/BoQ8FgfMQLraO 2xyMzbKcO/BZQm9B3AtZCsCO8FQQC64v7CMxRAiFQXzwfHzwMPqwCyV5NRfJAP39wxPo rO0VfAfw2exFzATx+K9OXJs1a4OTZ4ZjDVhtROm+1O96BCTyNSXfKwQhh7ePw19sDGCU wmDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=k+uFGUs75l4oWQ6f7Z0/b/BLTYEwL24mMWCv32Mzh+k=; fh=IE+KqwPVni+M0IZtKpBoBaV0plVkUildxkVyaF4oHmU=; b=jIzh/SetUyhzAilphGuZwwa5f15yL/LFs7k2a726YPA5AZAOSDs+rLhlpHcUzUwUR1 4N2je3qF1YK084/Tm9GZKUUrbtMYRhJCVXt7qiJVf3G6tuca20EOM8KZ1XGzBh5U2Q20 lsEKCQ35GOkGczIuJWNbb09ZuT0W4zJ2d/4J/vU/S+7RojpBT6vDyWc51YUFIrtOZB5p Dap1vFGxmLHn7oG2NArCB3S3G13NvHYTyGHHE1Y0B5wH1Eud8zAJs06iyRJZTUg1473D qzno7C9KgZ/YbOOTK+fNF3Rf6u2b3a/XVh9fpUFlf90mqnEbsRhlusis62bYhX0otQtN Kf3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="PE/OpJfF"; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z26-20020a62d11a000000b006cbe5e18d29si191342pfg.36.2023.12.06.08.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 08:34:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="PE/OpJfF"; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 529C6806BF37; Wed, 6 Dec 2023 08:33:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378777AbjLFQdg (ORCPT + 99 others); Wed, 6 Dec 2023 11:33:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378567AbjLFQdf (ORCPT ); Wed, 6 Dec 2023 11:33:35 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58B0812F; Wed, 6 Dec 2023 08:33:41 -0800 (PST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 53B1121E9D; Wed, 6 Dec 2023 16:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1701880419; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k+uFGUs75l4oWQ6f7Z0/b/BLTYEwL24mMWCv32Mzh+k=; b=PE/OpJfFlqtBuAWwRSmMCies8b9isQcMz6YeqIQlgfsbO7p+o/V4vexGXdwrF0Pk+LKQMh MlWhHsfteW7SZH+yv6zgQOwpVTHUETr8J/551DsYlnPTIxKAPdPODdRy5A6KSYhVlINvRv j7B6Jf3UyXfzwyzdG7biyfQncmarjD8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1701880419; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k+uFGUs75l4oWQ6f7Z0/b/BLTYEwL24mMWCv32Mzh+k=; b=DmVVBZYFBVFTkOefuuoR3OKubS3us88Yv8GAGH93a/xNNFuwh6TgUd3Cn59rhGaJHpaooD htBIB9xCX/V3PvDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 32767136CD; Wed, 6 Dec 2023 16:33:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id rQf7C2OicGU6ZQAAD6G6ig (envelope-from ); Wed, 06 Dec 2023 16:33:39 +0000 Message-ID: <9649f3fc-1802-6a0b-e492-d1ef6965d442@suse.cz> Date: Wed, 6 Dec 2023 17:33:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2 3/3] mm/slub: correct the default value of slub_min_objects in doc Content-Language: en-US To: Hyeonggon Yoo <42.hyeyoo@gmail.com>, sxwjean@me.com Cc: 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, Xiongwei Song References: <20231203001501.126339-1-sxwjean@me.com> <20231203001501.126339-4-sxwjean@me.com> From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: 0.20 X-Spamd-Result: default: False [0.20 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,me.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; BAYES_HAM(-0.00)[18.57%]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_TWELVE(0.00)[16]; FREEMAIL_TO(0.00)[gmail.com,me.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Wed, 06 Dec 2023 08:33:52 -0800 (PST) On 12/5/23 01:53, Hyeonggon Yoo wrote: > On Sun, Dec 3, 2023 at 9:16 AM wrote: >> >> From: Xiongwei Song >> >> 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 > > 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. We could say e.g. "(default: automaticaly scaled by number of cpus)" > Also, I think patch 2 should update Documentation/mm/slub.rst too. > (slub_$param -> slab_param) I'd do it as separate patch, not part of patch 2. >> --- >> 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 slabs. That overhead is >> governed by the order of the allocation for each slab. The allocations >> can be influenced by kernel parameters: >> >> -.. slub_min_objects=x (default 4) >> +.. slub_min_objects=x (default 0) >> .. slub_min_order=x (default 0) >> .. slub_max_order=x (default 3 (PAGE_ALLOC_COSTLY_ORDER)) >> >> -- >> 2.34.1 >>