From patchwork Sat Dec 17 11:30:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gou Hao X-Patchwork-Id: 13075817 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 789D6C3DA6E for ; Sat, 17 Dec 2022 11:31:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 02E0C8E0002; Sat, 17 Dec 2022 06:31:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F1FF28E0001; Sat, 17 Dec 2022 06:31:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE7D78E0002; Sat, 17 Dec 2022 06:31:41 -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 CB80E8E0001 for ; Sat, 17 Dec 2022 06:31:41 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A7176A0B06 for ; Sat, 17 Dec 2022 11:31:41 +0000 (UTC) X-FDA: 80251583202.08.4AD84BC Received: from smtpbguseast1.qq.com (smtpbguseast1.qq.com [54.204.34.129]) by imf22.hostedemail.com (Postfix) with ESMTP id 49994C0002 for ; Sat, 17 Dec 2022 11:31:36 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf22.hostedemail.com: domain of gouhao@uniontech.com designates 54.204.34.129 as permitted sender) smtp.mailfrom=gouhao@uniontech.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671276700; a=rsa-sha256; cv=none; b=EVcMT63dgNwodXQxriHvYui0dwcYF/igO+qk/aM00MxlKTAMEVtjyp9jmwan4Cl1zjtbRi bmJuXVWuvPw59Ayu3EQAf/iCPOuz832xx4k5mOAFNQmo8MJrwmZlpTfZXJa9XPCobmVUj5 hnCwmJWGtFQp3KP1dn+/aWHFvlbMIcI= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf22.hostedemail.com: domain of gouhao@uniontech.com designates 54.204.34.129 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=1671276700; 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=zP51Og0Vw7JI+wTy+SNX1KOpeW6iB59A+MTxy8Bpnkk=; b=jalQf/wgKG6Zl1tfQMb1PNLcNif9EIh/t/UWS9VDm165EJjeJs1GKlB+iBfY0gMBJkyccN 0Kl5nc9QJ1HNBabRO/bXJGybmDI8Pj8m55iwxXN7Oecsqhryu5MaxKgNHza/RtK9L5cGTr ixtje+9XjxBgWnBfYS25nhehZ/CiZDo= X-QQ-mid: bizesmtp76t1671276650tdrswa6d Received: from localhost.localdomain ( [113.200.76.118]) by bizesmtp.qq.com (ESMTP) with id ; Sat, 17 Dec 2022 19:30:48 +0800 (CST) X-QQ-SSF: 0140000000200090D000B00A0000000 X-QQ-FEAT: 90EFqYDyPxCkbDFXxFdW7X7FJpfnpNAakESINYCEm+gO9LHamBz3FT0QOjoMP f61gSQVZV/nRltLjaPQsV6lAuJxjEarMMxjqhND2SUBYnv7QXmPLQDTVmu/lOvBkhzR2VZa n3ZD26PN0906qrHBpYgw67c3rj2dxZv4hGoVXHj4tE/yJ0VpbqTHetayVrlSN9CMlKmHUW/ wdj6rHm+7Md9UG0PJd27S6/r53tkh4fX+1eaPUBefAQsJ+By370HGucNGXuzil2MDjTix+Y RZM7jgooj1GFSE5TWHUN8tPUNpt3xBJKoVJ9WjRw14FK+dhA8Nlk9eEZ/dYNlrm5XaphabW tdpq6o0UHZyQDyOI7XtXbsUcQEErq7qRbORNUnXMboTrX1tZkTvyUTHsyUptCLkfTs/KoYS rg1pi+Edkjg= 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, gouhaojake@163.com, Gou Hao Subject: [PATCH] mm/slab: remove unused slab_early_init Date: Sat, 17 Dec 2022 19:30:45 +0800 Message-Id: <20221217113045.15997-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-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 49994C0002 X-Stat-Signature: qrd8zmdubsbtp6biytxye7mq4wgnweej X-HE-Tag: 1671276696-743194 X-HE-Meta: U2FsdGVkX18PP1Li/1Zmb5rN7A5eTr8Y+7BJ/O7ROrphsLS7T7pcGm15iYzmXzHuKlNA31KuIdfuJXM4ovXRPICh873ykxILkj74IBMmfd270LT64awfEZK36ZuhYG9HLnDcRVHRy48Q7k8yg1DehmD9x651kq/qg0L3f+WJvhWNdmhQVgx3pRaTruZgEEPJdwn0e6HA4BPC2Vcwtq7BU9ZAE2Ii6IBEUoT/O/jM0N1aLVeM0TS/1HtHi2IFtS9K6E7BJZ1R2NoR/p//Vqi1JrzEB6lIAJRpsHhWGs6GFPI2qXhLlIL3m3K1K7eRmCReMB4siXOJPgqjdJA+7zjQsfWdEFe2IspS7lJ3tCxz2m1+zyUOdRwVZvngAW7SfsX3gqT73yZFN5A5qphlpQWM9z2ht0wzYkDh3o83qUl27aGgvPbK4NVvWrjRLH5GcBgNw6ek0TzFDlcZUWEChY6jrlD7QQSSt2mRQME4IPGjkQBX9ZIjHo8D/9LB1puaD12rRQQL4zU3Q9CP5094LkBj/rz4jTPjOxM/y5r44HHNZRCn/OmAu3kApwOXojb15gCmh/Bsg1PWkhDheUgoKXf2bQQwASlK02HacEEv7drvcQ7gUXcUKYRs3GUspbmfURSv9qRxR11sY1Yz4O4SVEO8KoSZ/lJoPcEga7PmGaepaOGldok9vNawVRvvCE4LiRve2YFqFVGiyhgJDqgpMBlnqmG6Wwu/Yj3jdlfG4dN/qD+pgL6t+13gsEHm5ZqP+Se+ulMsWR5I+cogtZrIGZAadk3jV6hc+rTm/DzHwWMsfTMURUfOll+6/IWVPv9tzYPUO9DPNXKkGEU3THrnJjkjBQ5uPwd3DYAvCsE11Dn4VYryeAFHs47rVqB4syaE+DCT+99TFy0pWSh2SyyRvBskN/taCsdkcQ9H1oYCfJYWAGvLeF4HmVRQvdbwihRxzDJwcYdNVjUtYkI3NUTGCp8 zA+iOm6U WzM1jOpvxhRyZc6DCnDyJ05/C8K69Npngj+0H 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 prevented 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> --- 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;