Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3935865rwo; Mon, 24 Jul 2023 20:28:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlFBruqSuJYzu+RBbJat1a05o4Mafsy9Tuy3XpIAtXac4HIWpifi2uYZxXXJBHEhKFgYCvsY X-Received: by 2002:a05:6358:908:b0:135:b4c:a490 with SMTP id r8-20020a056358090800b001350b4ca490mr12871827rwi.10.1690255728835; Mon, 24 Jul 2023 20:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690255728; cv=none; d=google.com; s=arc-20160816; b=YY9yCXaz582njFCtjRKxVNM66cq2LdE0fdT2BO55ENrdJcBZWXp/yffdVITBZwqtyl r+F3R156bQurgPiTiFtmrWAC3e5uL9+zmR/l2cizzC4nc8YXLaUKXugmod1mCpV9FBXJ ncQxMYyN+XMan9NIzpQ/NrSSpQShh0ouOl03QFwsVcnPpfxWBeIylo762JubfZDY5c/t 0ctTCR0VnKsT56EdrefvYeerzrxuIu566w5oeB1N64IszmG3K+8DjLMn22eNnI8ECDsP IiKqVUVd6dqkCmwb1gUuYQ0Qk0ekiX7R9stwVByNlEu4dU8Rlku4sMMZ9QGLy/0EnJPc O52g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=0+VnVPZa4UeOCG7Yrfiew8gKr6k3ViuPV5Oe7aKEwA0=; fh=RvgzbgbFi8YE5twR3MXmN7BmvGsZiN0rPmDxTkhnCfM=; b=Ri0WRybCCUnvT/uZAnG6nqT5xmPwPlJFijzc7dWAkj+ySsv4o6+1uX+wMWMYFTpJS+ StHmhTdhytsrQgvs9eR3iMwjOCjLIG5DLkC6gJLhaYcSS0VuRiDtLeCxfcBOGXJWnXPc VMM4JaAzrhyvW4Nf4up6Rj57Wd0GdUQL2lVOlbA7ujD+Yr4/SFDMW0ptSy2nNaMfbbsj OUiur1BGRVdbl8XLftVKpnaUdiuJjwUYaQWwDSt/Y6zc/uF1t7eUOZmfsELjdkP0ki9E 5KAkTXFnylUz/FWZR7MyN1e7c+GMaXcsbW/ifBDdjCRo3HZBnlUmZyEzK7nUzgeKrMCw sFAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=OouSnERn; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a631d09000000b00533fce755adsi9900053pgd.130.2023.07.24.20.28.35; Mon, 24 Jul 2023 20:28:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@linux.dev header.s=key1 header.b=OouSnERn; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229621AbjGYCtE (ORCPT + 99 others); Mon, 24 Jul 2023 22:49:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231375AbjGYCs7 (ORCPT ); Mon, 24 Jul 2023 22:48:59 -0400 X-Greylist: delayed 722 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 24 Jul 2023 19:48:21 PDT Received: from out-27.mta1.migadu.com (out-27.mta1.migadu.com [IPv6:2001:41d0:203:375::1b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D9DD1702 for ; Mon, 24 Jul 2023 19:48:21 -0700 (PDT) Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1690252555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0+VnVPZa4UeOCG7Yrfiew8gKr6k3ViuPV5Oe7aKEwA0=; b=OouSnERnVUq8t87+qMJi+ElF1O+pkB5HJ/XjlEV4XPIdaL5qKz/r9JLMMUeUfOnb3ZMOdj khOpzTQ2idnb6S4y6b+9cHD3wy9I4UTOUPXGpsseW4bB+Gm8jsDjdu3ImL8BlNp++kk+K8 DDellGRauVWKhKhaf7FrGB51gwHD7wU= MIME-Version: 1.0 Subject: Re: [PATCH v2 01/47] mm: vmscan: move shrinker-related code into a separate file X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20230724094354.90817-2-zhengqi.arch@bytedance.com> Date: Tue, 25 Jul 2023 10:35:01 +0800 Cc: Andrew Morton , david@fromorbit.com, tkhai@ya.ru, Vlastimil Babka , Roman Gushchin , djwong@kernel.org, Christian Brauner , "Paul E. McKenney" , tytso@mit.edu, steven.price@arm.com, cel@kernel.org, Sergey Senozhatsky , yujie.liu@intel.com, Greg KH , LKML , Linux Memory Management List , x86@kernel.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, linux-erofs@lists.ozlabs.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, linux-mtd@lists.infradead.org, rcu@vger.kernel.org, netdev , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, dm-devel@redhat.com, linux-raid@vger.kernel.org, linux-bcache@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <97E80C37-8872-4C5A-A027-A0B35F39152A@linux.dev> References: <20230724094354.90817-1-zhengqi.arch@bytedance.com> <20230724094354.90817-2-zhengqi.arch@bytedance.com> To: Qi Zheng X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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-ext4@vger.kernel.org > On Jul 24, 2023, at 17:43, Qi Zheng = wrote: >=20 > The mm/vmscan.c file is too large, so separate the shrinker-related > code from it into a separate file. No functional changes. >=20 > Signed-off-by: Qi Zheng > --- > include/linux/shrinker.h | 3 + > mm/Makefile | 4 +- > mm/shrinker.c | 707 +++++++++++++++++++++++++++++++++++++++ > mm/vmscan.c | 701 -------------------------------------- > 4 files changed, 712 insertions(+), 703 deletions(-) > create mode 100644 mm/shrinker.c >=20 > diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h > index 224293b2dd06..961cb84e51f5 100644 > --- a/include/linux/shrinker.h > +++ b/include/linux/shrinker.h > @@ -96,6 +96,9 @@ struct shrinker { > */ > #define SHRINKER_NONSLAB (1 << 3) >=20 > +unsigned long shrink_slab(gfp_t gfp_mask, int nid, struct mem_cgroup = *memcg, > + int priority); A good cleanup, vmscan.c is so huge. I'd like to introduce a new header in mm/ directory and contains those declarations of functions (like this and other debug function in shrinker_debug.c) since they are used internally across mm. Thanks.