From patchwork Wed Mar 9 14:50:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiongwei Song X-Patchwork-Id: 12775185 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 AF72CC433EF for ; Wed, 9 Mar 2022 14:51:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3AA8C8D0005; Wed, 9 Mar 2022 09:51:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3321E8D0001; Wed, 9 Mar 2022 09:51:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D2A78D0005; Wed, 9 Mar 2022 09:51:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id 0E8748D0001 for ; Wed, 9 Mar 2022 09:51:55 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C54D4181CB167 for ; Wed, 9 Mar 2022 14:51:54 +0000 (UTC) X-FDA: 79225137348.27.AD4D768 Received: from pv50p00im-ztbu10021601.me.com (pv50p00im-ztbu10021601.me.com [17.58.6.57]) by imf07.hostedemail.com (Postfix) with ESMTP id D08CF40011 for ; Wed, 9 Mar 2022 14:51:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1646837512; bh=48jfwMLcGTnlVjxOvNm5ewm9LxTU5N6YqL6r45Mbrxs=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=d8R2OydC9NAiYHlmmugODOUCm37gszXlWfpZgUxR4qcTwzGWWrF6PJMYpOMGIXl6s Y/G1zp8ap8yMYxuiNpUxofPbC+rUwKg72adRkSfGrup/jqlgYsDKYmIHlD5rqqcAv9 DjVQf1aTtR7Y3a5jG64X/FT4qwa7wgpevDFpS4A4d2NpjLTiYX17Q+aQ99Ar/ZIWis AOyexzVP+aPEzDBq/EpxrumTsOdpKV1450ryH+uNVbxu918nHJfN23gfvgdfzT1Yp9 KBW82RqF9a+0/sOcSYpVFQ2LJPlz/h5OXXi5mNDNs1CuVWOURNnZUVrOsrqk3u0i39 eKVFx8PkXERHQ== Received: from xiongwei.. (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztbu10021601.me.com (Postfix) with ESMTPSA id BF4978043E; Wed, 9 Mar 2022 14:51:47 +0000 (UTC) From: sxwjean@me.com To: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, longman@redhat.com, guro@fb.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xiongwei Song Subject: [PATCH 1/2] mm: slab: Delete unused SLAB_DEACTIVATED flag Date: Wed, 9 Mar 2022 22:50:51 +0800 Message-Id: <20220309145052.219138-2-sxwjean@me.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220309145052.219138-1-sxwjean@me.com> References: <20220309145052.219138-1-sxwjean@me.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.816 definitions=2022-03-09_05:2022-03-09,2022-03-09 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=656 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2009150000 definitions=main-2203090083 X-Rspamd-Queue-Id: D08CF40011 X-Stat-Signature: x3pd796r5eqdu3hdd5q3qd5f9gzme37o X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=me.com header.s=1a1hai header.b=d8R2OydC; spf=pass (imf07.hostedemail.com: domain of sxwjean@me.com designates 17.58.6.57 as permitted sender) smtp.mailfrom=sxwjean@me.com; dmarc=pass (policy=quarantine) header.from=me.com X-Rspamd-Server: rspam07 X-HE-Tag: 1646837513-588979 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: Xiongwei Song Since commit 9855609bde03 ("mm: memcg/slab: use a single set of kmem_caches for all accounted allocations") deletes all SLAB_DEACTIVATED users, therefore this flag is not needed any more, let's delete it. Signed-off-by: Xiongwei Song Acked-by: David Rientjes Reviewed-by: Roman Gushchin --- include/linux/slab.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/slab.h b/include/linux/slab.h index 37bde99b74af..b6b3eed6c7c4 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -117,9 +117,6 @@ #define SLAB_RECLAIM_ACCOUNT ((slab_flags_t __force)0x00020000U) #define SLAB_TEMPORARY SLAB_RECLAIM_ACCOUNT /* Objects are short-lived */ -/* Slab deactivation flag */ -#define SLAB_DEACTIVATED ((slab_flags_t __force)0x10000000U) - /* * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests. * From patchwork Wed Mar 9 14:50:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiongwei Song X-Patchwork-Id: 12775186 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 25E47C433F5 for ; Wed, 9 Mar 2022 14:52:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 705B48D0006; Wed, 9 Mar 2022 09:52:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 68D728D0001; Wed, 9 Mar 2022 09:52:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 52E188D0006; Wed, 9 Mar 2022 09:52:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 440E68D0001 for ; Wed, 9 Mar 2022 09:52:03 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 198E620DF8 for ; Wed, 9 Mar 2022 14:52:03 +0000 (UTC) X-FDA: 79225137726.15.199BA3C Received: from pv50p00im-ztbu10021601.me.com (pv50p00im-ztbu10021601.me.com [17.58.6.57]) by imf22.hostedemail.com (Postfix) with ESMTP id 62E29C0016 for ; Wed, 9 Mar 2022 14:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1646837521; bh=inbORtEEYI6cAOSZdCNjmhz+XI4ePyFwi6WeBbrIyfI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=sIfng82wzWI7ZZzlB+S38D5Mwe8xNIActZxqXscrS9GlnyrP4ud7CNPdxufqhkDbR GqgRLRTcMmZJKfVpog9EUaamYugNOdptNvCEkj+YIqETSat8NuJiLdIR0RIAXpA+sw PsGoKw844BK19FEYjPPTDzzDtBbo2bzhPgHpjGGKXStX2QLQH7x6H4NSOaSMhPFZR2 Nz/Tc4f40QsY+wp2gZDsWcxGTnnlidvJdpF8BsdmynMq1xSNeRYqtSWr8Gk9uW7pDN z3Cqt9/Zc7mRUQAkvAr8XK+ydKxgafLmyQCuQnK6c7h9irftDgkMNRmuW3X1nYQROa ft07QFLsCyLsQ== Received: from xiongwei.. (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztbu10021601.me.com (Postfix) with ESMTPSA id C8DE980848; Wed, 9 Mar 2022 14:51:56 +0000 (UTC) From: sxwjean@me.com To: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, longman@redhat.com, guro@fb.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xiongwei Song Subject: [PATCH 2/2] mm: slub: Delete useless parameter of alloc_slab_page() Date: Wed, 9 Mar 2022 22:50:52 +0800 Message-Id: <20220309145052.219138-3-sxwjean@me.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220309145052.219138-1-sxwjean@me.com> References: <20220309145052.219138-1-sxwjean@me.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.816 definitions=2022-03-09_05:2022-03-09,2022-03-09 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2009150000 definitions=main-2203090083 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 62E29C0016 X-Stat-Signature: ddzst83d9nctmdmb69eduj8187551wb9 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=me.com header.s=1a1hai header.b=sIfng82w; dmarc=pass (policy=quarantine) header.from=me.com; spf=pass (imf22.hostedemail.com: domain of sxwjean@me.com designates 17.58.6.57 as permitted sender) smtp.mailfrom=sxwjean@me.com X-HE-Tag: 1646837522-384897 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: Xiongwei Song The parameter @s is useless for alloc_slab_page(), let's delete it. Signed-off-by: Xiongwei Song Reviewed-by: Matthew Wilcox (Oracle) Acked-by: David Rientjes Reviewed-by: Roman Gushchin --- mm/slub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 261474092e43..5d273ee04c43 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1788,8 +1788,8 @@ static void *setup_object(struct kmem_cache *s, struct slab *slab, /* * Slab allocation and freeing */ -static inline struct slab *alloc_slab_page(struct kmem_cache *s, - gfp_t flags, int node, struct kmem_cache_order_objects oo) +static inline struct slab *alloc_slab_page(gfp_t flags, int node, + struct kmem_cache_order_objects oo) { struct folio *folio; struct slab *slab; @@ -1941,7 +1941,7 @@ static struct slab *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) if ((alloc_gfp & __GFP_DIRECT_RECLAIM) && oo_order(oo) > oo_order(s->min)) alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~(__GFP_RECLAIM|__GFP_NOFAIL); - slab = alloc_slab_page(s, alloc_gfp, node, oo); + slab = alloc_slab_page(alloc_gfp, node, oo); if (unlikely(!slab)) { oo = s->min; alloc_gfp = flags; @@ -1949,7 +1949,7 @@ static struct slab *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) * Allocation may have failed due to fragmentation. * Try a lower order alloc if possible */ - slab = alloc_slab_page(s, alloc_gfp, node, oo); + slab = alloc_slab_page(alloc_gfp, node, oo); if (unlikely(!slab)) goto out; stat(s, ORDER_FALLBACK);