Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3940989rwo; Mon, 24 Jul 2023 20:35:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlHW0RCeP6db8xo0rjo9yaFTFmT1wj+h3B15/xQxPfqt1qCEXhHb3WLN/cqP9bs9PVnHSHaW X-Received: by 2002:a17:902:dacd:b0:1b9:e481:ef3f with SMTP id q13-20020a170902dacd00b001b9e481ef3fmr10689935plx.9.1690256127240; Mon, 24 Jul 2023 20:35:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690256127; cv=none; d=google.com; s=arc-20160816; b=NtSisYHD5VlB0RV3CDTXsVsNn+yOkrR5RzSsHT4uPfSsR5Jq8CZ4GGLKeK7VEhTfc1 0fkiY7xuahYcL6HDeWzvuLNsEY7hLkq2qSeXiucAKJNT+5qmc3zGk/cIIbH9wBYmdsEl qnyGhSBjuMy/KEEo5bG5ASUzGEDyddN2zTOkyWKoCMpifFFCwrIPJGoMhHYJfYUTv7t1 +KTxeIL2y6f2OKEaNZq2ft1FmdIiCBbzbxicam00tw+fh8nNkrQkw9kNCIlqJpp/Ib4u sfiE7pJ4qEzUW3nm9EIMMrQANi8SDLtftH412NEKnaN1jyAtAstoCMaD+poO+gbfaR2L bipg== 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=6p0DFvIoLJzSIVM0qRIM/GXeN12xkckyA9Fji4TGEhI=; fh=RvgzbgbFi8YE5twR3MXmN7BmvGsZiN0rPmDxTkhnCfM=; b=G1tpUlGPBhrRSgjSm8fEVp5KQMWFlNd3/OpJFWPh7AoUojZBCO/Pyq5ThbygqmEiVG shyJlo4+whOMNFt6L82PXlrVuTMgtqJFRugt/mf9C8oo6Xe0gF+eXFh5X7sitOvgGvOb w2z62vKiskRHxuXu4YT73yjJKuq3+CC7ETKVKu+1ukcvfyiQ3STSQ/ch7IwyfIdQl4BP Vp+Csfv4V2WBv2OkduLQSJiK+IHYe6TCO1t+mMK8azjo1JI7FFtlZEOjFuwo21Tux0zR BJBCbLqgJVR8LmjmsFl6UCmMifuJWXMh+7em/Pmt20oaRTFJ1iyOxsb9i0Sd4yZi6CIb c0DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=r9D+tXFV; 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 n14-20020a170903110e00b001b80643d64dsi11421421plh.145.2023.07.24.20.35.14; Mon, 24 Jul 2023 20:35:27 -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=r9D+tXFV; 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 S231639AbjGYDYz (ORCPT + 99 others); Mon, 24 Jul 2023 23:24:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231454AbjGYDYu (ORCPT ); Mon, 24 Jul 2023 23:24:50 -0400 X-Greylist: delayed 385 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 24 Jul 2023 20:24:45 PDT Received: from out-46.mta0.migadu.com (out-46.mta0.migadu.com [IPv6:2001:41d0:1004:224b::2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43B631736 for ; Mon, 24 Jul 2023 20:24:43 -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=1690255481; 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=6p0DFvIoLJzSIVM0qRIM/GXeN12xkckyA9Fji4TGEhI=; b=r9D+tXFVa/N1RN+BLv5WgR5iQ4rwtyebnPM62Sh3w2AQ+19WlSlFOjsJl5wosr8TEtJchn V877L2MD6oNieyuMlTG6JawmQ1ns/Fjh33pHsVXqhR6CCRTDc2499SUTwOS+JRsWVrdweW vS3GyBw0+b28Uj9NeJVk00fqQ8IPfLM= 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: Date: Tue, 25 Jul 2023 11:23:54 +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: <6FE62F56-1B4E-4E2A-BEA9-0DA6907A2FA9@linux.dev> References: <20230724094354.90817-1-zhengqi.arch@bytedance.com> <20230724094354.90817-2-zhengqi.arch@bytedance.com> <97E80C37-8872-4C5A-A027-A0B35F39152A@linux.dev> 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,RCVD_IN_DNSWL_BLOCKED, 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 25, 2023, at 11:09, Qi Zheng = wrote: >=20 >=20 >=20 > On 2023/7/25 10:35, Muchun Song wrote: >>> 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. >=20 > How about putting them in the mm/internal.h file? Either is fine to me. >=20 >> Thanks.