Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1882923pxp; Thu, 10 Mar 2022 14:11:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4JyruC0KHc5mImt0zROFv2cSNA8ajRG0yZMsDPXZg9pjSD9KT1ZoWw2G6KCHhaRxQtfBu X-Received: by 2002:a05:6402:292c:b0:416:8eb:3fc4 with SMTP id ee44-20020a056402292c00b0041608eb3fc4mr6324810edb.2.1646950273240; Thu, 10 Mar 2022 14:11:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646950273; cv=none; d=google.com; s=arc-20160816; b=hBPgtczXwk8B+1Wpmr9s5pY9CpD+TdYAr09lp2XEQX4rmHVeLQSDFU7d9Wl80P4Yn/ fbQj6mZ9nswRgVCScowqNJKpJ2ntSOdqgi+Nt6tG3JhPjltUnFZv5OVF4cvtRHHIkEJx wXly04B/Hcfiaa3S2XF4b+Rdq2ISWhJ3gInskYzhMpr1DiCLq8Tu/EiM/VaSdoYwo+tk A97gQABFwi8SaP7GmalXFuJgeGU7AioAuFn6xqh6oAllXCZMUwvxVkT7NMy7N/XFhO9M e8bScHJ9EDd/WFdDKmllUmeqZurFuAJIPHT7mX6e3comnxJqBVj5LreGMNNJoiUg9Hz9 ZcxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/udTN7nALEHPjWGb6QXe2TvLszHnb85ZIuIPj3HkQLQ=; b=m4XCUqw1eoIcnTfkmq886kBCfyc0fpL1XEUxAarhrTj8AyS+cXiZOPy+X1Btgoa8cq jrPi7EP9zxugoAw7hZ4SfNQRYU5NhxZaqZbgo4rpLbE5SN8tj7XlQ33Oc3/W/F/fQfz1 +ofhTNdPstDEnTRwuYiJOoRhXnzkwXiKWC1MCjV/W8IUKeUhDkqERaLAXmwxSh3NlQ0Y BxlCpiCSFUbEYmJG0DOGH/q1xYq2d6WTGDKnOsDCq90a2qdFGZrNKfp13rAJXQhkyjuc 9SjlKox6jEi/6sO594YibKqC7bdTjVzCyVUkPgktxbwnIO9fkLQQk6yDGi5b4vHcCvn4 9jgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=N5oRVE90; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15-20020a056402078f00b0041646496d28si3747897edy.533.2022.03.10.14.10.50; Thu, 10 Mar 2022 14:11:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=N5oRVE90; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242688AbiCJOJq (ORCPT + 99 others); Thu, 10 Mar 2022 09:09:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242687AbiCJOJn (ORCPT ); Thu, 10 Mar 2022 09:09:43 -0500 Received: from pv50p00im-ztbu10021601.me.com (pv50p00im-ztbu10021601.me.com [17.58.6.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2031496A1 for ; Thu, 10 Mar 2022 06:08:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1646921322; bh=/udTN7nALEHPjWGb6QXe2TvLszHnb85ZIuIPj3HkQLQ=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=N5oRVE90DCnQVEFtmbP6+o4lgirNU8PX4HK8SQ27EXqcNlyFYjZEG7u05cm9j8wmY MXPU/akTZcQIaatAqdLdp6y0eOkzwv7Hr6wYRDeYUwNpkOe9sB5Os4vD0FsroT8qPX TYHkPuqpZ0W9OrvUhab4H1TpteJwrAMl6Vlw88qAMORSG6sLNeoAzNoxE/wBUk+W4l JRAwv7ckiqhxF8Zi0vJfolNja/RvFVWTSP0GlFsbSTUK790IV4XILuFlBDP8krxbFF MkASqVc9r9wWJnVvZMM2Af8O+hl34NrwsI3rgfFzTPTmSGQLeVWuSPcArCMc+uJ5N7 pFVqyB5SB8wZA== Received: from xiongwei.. (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztbu10021601.me.com (Postfix) with ESMTPSA id CA02B8083B; Thu, 10 Mar 2022 14:08:31 +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, willy@infradead.org, roman.gushchin@linux.dev Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xiongwei Song Subject: [PATCH v2 2/2] mm: slub: Delete useless parameter of alloc_slab_page() Date: Thu, 10 Mar 2022 22:07:01 +0800 Message-Id: <20220310140701.87908-3-sxwjean@me.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220310140701.87908-1-sxwjean@me.com> References: <20220310140701.87908-1-sxwjean@me.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.816 definitions=2022-03-10_03:2022-03-09,2022-03-10 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-2203100077 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiongwei Song The parameter @s is useless for alloc_slab_page(). It was added in 2014 by commit 5dfb41750992 ("sl[au]b: charge slabs to kmemcg explicitly"). The need for it was removed in 2020 by commit 1f3147b49d75 ("mm: slub: call account_slab_page() after slab page initialization"). Let's delete it. [willy@infradead.org: Added detailed history of @s] 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); -- 2.30.2