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 39C29C04A94 for ; Tue, 25 Jul 2023 02:36:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 892386B0074; Mon, 24 Jul 2023 22:36:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8428E6B0075; Mon, 24 Jul 2023 22:36:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 730E08E0001; Mon, 24 Jul 2023 22:36:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 64CE76B0074 for ; Mon, 24 Jul 2023 22:36:00 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 28E4E120C40 for ; Tue, 25 Jul 2023 02:36:00 +0000 (UTC) X-FDA: 81048569280.08.1C22F1A Received: from out-28.mta1.migadu.com (out-28.mta1.migadu.com [95.215.58.28]) by imf15.hostedemail.com (Postfix) with ESMTP id 3595EA0005 for ; Tue, 25 Jul 2023 02:35:57 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=OouSnERn; spf=pass (imf15.hostedemail.com: domain of muchun.song@linux.dev designates 95.215.58.28 as permitted sender) smtp.mailfrom=muchun.song@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690252558; a=rsa-sha256; cv=none; b=3c3GedNQcxF3EyZVsLiy4ktn1znhpmsl6Af4F26u8ABK2W0U3fD/dvZroeKVn0Z4wMnqSr MzVmCMFwUdHt+9pOeHn1+ye90QaFFsKPX0eiLGiZloWdw0NyCsnFM4/evhWytcyaXDGNyw WiwrI3a1iFJ6zNNvxe+NEcD8NaD96Mg= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=OouSnERn; spf=pass (imf15.hostedemail.com: domain of muchun.song@linux.dev designates 95.215.58.28 as permitted sender) smtp.mailfrom=muchun.song@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690252558; h=from:from:sender: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:dkim-signature; bh=0+VnVPZa4UeOCG7Yrfiew8gKr6k3ViuPV5Oe7aKEwA0=; b=sM3v4NOGAQWIJCn/SXPdj9rUizjLpgLN40pSkIrfwEZr7ChIUrtYS4EJy3yZyvWJNPo32e B4dbwp9HQxeSUqu8A45ybSZHk34g8PETlGlFxcU6kAKLHs7cnV2ygKQOfgSt0632AwFOGL HWQdx4Hvv+nM7qhKCc8Wae9+quweESQ= 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-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 3595EA0005 X-Stat-Signature: kxwnfcm5x16xkxmhiw3p7ozp13zcr9o9 X-Rspam-User: X-HE-Tag: 1690252557-453512 X-HE-Meta: U2FsdGVkX1+8cMuGwfXL8W9tgFUwLHUR7x7dbGjOzXAqIrgIyV0abDuD1+5zuHrCQ92X9ZG67Lq/6TH688XecvraG3uKVKLpEW8llqLFwADFzdir9HlJzwtmHPcmYpr5A0S+CnJeOLOsO0xOFMpEnH1bikCDczkWQTIBCdrEeEOdfwdqQZBu6J8/JWSqfqAUucTPK+k/7aFAyicTWyEBhd+ECcY7tJSRutbUcStL6S4+F6EIcxZ8VMV6yRIInpuEfBdrE9r2sKHpd5wkUCTPAv49DRU1k4oOTxtLHyrcRB79+n+OHK+mNflsjWEZbN/nEjfgypbpkJQiFaTdSiTZjSE5e8/qh1ewl/Gz4gazXey+cPslxPt+n4/PWP9htHCs6XrA7+S+Z1QZcwAd26FaWwnGNO2v5ya5IQBFKOjoxmEw5k4K9oaB3iuyxqlILp/G9hqgpZfIgwTsMvR1fpiq+9BtzFcVgIJp59Bzrj0jBYJFrUJylVqs5yxeOMXczIOdQyv0rUATXtGbAPhEtH96JdUr/iONVn7c4a2NxBAFYeKiChvvLBgLcEiluilocLI/YX3PeJIpH7JGyHzWryams15wi+KP1MemOIf5tN52KaxzDQ8+wuSu61Jv0a8HaPV3/QfLcsTUMoCqXiQuxqqV/HkYc6O4YtrN8m+cD08OL1VJBmyIEi4JnGS3WUv14uEeKtlEp1rxM6rYh3dCh/e063BrDMXUckHz8/lmdTQhcAXTCWRxcEjy26LecRvT47/fkGpq31E9HFBYkJG0giMZxTD9dTVh3AzLdAge+HBB/6nGCluD+vnD0Abe0gQJ9OUhChUCkJ0fPA/TMLj3TIKHj7v29kKnZj4mpM+q/NMkqwwsUSR6NGx4JqJJKIm89GRD/aTSjKjMVBrTkeb8os0tE3ycUb0V7ECYCi1ArJXa2a9cnphpXrt+X6xLa1txV2XUk3pdPmKmHX1587fHLWm IhEqdfyL i4WUg2u/+VkQiR2yWFpT0sskBD8CJnr81CCTc8xPRXl4DaqBJh0DS+rrJR9hpwzt3NSLhzCAT0oEadhp0v+EDbaIGdDtCFnR9+w6GOGOpPtf2xkYLGh2dQEpwqZxj85YPBHsW3sGjNSTjdwxK34+9yncTlw== 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 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.