From patchwork Sun Dec 18 12:31:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gou Hao X-Patchwork-Id: 13076037 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 A1975C4332F for ; Sun, 18 Dec 2022 12:32:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F398E8E0002; Sun, 18 Dec 2022 07:32:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EEA3F8E0001; Sun, 18 Dec 2022 07:32:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB2028E0002; Sun, 18 Dec 2022 07:32:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C84318E0001 for ; Sun, 18 Dec 2022 07:32:39 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 928901A0240 for ; Sun, 18 Dec 2022 12:32:39 +0000 (UTC) X-FDA: 80255365638.01.693A744 Received: from smtpbgjp3.qq.com (smtpbgjp3.qq.com [54.92.39.34]) by imf25.hostedemail.com (Postfix) with ESMTP id 45C38A000C for ; Sun, 18 Dec 2022 12:32:36 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf25.hostedemail.com: domain of gouhao@uniontech.com designates 54.92.39.34 as permitted sender) smtp.mailfrom=gouhao@uniontech.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671366757; 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:references; bh=y6skHZBC/oSpGKITTzVznhsf4fpaVzRzAI9+Wta0hos=; b=baT7KP1NWi/j+1Dprm5HYqMmBtovhwjMf9MeHX2cYfd1Xa7tb655mHj8Yj8+qjS8oLlfG0 xYEm8Uu2kiCS3I2BcuH9q+0YqNImEkqoDT0WPR5SSbFV57FlolhM066MOWdDL3/8+hGssq DUNxmwCp5ieNyw9clP0QyskatDyjABc= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf25.hostedemail.com: domain of gouhao@uniontech.com designates 54.92.39.34 as permitted sender) smtp.mailfrom=gouhao@uniontech.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671366757; a=rsa-sha256; cv=none; b=tJBET4sSsKvUTq4/XxfaaJQ38nB58MyadL7jRfxxw+yjzULPFErNIXw4HgyYoPuTx0bQBC IUhsC7Oi7nzU9ZeETsULgM9hNkaiH22BNp/QgWXdkFHcRk1O54YL5qY5vXETq026//kuE6 cPZzgYl3twZPOxd2U1XJU1pnnksbfLo= X-QQ-mid: bizesmtp91t1671366705t90nn764 Received: from localhost.localdomain ( [113.200.76.118]) by bizesmtp.qq.com (ESMTP) with id ; Sun, 18 Dec 2022 20:31:43 +0800 (CST) X-QQ-SSF: 01400000002000B0D000B00A0000000 X-QQ-FEAT: 3M0okmaRx3gbC4OVuUY0z+BVAZLPmxZcAXXWoPgJkrW6IAgAdHBU/h9y0nu7D NQ36j+kwQWe5ZwXnc1v8TUiJH9QkRhlI+b6DaENkNQduG1ekmejzwvjVeAYEUQQdY47vkqz O6EwJcQLflI9Zb1Il0UnUPZd7bcZWT12KjR44Cc4UEEnMLfbF+GmdLi9Wn7KpMtJadhe3Y2 NieKbWeugJevRA+BWKcoX3v6GVtltZqAHyuxftuNNORgamzohpGVNhpUyOir0NxArj6AHBF XiGFDBC0gbAqIMbaZgdeey61qYDTD/1hjwG5S7lPcu+ohOBsa8B5QXQUSF0aWxZHEtWXvHX kB6vZY9PaloVsD9hzYm9Eerw6hClvXF8v72L2y/i2MVEEq0QQjSWni7ozsncpjte9RWwNd+ z2VZ8m/AyyjSnfeaCvE2sUrUqUh/2MyD X-QQ-GoodBg: 2 From: gouhao@uniontech.com To: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com, keescook@chromium.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, mingo@elte.hu, Gou Hao Subject: [PATCH V2] mm/slab: remove unused slab_early_init Date: Sun, 18 Dec 2022 20:31:27 +0800 Message-Id: <20221218123127.23810-1-gouhao@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybglogicsvr:qybglogicsvr7 X-Rspamd-Queue-Id: 45C38A000C X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: d33iaprgm393ckmx51auc63ydyhtrnha X-HE-Tag: 1671366756-671075 X-HE-Meta: U2FsdGVkX1/XKgr9rAGPRXlcp9V0eWUzuGKuBsM5y2qnbOzMTpX1SLMvtt+/DZXRFM8Xg+5MzxF5BlFZFQwggN2VnOYFgm53+Tg9dmQaew/NDRB1y6pIS2Xz0EqQ3iPOOhQVDM8bkulzuEVFK0S2NK7a8Bg/CgjTxlHVydRDJ0PwACrLUwdYPbIEuMp7K/WjgAFHPCA57mEo4MoCXSFdmL8hbANZALARtdwm93Xg8p5zRdruFPGroCOtld6UZRjBsF9FLBxKLnL/UhCjr7qmQambUECJjP5JW9jXKRZd+s3l68KPFHHgci4WDJR/WZcKVkf+1bfb9dmD7xWpYQYCVRtP7LWxSvWPlS5EfIRe+VdSN2ybLyq31R6Y3fRHmIExL7mqALY2mt7TVC1azrrWuxaUH0jy093lCXmS9muMfY2tXLK3BDiVqT7D+bv8cvpoMK3H/eOROBU7eAkQf+W+FETy8D3Q/BXuUV7lrV3qrOm/IcAvfekn0P1PNKL06DEDFIuRLs9y3hlK2Te3CFNxpbX5SMNw+IYg4riCr0mlSNYCnwHPNcDqS7FmAiVhC5ecakWeTryvXE4CvSspP0mkIEyP6iW0oeBDaVNBBstdzas7OGRTnQ+Kr8AyzMW1DpU0oo0rJ/ij3wLovnzOyFY9o08AdS33pqYL+Nf30kKvLQb8uFMECdZ5fpzNtQCPAYrVMmEwiD/cm4x8Wd7nJlXAYarkn+kPxTin4sV7kNusSv65mInL41TcRRHdodNfUSHbVmTP6UHb33qhN0tn/0Kd+LzxPASqP9q3vQSI1Okup5nd9mWEgPyiTtCCP7+nzZRYGtsouAtNVRaaB+OBSQYmYXR2rFGECU6Cst6Gbr+GjlmM6Dj53tev+ueAm/E6DhYinVeil3VoZRETe3Af8tgX4XN2K+jDClWeX8bs06oqcy1kJBVxYSxbAE8weBeqO7VFYK38MQg0VKcwCF3Q+oR nq7HQsiT QQghDUivUwJ0yDVXFnsOXd7OzF/EUZuSgnYo1 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: From: Gou Hao 'slab_early_init' was introduced by 'commit e0a42726794f ("[PATCH] mm/slab.c: fix early init assumption")', this flag was used to prevent off-slab caches being created so early during bootup. The only user of 'slab_early_init' was removed in 'commit 3217fd9bdf00 ("mm/slab: make criteria for off slab determination robust and simple")'. Signed-off-by: Gou Hao Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: David Rientjes --- mm/slab.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index 7a269db050ee..ede1f29fd81c 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -220,7 +220,6 @@ static inline void fixup_objfreelist_debug(struct kmem_cache *cachep, static inline void fixup_slab_list(struct kmem_cache *cachep, struct kmem_cache_node *n, struct slab *slab, void **list); -static int slab_early_init = 1; #define INDEX_NODE kmalloc_index(sizeof(struct kmem_cache_node)) @@ -1249,8 +1248,6 @@ void __init kmem_cache_init(void) slab_state = PARTIAL_NODE; setup_kmalloc_cache_index_table(); - slab_early_init = 0; - /* 5) Replace the bootstrap kmem_cache_node */ { int nid;