From patchwork Sat Dec 9 13:52:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiongwei Song X-Patchwork-Id: 13486036 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F720C10F07 for ; Sat, 9 Dec 2023 13:52:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 832F36B0075; Sat, 9 Dec 2023 08:52:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E2976B007E; Sat, 9 Dec 2023 08:52:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D1C46B0080; Sat, 9 Dec 2023 08:52:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 5EAC76B0075 for ; Sat, 9 Dec 2023 08:52:38 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2EFFC1602B0 for ; Sat, 9 Dec 2023 13:52:38 +0000 (UTC) X-FDA: 81547419996.25.7950C0C Received: from pv50p00im-hyfv10021501.me.com (pv50p00im-hyfv10021501.me.com [17.58.6.48]) by imf28.hostedemail.com (Postfix) with ESMTP id 61C29C0008 for ; Sat, 9 Dec 2023 13:52:36 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=me.com header.s=1a1hai header.b=an+P+TM8; dmarc=pass (policy=quarantine) header.from=me.com; spf=pass (imf28.hostedemail.com: domain of sxwjean@me.com designates 17.58.6.48 as permitted sender) smtp.mailfrom=sxwjean@me.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702129956; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=S2vYkOAy+YL782OEnnJ/iLs01ZLLsMblP1/4x1SmMJs=; b=2UGbrcm7na+pXPF2xT94V5/gBX2WzN1K+W1IYLyuH8RHXspZSURW0h8vH1Y2dqDfwqubeL LN5ut3frCJQl4ZaL8foAhWmrUESsw9xsrSXser6ZG5p6Loa1lO0pCXx5YWFCvwkkJX5y9I 0/gGx2fvGdXcxK4HrHIjRP/bpZ0lxMI= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=me.com header.s=1a1hai header.b=an+P+TM8; dmarc=pass (policy=quarantine) header.from=me.com; spf=pass (imf28.hostedemail.com: domain of sxwjean@me.com designates 17.58.6.48 as permitted sender) smtp.mailfrom=sxwjean@me.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702129956; a=rsa-sha256; cv=none; b=NtLkvEuclmUbrWxWhp0AGR1aH2yvjfLCY1P9SqrS0bsRcQr+DLSLpU3HdH7QtFhJ8oLx0U ukEiOoGlsGhgPewhol2+HfTOfxjrUDQjH25kTgzJ1G+x/zfkpHckCs25hevs+ZZur2h/x8 bE7+l3g7awYpi9VIVuci42HlTVm2rWM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1702129955; bh=S2vYkOAy+YL782OEnnJ/iLs01ZLLsMblP1/4x1SmMJs=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=an+P+TM8XZyz/Xqd2l7iWWFoAKTP2xMW1h1lBv9g7PwTN3gpn1Kdd2focQ+S77vXQ bZBEoJK45jlKbGueeP6uc4tO0LBxNvSGyuq+d+FphLN2MNkP7/nHArnsk22dcFFKlU Y0IqwO5mopJD9gbSX6JYL6GLnfttfthC+dlST1ul8D6TX5lwcQk2lzJ9gvLb6anjpU pZl66xpHk2oG+mo0c/S0iimMKTVz8goiwQ6y+jRYcI492OHNGOzhS14AeNVHvVXtTr d1I3efCM+NdDWWgUMCJlwUsMVTw79+CDTnLcqMyHMbog6oXiD6Jh1vbbWQg5CeWaUy ZZk6ZhOqn9Ckg== Received: from xiongwei.. (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-hyfv10021501.me.com (Postfix) with ESMTPSA id 2C39F2C0221; Sat, 9 Dec 2023 13:52:28 +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, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Xiongwei Song Subject: [PATCH v3 1/4] Documentation: kernel-parameters: remove noaliencache Date: Sat, 9 Dec 2023 21:52:00 +0800 Message-Id: <20231209135203.303508-2-sxwjean@me.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231209135203.303508-1-sxwjean@me.com> References: <20231209135203.303508-1-sxwjean@me.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 383jkZtHx_QieSF1aujsIMLABp7ydMQp X-Proofpoint-GUID: 383jkZtHx_QieSF1aujsIMLABp7ydMQp X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E517=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E11=2E64=2E514=2E0000000_definitions=3D2022-06-21=5F?= =?utf-8?q?01=3A2022-06-21=5F01=2C2020-02-14=5F11=2C2022-02-23=5F01_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 clxscore=1015 spamscore=0 malwarescore=0 mlxlogscore=731 mlxscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2312090120 X-Rspamd-Queue-Id: 61C29C0008 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: sqgp5a3wmsqpwozbi1maw4mtuhyn3rbr X-HE-Tag: 1702129956-321493 X-HE-Meta: U2FsdGVkX1+kJH+GfaAJ6Hjqbdstut8AYovxSE92yNLNq8nwIBgCIZ/Dd1EZy65jHoKQEd8hK6EeIlYwdcdIG622WCmShXUlSm003iNHOdGV2e2lCX9XPCwnlpBUs41pjFfNqh4CD59MDRX1MFAwiciIe7d/hhBSDU2Bx4dDZtvq1LnQkx/wl7Pe9mxG541cp6C+2WdlStQ4wyasletQnxI8SWFhn/BMP6AKkguS/WWl0UplR8pWfHPEqwOWvzYNfj/9aRMgu0E523RuPt2STSeHDdfl75UFbZTxue/yMO2rlxU4w1ujFJ5EhkJvw0SGDqeNewlnc7mwBENVY34JLway3M97TisDVKo4815dVGXKotl9cVrJ7XbOKhFhXsFeTErVfnDhxYCMRZDJpteA8by+JUunUsKN2uJizGAuUqKqVsyXvM6eYB262QFX9lFVegENZoyOOKADKuVvrDailYRLZmCyvHn7ftIkjFw6Zn8J8dYXXJv2hluPm85XA3bpQjmIKGSV9X6xZqgFj2xhxf96m0oArwKQmEwc2QxqeUtzPjBitlZDWfYkyvafOshJJKtdT0BynfZBG5emgw9P3P6QfnK+7LCOwbpoqNWEzaLttZ8z8sztAIiiCmLkInQY5ujarM5HRzCX0jgMFFUZ6uPFJhOQoIexWg0y+w+/4upNNDZeCeoO5Cq3ImhlMMcs9ecd0/mfTzHRb1Z4UOCDHwUylTZN56Q4hNRD/V+jEwzbo7f23zrVQROBDpO1/tXh3yU/R9qnotyc/TMztr3PWYwR79P+N7fxQW0FnUT/uWH4HrVIqipyhcvXmY6GeoDHm4v3kSadsgv0RBQevVtwq6DgtdfbfRQ1NvIyB79vXSYrj+RWx9fjB86aY323/umFxM2GNXVZ90zwLZLAgWuoFhK0lbDP6PHgUCIH88fNUcfj4YKJUlb3O4PWnz5eETKVqECf5el9Lx/ca4bQqsb QNNJK5Xs npZDtgyFim01MJIYiAHSYhW7M9nQDXBbj7zfiSOm3mnAK2sGVnjz9wlFcTZ2qAcxlyI+P3OI6itB6HJp8EbWy+n0angDNhvMaCnjhO07m7s+ae3IKwxGkn+THVoFcc4unNS1PwDnkPDFaz1qRBQWeVa+ZHlDZFgF0OgeJeSDRLatW8cdJ9+ZNXZZwXMONpMX6bYH+dJn4k8GwA2mqj+2anAwVXyoeot7H8swIOQf/t3MCiMj8/hfwJY6pmoODdyZOiDcS8WhYreyejFv0Gmx3n9W6nf28iQqt8o63RV7ruVz8Iiljfs9jPgbquUAV8Epf9MVDi2Ou/VAjjJ2QjcSl3DK5w5j2k97l2vEYpET7La+8At37N3qJQ/WoiJivLrl6SHqrr+qPDQ6O92Os+x3ymC/5f6EAXCVymNtbn/2x2czViNLj/qeSXRHdAQu1qN5JS+k+FannJwpMT939YF3U8wDecpoOIkPsiy8QSw3K9wrTKaYqLR019uy1Gx2XK1AlfBKc X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Xiongwei Song ince slab allocator has already been removed. There is no users of the noaliencachei parameter, so let's remove it. Suggested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Kees Cook Reviewed-by: Vlastimil Babka Signed-off-by: Xiongwei Song --- v5: Collect Reviewed-by tag. v4: Collect Reviewed-by tag. v3: Remove the changes for slab_max_order. v2: Add changes for removing "noaliencache". https://lore.kernel.org/linux-mm/20231122143603.85297-1-sxwjean@me.com/ v1: Remove slab_max_order. https://lore.kernel.org/linux-mm/20231120091214.150502-2-sxwjean@me.com/ --- Documentation/admin-guide/kernel-parameters.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 65731b060e3f..9f94baeb2f82 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -3740,10 +3740,6 @@ no5lvl [X86-64,RISCV] Disable 5-level paging mode. Forces kernel to use 4-level paging instead. - noaliencache [MM, NUMA, SLAB] Disables the allocation of alien - caches in the slab allocator. Saves per-node memory, - but will impact performance. - noalign [KNL,ARM] noaltinstr [S390] Disables alternative instructions patching From patchwork Sat Dec 9 13:52:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiongwei Song X-Patchwork-Id: 13486037 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55BFCC4167B for ; Sat, 9 Dec 2023 13:52:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DB1186B0080; Sat, 9 Dec 2023 08:52:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D61176B0081; Sat, 9 Dec 2023 08:52:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C29116B0082; Sat, 9 Dec 2023 08:52:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B28126B0080 for ; Sat, 9 Dec 2023 08:52:47 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 87BA81C0AD2 for ; Sat, 9 Dec 2023 13:52:47 +0000 (UTC) X-FDA: 81547420374.25.1D8BEB8 Received: from pv50p00im-hyfv10021501.me.com (pv50p00im-hyfv10021501.me.com [17.58.6.48]) by imf14.hostedemail.com (Postfix) with ESMTP id 97A31100026 for ; Sat, 9 Dec 2023 13:52:45 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=me.com header.s=1a1hai header.b=f7vPrUuI; spf=pass (imf14.hostedemail.com: domain of sxwjean@me.com designates 17.58.6.48 as permitted sender) smtp.mailfrom=sxwjean@me.com; dmarc=pass (policy=quarantine) header.from=me.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702129965; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4x0IEXH0HIz9vzyOmEKgZ6m9PioTK+nk3IDN8AWtfRU=; b=sS13JSBRS0bcNEPKEabrm312fw62JNiDA6aVQjLLujTqL55+Yl9+Ckjmclztt2cHINKY1g Oys4tNm7ufLEMiTM8MqcmZ+LbiY6ztTSRn0BIKtaPpTBuVxDXtzCe7/yG5OGNudDHGcNti 7Wr0XEObl6ZukSejp7hQfFYrnljnuLU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702129965; a=rsa-sha256; cv=none; b=8reHxmKYYPBax2aQ2wqMdzc/Iwid34cBKJ9czpp/TLv630jAbDQ9/hK9of2UGgQsGaWxmZ x3yF9AVAn9IpcV82WLplAOZdPOIjcB+WCVDlG/4WGYfvrk7hqr5fiXdTKhOpKjIml2jF+/ LsZ1LWiL6xFxT6grs7bTbajRhgLFyBo= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=me.com header.s=1a1hai header.b=f7vPrUuI; spf=pass (imf14.hostedemail.com: domain of sxwjean@me.com designates 17.58.6.48 as permitted sender) smtp.mailfrom=sxwjean@me.com; dmarc=pass (policy=quarantine) header.from=me.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1702129964; bh=4x0IEXH0HIz9vzyOmEKgZ6m9PioTK+nk3IDN8AWtfRU=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=f7vPrUuIzWkJCQQHlhcj0rkUul7orBzmE++JOQ1M52Lv3if8Qco99hmS3Yh6+jQd7 km4uh5IQghVQKxWnggfi1UVRDkLabQJqc0M6qIlN0n85HJXoyKPNL7bKeWMARyBm0y EKGflEH+Dnq/q8zE+/GHwzoScCH4jglY5d+OOCRFf8hLUvz6P0FyQgzLohhKRHljPx aiUmEvfUvB/HHIsJD8MeYAWJ5ByE593X2cmNPh4gcOEcFgoc4iANmTKMFnM9T0BLZk tLdHgxKT89+Tea2wuLLD3yVs9Y4RosZsHQrEOsd1vVfxYED2REvqKLfoxeKct+5Zyn q23DN0hL8KOSQ== Received: from xiongwei.. (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-hyfv10021501.me.com (Postfix) with ESMTPSA id 640B32C00C4; Sat, 9 Dec 2023 13:52:38 +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, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Xiongwei Song Subject: [PATCH v3 2/4] mm/slub: unify all sl[au]b parameters with "slab_$param" Date: Sat, 9 Dec 2023 21:52:01 +0800 Message-Id: <20231209135203.303508-3-sxwjean@me.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231209135203.303508-1-sxwjean@me.com> References: <20231209135203.303508-1-sxwjean@me.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 3xmwYyDada9BY3mSwo_5OEGI2PkL0RFr X-Proofpoint-GUID: 3xmwYyDada9BY3mSwo_5OEGI2PkL0RFr X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E517=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E11=2E64=2E514=2E0000000_definitions=3D2022-06-21=5F?= =?utf-8?q?01=3A2022-06-21=5F01=2C2020-02-14=5F11=2C2022-02-23=5F01_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 clxscore=1015 spamscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2312090120 X-Stat-Signature: r4mdqgn9eqddrgj1exkuww8w14tr43mp X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 97A31100026 X-Rspam-User: X-HE-Tag: 1702129965-401689 X-HE-Meta: U2FsdGVkX1/nnQBDIcUtYEX+u03a0BVhI0PuCZTfuQSyecIZiB1w4wOQjgQtoBo6IVnzNOggfve3oKukncFwgKjdUW5KwzsmlPmfyaODf7s4r/o/sC/CSFZ/Pzun1n+IgXBqf6R0BjcQrxId2MQt5gK+OXVJrqQ2FZKFY+v6F96Z/qZAftsxOTixVA80K7nyTOcpK2ijw0dMkXcxfIX2esdvQFCAowc1Y/lRQJsUf1WN7HHf5aeoXIDI6xPwenYdMAJ6G8pwVJ+I37LLnNxRj6zMpmxL1na9CZg3WDCG23GiwfRmlWn9GnBPfUc5uVJodAq9JRtpmVWSWZK14dDPiu3LCqME2N2nGyhnCQbVnHU4pIVgKFeVDKr+HcFePYMIA0LfH5E6NVnAyDQQNs4Mz4HheYmTuayf0f0hf8yK5q9UuV7MtW1YVPqNuWwLAXPhBe29fz7l6CREz7zI8BKqyZOrFzqlvK5sjNb9WMwPQzxwyOmKLPNwzuBJW34vTimi2l348r720Qrlbg2/5aPBQXvaHWVTULhTx+32UJpMCxixzzlJFfCBBoLIPLGnZzbeXbA1WG72hqkQhYWNwO7WFUlR6prooMfzNMBHDdgUYrSjoY0QHbvx38rSC8e8374zfccaqORm+uPj7CKq/Nj1o1fmaCDOR4W7JkKHH6L7k/lzLJve08WqfOBTw1A47DEp8McEG03y6LISu8d0bJLNdNgQK8haKkNagVMppEtvfj1vkXYvA9rvomzx+0cunL0rSFmWC3Rsap46r98V3dbbkGQZ1CHiDWseNY+rYGtiFmdefsyAydh5sDJm8MuVl41P6smJmn/hgXseiUqC4wybfdtiK7RuuZLiIHTKgTbI+oNPYIgVbDo9NOPbzUwmCCUCmDzvoJXAZXI0+5OBuTW1T3iC5olV3kLtW/Jkxuk0Q5vTWjh3p+VhzpO7KRyECtUZtCe3SdDkMuzB1dnlj4f E3k8347o 7zbrHgKFMgDOCixnfrJB4asV54id3B4h2GVXE0jOYHNVaH/BhjOx9zBwzvkTsNuT7xsRQ8b64yk69ObIB6cLKoy0JJ9uPDQbuX/EpTFpLPZrSSt7Qc3xoPBEcsf77SELih8/VdcbuFDoCKvkcjvFp9r+V4oZ6muto9sLL2HGoIzwFpSj+RYsecIOTfQ9+rK0wbve62aguc0df6qyTmHalEVz1MXlTLeXjQllTCR/riY/QY0RqkTackOVXFAhGcZteLw2gestspWuuB/l9Uz27UtyKdwYNIGQ17VtSVtbc+NkOkDXC7l6JNbQyxAt8i8ylLANW5ESYFRV7MAOhtSsMhVIiebGvWyTyEp5vrXZHSkEQ6F1sOUGIA1kebJcH9R3U8df4uy4yPKpTTBasoj9OgiLu3YPtnCeXKFmpU0sl9V9G/y9NBIMctMpf6iVmqcvpvQeZVXzJC5YH0KLjMzabL2+bTUlv181fNzUW3TnFQtmn6yjKqCl9EqaG5A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Xiongwei Song Since the SLAB allocator has been removed, so we can clean up the sl[au]b_$params. With only one slab allocator left, it's better to use the generic "slab" term instead of "slub" which is an implementation detail, which is pointed out by Vlastimil Babka. For more information please see [1]. Hence, we are going to use "slab_$param" as the primary prefix. This patch is changing the following slab parameters - slub_max_order - slub_min_order - slub_min_objects - slub_debug to - slab_max_order - slab_min_order - slab_min_objects - slab_debug as the primary slab parameters for all references of them in docs and comments. But this patch won't change variables and functions inside slub as we will have wider slub/slab change. Meanwhile, "slub_$params" can also be passed by command line, which is to keep backward compatibility. Also mark all "slub_$params" as legacy. Remove the separate descriptions for slub_[no]merge, append legacy tip for them at the end of descriptions of slab_[no]merge. [1] https://lore.kernel.org/linux-mm/7512b350-4317-21a0-fab3-4101bc4d8f7a@suse.cz/ Signed-off-by: Xiongwei Song --- .../admin-guide/kernel-parameters.txt | 71 +++++++++---------- drivers/misc/lkdtm/heap.c | 2 +- mm/Kconfig.debug | 6 +- mm/slab.h | 2 +- mm/slab_common.c | 4 +- mm/slub.c | 41 ++++++----- 6 files changed, 62 insertions(+), 64 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 9f94baeb2f82..abfc0838feb9 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -5864,65 +5864,58 @@ simeth= [IA-64] simscsi= - slram= [HW,MTD] - - slab_merge [MM] - Enable merging of slabs with similar size when the - kernel is built without CONFIG_SLAB_MERGE_DEFAULT. - - slab_nomerge [MM] - Disable merging of slabs with similar size. May be - necessary if there is some reason to distinguish - allocs to different slabs, especially in hardened - environments where the risk of heap overflows and - layout control by attackers can usually be - frustrated by disabling merging. This will reduce - most of the exposure of a heap attack to a single - cache (risks via metadata attacks are mostly - unchanged). Debug options disable merging on their - own. - For more information see Documentation/mm/slub.rst. - - slab_max_order= [MM, SLAB] - Determines the maximum allowed order for slabs. - A high setting may cause OOMs due to memory - fragmentation. Defaults to 1 for systems with - more than 32MB of RAM, 0 otherwise. - - slub_debug[=options[,slabs][;[options[,slabs]]...] [MM, SLUB] - Enabling slub_debug allows one to determine the + slab_debug[=options[,slabs][;[options[,slabs]]...] [MM] + Enabling slab_debug allows one to determine the culprit if slab objects become corrupted. Enabling - slub_debug can create guard zones around objects and + slab_debug can create guard zones around objects and may poison objects when not in use. Also tracks the last alloc / free. For more information see Documentation/mm/slub.rst. + (slub_debug legacy name also accepted for now) - slub_max_order= [MM, SLUB] + slab_max_order= [MM] Determines the maximum allowed order for slabs. A high setting may cause OOMs due to memory fragmentation. For more information see Documentation/mm/slub.rst. + (slub_max_order legacy name also accepted for now) + + slab_merge [MM] + Enable merging of slabs with similar size when the + kernel is built without CONFIG_SLAB_MERGE_DEFAULT. + (slub_merge legacy name also accepted for now) - slub_min_objects= [MM, SLUB] + slab_min_objects= [MM] The minimum number of objects per slab. SLUB will - increase the slab order up to slub_max_order to + increase the slab order up to slab_max_order to generate a sufficiently large slab able to contain the number of objects indicated. The higher the number of objects the smaller the overhead of tracking slabs and the less frequently locks need to be acquired. For more information see Documentation/mm/slub.rst. + (slub_min_objects legacy name also accepted for now) - slub_min_order= [MM, SLUB] + slab_min_order= [MM] Determines the minimum page order for slabs. Must be - lower than slub_max_order. - For more information see Documentation/mm/slub.rst. + lower or equal to slab_max_order. For more information see + Documentation/mm/slub.rst. + (slub_min_order legacy name also accepted for now) - slub_merge [MM, SLUB] - Same with slab_merge. + slab_nomerge [MM] + Disable merging of slabs with similar size. May be + necessary if there is some reason to distinguish + allocs to different slabs, especially in hardened + environments where the risk of heap overflows and + layout control by attackers can usually be + frustrated by disabling merging. This will reduce + most of the exposure of a heap attack to a single + cache (risks via metadata attacks are mostly + unchanged). Debug options disable merging on their + own. + For more information see Documentation/mm/slub.rst. + (slub_nomerge legacy name also accepted for now) - slub_nomerge [MM, SLUB] - Same with slab_nomerge. This is supported for legacy. - See slab_nomerge for more information. + slram= [HW,MTD] smart2= [HW] Format: [,[,...,]] diff --git a/drivers/misc/lkdtm/heap.c b/drivers/misc/lkdtm/heap.c index 0ce4cbf6abda..076ca9b225de 100644 --- a/drivers/misc/lkdtm/heap.c +++ b/drivers/misc/lkdtm/heap.c @@ -47,7 +47,7 @@ static void lkdtm_VMALLOC_LINEAR_OVERFLOW(void) * correctly. * * This should get caught by either memory tagging, KASan, or by using - * CONFIG_SLUB_DEBUG=y and slub_debug=ZF (or CONFIG_SLUB_DEBUG_ON=y). + * CONFIG_SLUB_DEBUG=y and slab_debug=ZF (or CONFIG_SLUB_DEBUG_ON=y). */ static void lkdtm_SLAB_LINEAR_OVERFLOW(void) { diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug index 321ab379994f..afc72fde0f03 100644 --- a/mm/Kconfig.debug +++ b/mm/Kconfig.debug @@ -64,11 +64,11 @@ config SLUB_DEBUG_ON help Boot with debugging on by default. SLUB boots by default with the runtime debug capabilities switched off. Enabling this is - equivalent to specifying the "slub_debug" parameter on boot. + equivalent to specifying the "slab_debug" parameter on boot. There is no support for more fine grained debug control like - possible with slub_debug=xxx. SLUB debugging may be switched + possible with slab_debug=xxx. SLUB debugging may be switched off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying - "slub_debug=-". + "slab_debug=-". config PAGE_OWNER bool "Track page owner" diff --git a/mm/slab.h b/mm/slab.h index 54deeb0428c6..f7df6d701c5b 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -528,7 +528,7 @@ static inline bool __slub_debug_enabled(void) #endif /* - * Returns true if any of the specified slub_debug flags is enabled for the + * Returns true if any of the specified slab_debug flags is enabled for the * cache. Use only for flags parsed by setup_slub_debug() as it also enables * the static key. */ diff --git a/mm/slab_common.c b/mm/slab_common.c index 238293b1dbe1..230ef7cc3467 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -282,7 +282,7 @@ kmem_cache_create_usercopy(const char *name, #ifdef CONFIG_SLUB_DEBUG /* - * If no slub_debug was enabled globally, the static key is not yet + * If no slab_debug was enabled globally, the static key is not yet * enabled by setup_slub_debug(). Enable it if the cache is being * created with any of the debugging flags passed explicitly. * It's also possible that this is the first cache created with @@ -766,7 +766,7 @@ EXPORT_SYMBOL(kmalloc_size_roundup); } /* - * kmalloc_info[] is to make slub_debug=,kmalloc-xx option work at boot time. + * kmalloc_info[] is to make slab_debug=,kmalloc-xx option work at boot time. * kmalloc_index() supports up to 2^21=2MB, so the final entry of the table is * kmalloc-2M. */ diff --git a/mm/slub.c b/mm/slub.c index 3f8b95757106..6efff3f47be2 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -280,7 +280,7 @@ static inline bool kmem_cache_has_cpu_partial(struct kmem_cache *s) /* * Debugging flags that require metadata to be stored in the slab. These get - * disabled when slub_debug=O is used and a cache's min order increases with + * disabled when slab_debug=O is used and a cache's min order increases with * metadata. */ #define DEBUG_METADATA_FLAGS (SLAB_RED_ZONE | SLAB_POISON | SLAB_STORE_USER) @@ -1582,7 +1582,7 @@ static inline int free_consistency_checks(struct kmem_cache *s, } /* - * Parse a block of slub_debug options. Blocks are delimited by ';' + * Parse a block of slab_debug options. Blocks are delimited by ';' * * @str: start of block * @flags: returns parsed flags, or DEBUG_DEFAULT_FLAGS if none specified @@ -1643,7 +1643,7 @@ parse_slub_debug_flags(char *str, slab_flags_t *flags, char **slabs, bool init) break; default: if (init) - pr_err("slub_debug option '%c' unknown. skipped\n", *str); + pr_err("slab_debug option '%c' unknown. skipped\n", *str); } } check_slabs: @@ -1702,7 +1702,7 @@ static int __init setup_slub_debug(char *str) /* * For backwards compatibility, a single list of flags with list of * slabs means debugging is only changed for those slabs, so the global - * slub_debug should be unchanged (0 or DEBUG_DEFAULT_FLAGS, depending + * slab_debug should be unchanged (0 or DEBUG_DEFAULT_FLAGS, depending * on CONFIG_SLUB_DEBUG_ON). We can extended that to multiple lists as * long as there is no option specifying flags without a slab list. */ @@ -1726,7 +1726,8 @@ static int __init setup_slub_debug(char *str) return 1; } -__setup("slub_debug", setup_slub_debug); +__setup("slab_debug", setup_slub_debug); +__setup_param("slub_debug", slub_debug, setup_slub_debug, 0); /* * kmem_cache_flags - apply debugging options to the cache @@ -1736,7 +1737,7 @@ __setup("slub_debug", setup_slub_debug); * * Debug option(s) are applied to @flags. In addition to the debug * option(s), if a slab name (or multiple) is specified i.e. - * slub_debug=,, ... + * slab_debug=,, ... * then only the select slabs will receive the debug option(s). */ slab_flags_t kmem_cache_flags(unsigned int object_size, @@ -3285,7 +3286,7 @@ slab_out_of_memory(struct kmem_cache *s, gfp_t gfpflags, int nid) oo_order(s->min)); if (oo_order(s->min) > get_order(s->object_size)) - pr_warn(" %s debugging increased min order, use slub_debug=O to disable.\n", + pr_warn(" %s debugging increased min order, use slab_debug=O to disable.\n", s->name); for_each_kmem_cache_node(s, node, n) { @@ -3778,11 +3779,11 @@ void slab_post_alloc_hook(struct kmem_cache *s, struct obj_cgroup *objcg, zero_size = orig_size; /* - * When slub_debug is enabled, avoid memory initialization integrated + * When slab_debug is enabled, avoid memory initialization integrated * into KASAN and instead zero out the memory via the memset below with * the proper size. Otherwise, KASAN might overwrite SLUB redzones and * cause false-positive reports. This does not lead to a performance - * penalty on production builds, as slub_debug is not intended to be + * penalty on production builds, as slab_debug is not intended to be * enabled there. */ if (__slub_debug_enabled()) @@ -4658,8 +4659,8 @@ static unsigned int slub_min_objects; * activity on the partial lists which requires taking the list_lock. This is * less a concern for large slabs though which are rarely used. * - * slub_max_order specifies the order where we begin to stop considering the - * number of objects in a slab as critical. If we reach slub_max_order then + * slab_max_order specifies the order where we begin to stop considering the + * number of objects in a slab as critical. If we reach slab_max_order then * we try to keep the page order as low as possible. So we accept more waste * of space in favor of a small page order. * @@ -4726,14 +4727,14 @@ static inline int calculate_order(unsigned int size) * and backing off gradually. * * We start with accepting at most 1/16 waste and try to find the - * smallest order from min_objects-derived/slub_min_order up to - * slub_max_order that will satisfy the constraint. Note that increasing + * smallest order from min_objects-derived/slab_min_order up to + * slab_max_order that will satisfy the constraint. Note that increasing * the order can only result in same or less fractional waste, not more. * * If that fails, we increase the acceptable fraction of waste and try * again. The last iteration with fraction of 1/2 would effectively * accept any waste and give us the order determined by min_objects, as - * long as at least single object fits within slub_max_order. + * long as at least single object fits within slab_max_order. */ for (unsigned int fraction = 16; fraction > 1; fraction /= 2) { order = calc_slab_order(size, min_order, slub_max_order, @@ -4743,7 +4744,7 @@ static inline int calculate_order(unsigned int size) } /* - * Doh this slab cannot be placed using slub_max_order. + * Doh this slab cannot be placed using slab_max_order. */ order = get_order(size); if (order <= MAX_ORDER) @@ -5269,7 +5270,9 @@ static int __init setup_slub_min_order(char *str) return 1; } -__setup("slub_min_order=", setup_slub_min_order); +__setup("slab_min_order=", setup_slub_min_order); +__setup_param("slub_min_order=", slub_min_order, setup_slub_min_order, 0); + static int __init setup_slub_max_order(char *str) { @@ -5282,7 +5285,8 @@ static int __init setup_slub_max_order(char *str) return 1; } -__setup("slub_max_order=", setup_slub_max_order); +__setup("slab_max_order=", setup_slub_max_order); +__setup_param("slub_max_order=", slub_max_order, setup_slub_max_order, 0); static int __init setup_slub_min_objects(char *str) { @@ -5291,7 +5295,8 @@ static int __init setup_slub_min_objects(char *str) return 1; } -__setup("slub_min_objects=", setup_slub_min_objects); +__setup("slab_min_objects=", setup_slub_min_objects); +__setup_param("slub_min_objects=", slub_min_objects, setup_slub_min_objects, 0); #ifdef CONFIG_HARDENED_USERCOPY /* From patchwork Sat Dec 9 13:52:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiongwei Song X-Patchwork-Id: 13486038 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E2CAC4167B for ; Sat, 9 Dec 2023 13:53:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C03456B0082; Sat, 9 Dec 2023 08:53:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BB41F6B0083; Sat, 9 Dec 2023 08:53:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A7BB06B0085; Sat, 9 Dec 2023 08:53:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 9A2946B0082 for ; Sat, 9 Dec 2023 08:53:10 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 743ABA03B1 for ; Sat, 9 Dec 2023 13:53:10 +0000 (UTC) X-FDA: 81547421340.22.C684E97 Received: from pv50p00im-hyfv10021501.me.com (pv50p00im-hyfv10021501.me.com [17.58.6.48]) by imf14.hostedemail.com (Postfix) with ESMTP id 94C4E100019 for ; Sat, 9 Dec 2023 13:53:08 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=me.com header.s=1a1hai header.b=hxJXhvX9; spf=pass (imf14.hostedemail.com: domain of sxwjean@me.com designates 17.58.6.48 as permitted sender) smtp.mailfrom=sxwjean@me.com; dmarc=pass (policy=quarantine) header.from=me.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702129988; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pu4d5aNzA1zqsUzUFwgPinQJl+CtlywCevtlg+7cEw8=; b=w9rOmE78FsaZ2svXL+CzLD40J5+tPz1RtCyzdEuP9BwClCVrx23CDa51xww+WYV6a/VJ+y 7vGxtg1YTytNYPYXv4lcuUnLxJh+eH3wf4meg6UJoJ53uT0/nj74YppRhSk3C3pHJQLkuO t9w+WCeGbDu+ebIgWwu9d07kqkHbimM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702129988; a=rsa-sha256; cv=none; b=fLl+6Sf2/O2Z5mPvDSVFjEmQq5tmRY03TVUg2K8DU2l79594s6b68NCii+oV/JLdXXkYCJ OeH07gX5ZDUvAIlUnZXU11rD7K/jlBOGOCw6MkdoNfGmXveBc2DF6KMgRJEo+bGjCc4B2d vkpQRf4K67whu69CnoOTKjAHh29xD4g= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=me.com header.s=1a1hai header.b=hxJXhvX9; spf=pass (imf14.hostedemail.com: domain of sxwjean@me.com designates 17.58.6.48 as permitted sender) smtp.mailfrom=sxwjean@me.com; dmarc=pass (policy=quarantine) header.from=me.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1702129987; bh=pu4d5aNzA1zqsUzUFwgPinQJl+CtlywCevtlg+7cEw8=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=hxJXhvX99rAEI4XvoqtIvhp/bFbd2J/Dt50yXwCr/6gp9qq9Wt6yf+iocsUTOCwZ2 M2nQ1cD8aJjsvig8/WHQsCyNcQCOxW+Ao7LTKpyT5GRQhG4tBeYHPggs6moF1HDTV9 1HO0GF4tSwR7cK24KusEXKaLSsrom6fZKNE0gNfQhNRwxCRs02EPKHH6tk5ineBgyw VaMJGXpiM7OTZGuKLzNqjBElz7T7LcmTh0cOc/QRu2l0lrXehSL+hUWfN7hn8uaZg7 Zshg5p73CodN5hMLQHF252P1xKAh2l/yVMnRWoarj74vJtgGWcp2lDbbMl/JKuFXlV EqeEOlp2EMOXw== Received: from xiongwei.. (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-hyfv10021501.me.com (Postfix) with ESMTPSA id 4E10E2C0221; Sat, 9 Dec 2023 13:53:00 +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, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Xiongwei Song Subject: [PATCH v3 3/4] mm/slub: replace slub_$params with slab_$params in slub.rst Date: Sat, 9 Dec 2023 21:52:02 +0800 Message-Id: <20231209135203.303508-4-sxwjean@me.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231209135203.303508-1-sxwjean@me.com> References: <20231209135203.303508-1-sxwjean@me.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: qref7kSeqWRSZ726OJVyoA5Wf2IyvW6q X-Proofpoint-GUID: qref7kSeqWRSZ726OJVyoA5Wf2IyvW6q X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E517=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E11=2E64=2E514=2E0000000_definitions=3D2022-06-21=5F?= =?utf-8?q?01=3A2022-06-21=5F01=2C2020-02-14=5F11=2C2022-02-23=5F01_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 clxscore=1015 spamscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2312090120 X-Rspamd-Queue-Id: 94C4E100019 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: qgrny7c1b4rtq31hic4k6xor1g3rfc5x X-HE-Tag: 1702129988-371961 X-HE-Meta: U2FsdGVkX1/IK3DQN1X46BdoJAo5wFPO6x5ZerYQH6YTgIHty3sWHht7tUPnNFmBPVqM2gtITg5S6bCPW99bF8nyBWoA4ctHWXz5Jry8xg0bbNFVGG/jX8y8XRiesS7WBVFurIHAHfRNV1rRemX/W2LhiZOyrR4CJgTqzcyTt966zJlRBjYcvjQ/55baL0jEqen+QCH7C31CbA9kpVudQq26GwEX/hYxKy4MjLgRGoNeD3FNYTlMXAlaST0Qa8FO0mog9Dcrz/3EgvriTHlXGO1jLnGiT7EiJX2Q35A+dNHH151sl15ASeWe2ziTwIQo2MFET30oDfqr6VJSSPcZOP69hSzJyyfGRJpoeOGMDO6auIOT4g9xvmerMf0IWNOWdrIqHLqxE1rhYpeBeb5a00BIOyqZS0IiehQXRWZsRoU+68RN6MpS15PCtoTy0AJ3Twzt/BL3IvjiqF7jCODeuvKLO5LZHhnwLzHGQ5tHT9JXN/osJW0oltyE7rJJrEcF91Hk7476Zbyc1BFARNtQJeG59a3+FgnP17O3vwk28SNwt/irmyN/Jzn98HOiKBVn0QxoaUTvSj4HVeziUnV92gFbhqYeW+idaSSJYXFzwTNcf90rLv3H7bbe1D5bhWyBNBD+rUlOfsvwTvhZQSiP0zS+UFnSTAK8bOw3Ea6akb/1O8nH12mw9zU3ki7jg1oSJ5rAR0ZXwphiKeNEBhsoo03cProJHqJWqKl9gcBYyIxhhs+QBKeFEbxHd5mBJCfPuDZqoUi+pmg3yNT1azqg65AM5Q1pQ4FCD2bNHRfE2Un6dQcSmsyIDCH1Loa+xKG4Jkg32s1+L1gP/hbIUfdWqrEBY16z5BYoNpfXTwhq9dZVS7Gtk+o3CqiSHJlpL2EqPPdyBwSfGsig+jB9xG98JVlI02Cyztzkjh6nk+KeKrA4f9KZpahcce3O/xoqblAfgnEEOmt3koSlUVvidEo jsZs8F8D HAeNU1Lw0QDtt0KcDsMGtGvabouiFi90vbW2NCmlCcDuNjakhpYeNmSGdUF7Kv86HQZJ6o2AsqGDRCbI7fKy5pDa1IkS6/xs0kAGSCjNO6ZlkgFO39tA8fckRpLqWoTp2m4nfpOW+QXZScQzHSwy4zmliUPJKmpZM9LirAhZ0qBnCAaNENwfG8d6Bewinx9CMl3sBf8utUkfbxJm5J3QJMl87R4FRTxT3a+g40jQ8F32WD5Dsdgd3jRrmzALh0VIgbyH4+Ye4WJE6U2wqm74UpDgf3XT39BVTHVMm9JoJ02UFsrStm90EBMf+c4OQf+3RUI+Kb/CCph4FQTyhHy25LWG2VUn4RKmAGAJ8sA8MimcaZxHldkaggGPtdEf65PCEQcYnP+nn/Ta/E+uGt8clRwaZ90cKUtiWpfPWkb3fFY1vLc3hFQ0Tr+xqeahsm3U26k70eZICl0qo9c3d3wfq0GrIBA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Xiongwei Song We've unified slab parameters with "slab_$params", then we can use slab_$params in Documentation/mm/slub.rst. Signed-off-by: Xiongwei Song --- Documentation/mm/slub.rst | 60 +++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/Documentation/mm/slub.rst b/Documentation/mm/slub.rst index be75971532f5..6579a55b7852 100644 --- a/Documentation/mm/slub.rst +++ b/Documentation/mm/slub.rst @@ -9,7 +9,7 @@ SLUB can enable debugging only for selected slabs in order to avoid an impact on overall system performance which may make a bug more difficult to find. -In order to switch debugging on one can add an option ``slub_debug`` +In order to switch debugging on one can add an option ``slab_debug`` to the kernel command line. That will enable full debugging for all slabs. @@ -26,16 +26,16 @@ be enabled on the command line. F.e. no tracking information will be available without debugging on and validation can only partially be performed if debugging was not switched on. -Some more sophisticated uses of slub_debug: +Some more sophisticated uses of slab_debug: ------------------------------------------- -Parameters may be given to ``slub_debug``. If none is specified then full +Parameters may be given to ``slab_debug``. If none is specified then full debugging is enabled. Format: -slub_debug= +slab_debug= Enable options for all slabs -slub_debug=,,,... +slab_debug=,,,... Enable options only for select slabs (no spaces after a comma) @@ -60,23 +60,23 @@ Possible debug options are:: F.e. in order to boot just with sanity checks and red zoning one would specify:: - slub_debug=FZ + slab_debug=FZ Trying to find an issue in the dentry cache? Try:: - slub_debug=,dentry + slab_debug=,dentry to only enable debugging on the dentry cache. You may use an asterisk at the end of the slab name, in order to cover all slabs with the same prefix. For example, here's how you can poison the dentry cache as well as all kmalloc slabs:: - slub_debug=P,kmalloc-*,dentry + slab_debug=P,kmalloc-*,dentry Red zoning and tracking may realign the slab. We can just apply sanity checks to the dentry cache with:: - slub_debug=F,dentry + slab_debug=F,dentry Debugging options may require the minimum possible slab order to increase as a result of storing the metadata (for example, caches with PAGE_SIZE object @@ -84,20 +84,20 @@ sizes). This has a higher liklihood of resulting in slab allocation errors in low memory situations or if there's high fragmentation of memory. To switch off debugging for such caches by default, use:: - slub_debug=O + slab_debug=O You can apply different options to different list of slab names, using blocks of options. This will enable red zoning for dentry and user tracking for kmalloc. All other slabs will not get any debugging enabled:: - slub_debug=Z,dentry;U,kmalloc-* + slab_debug=Z,dentry;U,kmalloc-* You can also enable options (e.g. sanity checks and poisoning) for all caches except some that are deemed too performance critical and don't need to be debugged by specifying global debug options followed by a list of slab names with "-" as options:: - slub_debug=FZ;-,zs_handle,zspage + slab_debug=FZ;-,zs_handle,zspage The state of each debug option for a slab can be found in the respective files under:: @@ -105,7 +105,7 @@ under:: /sys/kernel/slab// If the file contains 1, the option is enabled, 0 means disabled. The debug -options from the ``slub_debug`` parameter translate to the following files:: +options from the ``slab_debug`` parameter translate to the following files:: F sanity_checks Z red_zone @@ -129,7 +129,7 @@ in order to reduce overhead and increase cache hotness of objects. Slab validation =============== -SLUB can validate all object if the kernel was booted with slub_debug. In +SLUB can validate all object if the kernel was booted with slab_debug. In order to do so you must have the ``slabinfo`` tool. Then you can do :: @@ -150,29 +150,29 @@ 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_order=x (default 0) -.. slub_max_order=x (default 3 (PAGE_ALLOC_COSTLY_ORDER)) +.. slab_min_objects=x (default 4) +.. slab_min_order=x (default 0) +.. slab_max_order=x (default 3 (PAGE_ALLOC_COSTLY_ORDER)) -``slub_min_objects`` +``slab_min_objects`` allows to specify how many objects must at least fit into one slab in order for the allocation order to be acceptable. In general slub will be able to perform this number of allocations on a slab without consulting centralized resources (list_lock) where contention may occur. -``slub_min_order`` +``slab_min_order`` specifies a minimum order of slabs. A similar effect like - ``slub_min_objects``. + ``slab_min_objects``. -``slub_max_order`` - specified the order at which ``slub_min_objects`` should no +``slab_max_order`` + specified the order at which ``slab_min_objects`` should no longer be checked. This is useful to avoid SLUB trying to - generate super large order pages to fit ``slub_min_objects`` + generate super large order pages to fit ``slab_min_objects`` of a slab cache with large object sizes into one high order page. Setting command line parameter ``debug_guardpage_minorder=N`` (N > 0), forces setting - ``slub_max_order`` to 0, what cause minimum possible order of + ``slab_max_order`` to 0, what cause minimum possible order of slabs allocation. SLUB Debug output @@ -219,7 +219,7 @@ Here is a sample of slub debug output:: FIX kmalloc-8: Restoring Redzone 0xc90f6d28-0xc90f6d2b=0xcc If SLUB encounters a corrupted object (full detection requires the kernel -to be booted with slub_debug) then the following output will be dumped +to be booted with slab_debug) then the following output will be dumped into the syslog: 1. Description of the problem encountered @@ -239,7 +239,7 @@ into the syslog: pid= (Object allocation / free information is only available if SLAB_STORE_USER is - set for the slab. slub_debug sets that option) + set for the slab. slab_debug sets that option) 2. The object contents if an object was involved. @@ -262,7 +262,7 @@ into the syslog: the object boundary. (Redzone information is only available if SLAB_RED_ZONE is set. - slub_debug sets that option) + slab_debug sets that option) Padding
: Unused data to fill up the space in order to get the next object @@ -296,7 +296,7 @@ Emergency operations Minimal debugging (sanity checks alone) can be enabled by booting with:: - slub_debug=F + slab_debug=F This will be generally be enough to enable the resiliency features of slub which will keep the system running even if a bad kernel component will @@ -311,13 +311,13 @@ and enabling debugging only for that cache I.e.:: - slub_debug=F,dentry + slab_debug=F,dentry If the corruption occurs by writing after the end of the object then it may be advisable to enable a Redzone to avoid corrupting the beginning of other objects:: - slub_debug=FZ,dentry + slab_debug=FZ,dentry Extended slabinfo mode and plotting =================================== From patchwork Sat Dec 9 13:52:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiongwei Song X-Patchwork-Id: 13486039 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A539C4167B for ; Sat, 9 Dec 2023 13:53:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2189C6B0085; Sat, 9 Dec 2023 08:53:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1C8E76B0087; Sat, 9 Dec 2023 08:53:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0DEFE6B0088; Sat, 9 Dec 2023 08:53:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id F34166B0085 for ; Sat, 9 Dec 2023 08:53:19 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id D37E9A039F for ; Sat, 9 Dec 2023 13:53:19 +0000 (UTC) X-FDA: 81547421718.19.1DDE53E Received: from pv50p00im-hyfv10021501.me.com (pv50p00im-hyfv10021501.me.com [17.58.6.48]) by imf11.hostedemail.com (Postfix) with ESMTP id 141484000E for ; Sat, 9 Dec 2023 13:53:17 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=me.com header.s=1a1hai header.b="NbLX2F/c"; spf=pass (imf11.hostedemail.com: domain of sxwjean@me.com designates 17.58.6.48 as permitted sender) smtp.mailfrom=sxwjean@me.com; dmarc=pass (policy=quarantine) header.from=me.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702129998; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=C/CNUr2LNMn6Qo2xusn2tYrx0721oOslxNy000GbTmM=; b=afJ1cqi2YOXxLmwk2ImO7W/mck4jF6L6raGoAFXggwslBkqXQ89IM8f5foTm6RFNnrjDVz LmYNrxp+VYN+/brff1KiUXa2lI0Li9Ef/k7JXVn2vUTCrgwbkkSLW4X5pq1LD5OuH+g6z/ zDliyqSwrxp78UkviT0T2HufRqM2lBg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702129998; a=rsa-sha256; cv=none; b=eAW8Ayi7yKcEmK83/z/XUlBOslMEsUGojknB09mmovUACd/fkSCk9ClTkqVIFw0PAWu/zb 15gAwp0KP6sTYNCcVPPIayxNnJfpnHBXpkDFfh9EzW26KA2sT8NouJp2KowHZrA85cD7l9 3go6YM7LRtloISQuHZfskV03USgextw= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=me.com header.s=1a1hai header.b="NbLX2F/c"; spf=pass (imf11.hostedemail.com: domain of sxwjean@me.com designates 17.58.6.48 as permitted sender) smtp.mailfrom=sxwjean@me.com; dmarc=pass (policy=quarantine) header.from=me.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1702129997; bh=C/CNUr2LNMn6Qo2xusn2tYrx0721oOslxNy000GbTmM=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=NbLX2F/cUDL44mi2SabkraD2VVk0hY3/rQGXB0k0Wvss5Rl3/TzCj3rrYn2EQbwSW FQ7gPhh95AINJgEs4XfJfywasGju3vyAlydBFrDe41RjZvk0ZoahwBhtPuiGNznmHl jhcxu3Nz44xIXu3D0og6FisvlzScDOozYJI0/52yW50wFS8n2lr7+LQSYJrga/uD4Y l6HvHiS5lt0fS+PLUa6tcFt8Tg4GrGsdrmbhDaYXwx2NjPbIvHknXaSNMZ1v2ZCrVr Qo4v7h12JT9DGYqaZLqFGEND+Q9Q+r7gOoRRvIHo0utE6b3NWWlhbltUmoHMgWNLu/ RqlVNJzHrBdYg== Received: from xiongwei.. (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-hyfv10021501.me.com (Postfix) with ESMTPSA id 2C2122C0207; Sat, 9 Dec 2023 13:53:10 +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, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Xiongwei Song Subject: [PATCH v3 4/4] mm/slub: correct the default value of slub_min_objects in doc Date: Sat, 9 Dec 2023 21:52:03 +0800 Message-Id: <20231209135203.303508-5-sxwjean@me.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231209135203.303508-1-sxwjean@me.com> References: <20231209135203.303508-1-sxwjean@me.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: SFeMuhdIpG0w4U9kk62gVDJSZEQihs1C X-Proofpoint-GUID: SFeMuhdIpG0w4U9kk62gVDJSZEQihs1C X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E517=2C18=2E0?= =?utf-8?q?=2E572=2C17=2E11=2E64=2E514=2E0000000_definitions=3D2022-06-21=5F?= =?utf-8?q?01=3A2022-06-21=5F01=2C2020-02-14=5F11=2C2022-02-23=5F01_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 clxscore=1015 spamscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2312090120 X-Rspamd-Queue-Id: 141484000E X-Rspam-User: X-Stat-Signature: hzmp59rfgru3w7zn6incic3fyjchmtg1 X-Rspamd-Server: rspam03 X-HE-Tag: 1702129997-814686 X-HE-Meta: U2FsdGVkX1/Vy8/6N20r8nl2pHvJ6KN9qO5CKmdc0qxq2PUp9HgSVXC+4eWxQpzGm1niKvqDIq6K/fjKcsk6qwJmn75N7nbTnIshxET85Ig6fdLKImDfCQwKjHUSZLL2vfBnxdM8hhl43a0CMNHV0eDLjdlc/V+eVBFIPyUYW2RNAzyabkQMv+AB2cnztZcxBPYAbZ03NGtwjUOCzn3lSWsX1sOL9nQpalo6hmB35y7gXMhx7JM46sLMzmlotWATgXkCtYnyVuyOnPdPmChsYbXBD20HT0qZIToZbEZeW8NrxaNQnVEOf5pMuKBUaqi8iZFk9iiQy01Vt01zVjpkT60xyapRpHVDxiiqYqWhjiOL6gfssYn1CgyXwql4qlpt8ME6hcMieiR+IJAnRi6p6m7NIti1Vrsks7TKsw73pn26/YhYiUfBUxa0wxXkJ7tIfK0IpZytkxjvxYAE8LGsHyIgBg+XcCdE6o0PSF+uAeS6JC6vJX7itjjMRRMQ9wUoDzcWfXz0wec0dVAKixKhEhY7CC+fAdAHZWa/IQGzctRL93Exawrrg4Gflj46VxyByPwoX/20PpqroiAZGn10hCML/k78X9y+EseEIRMMwfmDi3H2xceMmivr50qmB4O+nvKcQI5raddIbF3c+kEvFGAztwhDDz1K29/rhhvdL1R+iYHO0TkNWFhr46E/lPPkio9RgUWvlRvNFOShmhvenun9s5XoZSOYHvgrMpdfjg3QN12BrlW2DwsRMn2nxoEdqsVX6ya+pIqqhbPgHc+DOfvsAyGgWcYvDxtuQGVQabo3JFEjhU6AqcHPQhoD8ZABTGgkcZuL+dr2s5VZuMHdiKFp1oYq0z8OmuGOEIACHhO+AkaAPX8Sp8dwPsNU5IsHRIdWe4s4psL2CA6AlhoNn65CXxUpk3Sd8G/iJgPuMrRZNMrrw34DTBOadHqGta5OCQ/gbiv5UaofV5972C/ ltIa/O06 2s+jTvfXBFG80zkQZj43zePncEb+/F4RXlZN3NUpwl+kK9CPeLrt5Ys97MAl5Q6upuzS6lFSnkKbsOAMTYa0/M4S67Y+4PwBNLlkNaAXwoFyONPvAZouu8QldPFDJOjNMc5WES+NWwAdDGFQjMkBHvTEMhNBuu0XycyHxUavJWcUUMAIKO0tCswM5Qdr7orPGc99H6OgFyYRE5OmGbTb1EHOBmdx1eZCW6TV1r0i/fYteU4ir5DH6DISb5qEi3pyvWI7VHOPNfuO2H8fjH4h8HeBuF4SvDrKkgnK867XT+plZRiEc8zjqqQ6nc1uYpzggkvT1ivsW0BxVuTYg8G1BVtN/eZEp0/vP9fOOxctQKSI7sHc0MWfnXbpHCNeHrRtnkv6Htg39GGnk3YU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 --- 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))