From mboxrd@z Thu Jan 1 00:00:00 1970 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 C0497C433EF for ; Thu, 6 Jan 2022 06:40:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 08BCD6B0071; Thu, 6 Jan 2022 01:40:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 03C1E6B0072; Thu, 6 Jan 2022 01:40:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E45376B0073; Thu, 6 Jan 2022 01:40:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0110.hostedemail.com [216.40.44.110]) by kanga.kvack.org (Postfix) with ESMTP id D44696B0071 for ; Thu, 6 Jan 2022 01:40:17 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6256B95B0F for ; Thu, 6 Jan 2022 06:40:17 +0000 (UTC) X-FDA: 78998912874.17.D5B9738 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by imf27.hostedemail.com (Postfix) with ESMTP id B8CB94000A for ; Thu, 6 Jan 2022 06:40:15 +0000 (UTC) Received: by mail-pl1-f180.google.com with SMTP id u16so1847382plg.9 for ; Wed, 05 Jan 2022 22:40:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qpDNDsqfZRWzVoTY8vjmdsaIkg0QfrFvBT5+U+FS8dQ=; b=eIz7awawWEsIs2ZxILc9hK+qK9hX+gsY3ORerh87u3jYTlPlWpR0MMDOuzGM0KNEIH DY0uTs9eceRynVlxnoO+AVDAWGtkiPDl4UfsdRO687EkMdN+lbZCLS2rkIU0jJx63UA6 4AnpxzdnnByOYUCbf6b0uXS29gSAuAXidSSa+TC1RT3jkWph22sMbcUj9NkqPuwRHBsp pSNrz2ug1BaiRBDORnmZPAAMLEtI+2yUtxlEZFsnF9jnaRRkVIWe9vjek3ArDd7ISE+F LaIOhVnjprojlzX7cVU3RLKsJC/ivLsi/wV2SijtdtxNhKxiapJ9IDk/S1rfRG7UTELT O5gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qpDNDsqfZRWzVoTY8vjmdsaIkg0QfrFvBT5+U+FS8dQ=; b=1sZiAfPDjgEmZ/ZBMVXxWayK6uCHcF/ULmrcNG3nYvg0U66LSINEiSbONqarKahKxm kqygehkln4OImE97XvTHon8kqE/zvZcRftKc2cVZysRMhxnUMn3bCA5awX/BKB0WmZzP t3vAI33hdN9lUJ1JOwtXYaG2nno594pk1QNMUTAZGgst0nfo0vfFRq652bF58Mu/3TB+ l7iOtB39EAFJNF50TmLvfpQqay0gckzxILoIqXhZ6mFRbkC4aXD9rM0uPKHgh2gCinOp UBGXxnorr/0t5A5svoQaGp2wFHKw+RpbSAmvk24JZ1y8+UnGVN7gKEIGtFIxZNsd9hHm w7/w== X-Gm-Message-State: AOAM533U4kJ9qWrOA6wNODNtx53oDcCC9ZzVKBIu6HPLaIg+KrGuZ4Tk dyi1aLivoY2MSnukqPX43yg= X-Google-Smtp-Source: ABdhPJxl6ahwctJYFxS36uin1LuvfGqoiHung0FOw71afRe/SZgkDRmRgqSq5W8Rw+rz6yvWl2W50w== X-Received: by 2002:a17:90b:3808:: with SMTP id mq8mr8353278pjb.85.1641451216015; Wed, 05 Jan 2022 22:40:16 -0800 (PST) Received: from ip-172-31-30-232.ap-northeast-1.compute.internal (ec2-18-181-137-102.ap-northeast-1.compute.amazonaws.com. [18.181.137.102]) by smtp.gmail.com with ESMTPSA id f7sm1192627pfc.141.2022.01.05.22.40.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 22:40:15 -0800 (PST) Date: Thu, 6 Jan 2022 06:40:11 +0000 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Vlastimil Babka Cc: Matthew Wilcox , Christoph Lameter , David Rientjes , Joonsoo Kim , Pekka Enberg , linux-mm@kvack.org, Andrew Morton , Johannes Weiner , Roman Gushchin , patches@lists.linux.dev Subject: Re: [PATCH v4 02/32] mm/slab: Dissolve slab_map_pages() in its caller Message-ID: References: <20220104001046.12263-1-vbabka@suse.cz> <20220104001046.12263-3-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220104001046.12263-3-vbabka@suse.cz> X-Rspamd-Queue-Id: B8CB94000A X-Stat-Signature: wekn1nhjsn6co6om639cykmowzu593ph Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=eIz7awaw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf27.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.180 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com X-Rspamd-Server: rspam02 X-HE-Tag: 1641451215-828570 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: On Tue, Jan 04, 2022 at 01:10:16AM +0100, Vlastimil Babka wrote: > The function no longer does what its name and comment suggests, and just > sets two struct page fields, which can be done directly in its sole > caller. > > Signed-off-by: Vlastimil Babka > Reviewed-by: Roman Gushchin > --- > mm/slab.c | 15 ++------------- > 1 file changed, 2 insertions(+), 13 deletions(-) > > diff --git a/mm/slab.c b/mm/slab.c > index ca4822f6b2b6..381875e23277 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -2546,18 +2546,6 @@ static void slab_put_obj(struct kmem_cache *cachep, > set_free_obj(page, page->active, objnr); > } > > -/* > - * Map pages beginning at addr to the given cache and slab. This is required > - * for the slab allocator to be able to lookup the cache and slab of a > - * virtual address for kfree, ksize, and slab debugging. > - */ > -static void slab_map_pages(struct kmem_cache *cache, struct page *page, > - void *freelist) > -{ > - page->slab_cache = cache; > - page->freelist = freelist; > -} > - > /* > * Grow (by 1) the number of slabs within a cache. This is called by > * kmem_cache_alloc() when there are no active objs left in a cache. > @@ -2621,7 +2609,8 @@ static struct page *cache_grow_begin(struct kmem_cache *cachep, > if (OFF_SLAB(cachep) && !freelist) > goto opps1; > > - slab_map_pages(cachep, page, freelist); > + page->slab_cache = cachep; > + page->freelist = freelist; > > cache_init_objs(cachep, page); > Looks good. Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> > -- > 2.34.1 >