Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6427284rdb; Thu, 14 Dec 2023 19:44:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqvgr8ysYiRj3QG3cmLEaueK4bjyXBJHq+KtKAq+M2KO8QRxtRHVB7LZoqQhZ/+rub2BS/ X-Received: by 2002:a05:620a:1915:b0:77e:fcc9:d2a4 with SMTP id bj21-20020a05620a191500b0077efcc9d2a4mr15124913qkb.45.1702611848635; Thu, 14 Dec 2023 19:44:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702611848; cv=none; d=google.com; s=arc-20160816; b=LxtjbV3YxWnhQ3Kc8pORXNGmbTkkcYG6S5Dlc4MiHDtPhW/l4g4/U19RWhVYbOTreq 6cpfrRVDlOuBsdE7TfAPGJS0BiMdTcExRFi/5CwrlRn08UwZhusV+yR+EZeMhvstCeGX gZKaxLdKSCFEyDDaBVg0KzqIZhQWfNQjcXRJMSDOMR/6udBcGVLxyX1QyDxjsHKNLKni nEWEAKhZ65XVopRWV3cztDsAcFrdXAqEqsLlFA7ac5SpNccRMreQ2P7xelAr7tVsypcC mN6Tcr2wd1KmoLuHlSN5/yRWIBgqnnaLlzriz5W86Gbmi7jwLgGYkUkURu10LXU6rMGr jTQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=445I71dWNky8gFBXioboudiXUB/462lbJ09ljq2mQN4=; fh=J/MwfZ03fVsx7H1R2Z+ZzGETPOMgpb7sAEK6itAUKoY=; b=nSAMvqDCc8DGFV+HARYNehH5hRJOGNcVhaAvVxZJHJoc6xuphm6fWNtOk/D7knn+69 dauvIJtNjbmR44aojTkSBQkNQfPXfSLFizJ8RMZkiyxFtY3YOmy/e1TDf6IOj5cMwauk fhOSsyAJVAMnltMGvkryRurdiU0jr4OunzkRullYKthDL/iMo5MTxzdd4+agkvVjXHTJ jXJJhVzs6gZeFvJnPOFwi/RknVr60XuNHrRTMM7Rr7+sJj3r09ucjTgRcT9ZeGjF/a1T YtGLEXKVS4PS7qG9uyzG61iVFsF8GHRiQKGXLhsceOZrgJ4n1CQEEBSzX/M1lQHWYZg4 THRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=YDJX5xy+; spf=pass (google.com: domain of linux-kernel+bounces-417-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-417-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y24-20020a17090ad71800b0028b036dda8fsi2555490pju.187.2023.12.14.19.44.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 19:44:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-417-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=YDJX5xy+; spf=pass (google.com: domain of linux-kernel+bounces-417-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-417-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4419D2814E0 for ; Fri, 15 Dec 2023 03:44:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3BF76111A8; Fri, 15 Dec 2023 03:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=me.com header.i=@me.com header.b="YDJX5xy+" X-Original-To: linux-kernel@vger.kernel.org Received: from pv50p00im-ztdg10021901.me.com (pv50p00im-ztdg10021901.me.com [17.58.6.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65A8810A15 for ; Fri, 15 Dec 2023 03:43:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=me.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=me.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1702611823; bh=445I71dWNky8gFBXioboudiXUB/462lbJ09ljq2mQN4=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=YDJX5xy+W1UfNbpOBoXmIjJYhQF1Ceu3p8Dkx7b9/KzzjIQUnBpu9dcohJw+H5mLA FnT8DjHyxNjgo1h76F+ZAgUsw1lMc+8H+CELa7EeTILVzWBYqFE4JkQTNE8k9f6hK/ hYadR5auSh+QcZhwd5Vajf5vmRiULiPDDNczRtIzOUqRol7UORD6QXatwEW7HLpSbz jxeACvPM5LbqnVjf13xFt58jSBRt6Y3E8XdygB/Ar4WWPY3YX5My9BX4TgdEuvtW7Z 9OcX+Ga010xmPgTwVWrjUqEtqDrA2uz8piKj8zU+pKc1+Zz+7mrUfAbSrdbbPBxQP+ AYL/6h3Em0LVw== Received: from xiongwei.. (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztdg10021901.me.com (Postfix) with ESMTPSA id A07BF813C8; Fri, 15 Dec 2023 03:43:36 +0000 (UTC) From: sxwjean@me.com 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, quic_jjohnson@quicinc.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Xiongwei Song Subject: [PATCH v4 4/4] mm/slub: make the description of slab_min_objects helpful in doc Date: Fri, 15 Dec 2023 11:41:50 +0800 Message-Id: <20231215034150.108783-5-sxwjean@me.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231215034150.108783-1-sxwjean@me.com> References: <20231215034150.108783-1-sxwjean@me.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: 8lD-3Etja8ZIaO9ffj4EqA9SJ3T_cRqs X-Proofpoint-ORIG-GUID: 8lD-3Etja8ZIaO9ffj4EqA9SJ3T_cRqs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-14_17,2023-12-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 spamscore=0 mlxscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2312150026 From: Xiongwei Song There is no a value assigned to slab_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 --- 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..213491ffb66f 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:automatically scaled by number of cpus) .. slab_min_order=x (default 0) .. slab_max_order=x (default 3 (PAGE_ALLOC_COSTLY_ORDER)) -- 2.34.1