Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp675424rwb; Wed, 26 Jul 2023 00:31:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlGE+MdbxYzHv+7crfczI09Qvb+2cMPpRrMYj5AIYTTeFa4UT/7tVI+F++ndlLhMYkvmdWmM X-Received: by 2002:a05:6a21:71cb:b0:137:48cc:9cfa with SMTP id ay11-20020a056a2171cb00b0013748cc9cfamr1088642pzc.24.1690356694946; Wed, 26 Jul 2023 00:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690356694; cv=none; d=google.com; s=arc-20160816; b=DHzzvni+4hCO2dMylVWA15TI+Z2ouWsS12DATEGUSSiZ1EBHsPA4O547xfnS/msenh qoksp3JBZh1zGxQs7yO0DbtaRSjpuVAPRHla6bQYYQJ9IXHtxFIDcTL+5vJLpTxF4QMD Emea8AkNkURy5lJ6AMubO0b67krmXPfcXxOvlhCLe/mwyEz0tG1HJ3SazkPaRE0CjwRW 1zDUPGg1JjZmCmt3S++oTKSpvsY8EaJdaNQMKFhRDG0Om+y6D7g0dSNxrmzE8ayZeWe4 f6AjcOHV70+92Qw512SbT3MdDKJIkzGfhLd3AgS7apMLnzGJXkmkQtVRFDhLgcvyXlA3 FJig== 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=PGcKZp3hFkU5xFrSCjAkw6H7DFoCu3eaWoJYWwGl/BE=; fh=G5Ivpgr6jpacEdHMoxfoNLtYLWx4G+pEaINoSx6siHM=; b=En0aYl8eFb2zIayhBZDB+v5m3A+lpjEaMkqYVBqigq1pE9m9sPAN2s8prRtTZ5w5ou 2lLDdsXhGeHaWctI4ow9nIYLx5kzlqF/SmK9Q3QDUSy1R3KL3sRPOYPufA0DhVYCurxp RMorjTNrA+nRIVn+23MRbqdMZOk79zIZcGfgeoY+qb8ORIohnqh/vrJifHFZOvcgR9/f p+6CgSzlhjNAyGSKgUOLxeLBxG7lmOYHNAVaqhwe+IPM7AlVq9kSsmJtdFyO2v0o3tyu /7YTTv5h9G9hyiDjVRNIGk7hplFa+Qa7eIZIWLK+Tpss1WGbU3hH8O4AXGqdpFmPGTO2 xVcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=oAdnd9nZ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 ea17-20020a056a004c1100b006797c2c00besi12644386pfb.144.2023.07.26.00.31.22; Wed, 26 Jul 2023 00:31:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=oAdnd9nZ; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 S232297AbjGZHRT (ORCPT + 99 others); Wed, 26 Jul 2023 03:17:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232281AbjGZHQo (ORCPT ); Wed, 26 Jul 2023 03:16:44 -0400 Received: from out-61.mta0.migadu.com (out-61.mta0.migadu.com [91.218.175.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1CCF4688; Wed, 26 Jul 2023 00:14:04 -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=1690355641; 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=PGcKZp3hFkU5xFrSCjAkw6H7DFoCu3eaWoJYWwGl/BE=; b=oAdnd9nZjeI3kyPEsvbWMnutbGwA6A/dnneU8CJq7+Jt5loXWooRhnwIByjGtqjMSkXONA pNjiGN0aO6zYh0sGJrXLfhIGW2JwY9JyCA6cMT7CdHDW/adI6zyBptMVHroPA7pSViOJ/f hCfYb58R4eJqbPwcBX6PzM13HtrcK50= MIME-Version: 1.0 Subject: Re: [PATCH v2 21/47] mm: workingset: dynamically allocate the mm-shadow shrinker X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20230724094354.90817-22-zhengqi.arch@bytedance.com> Date: Wed, 26 Jul 2023 15:13:37 +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, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, 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@vger.kernel.org, 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: <08F2140B-0684-4FB0-8FB9-CEB88882F884@linux.dev> References: <20230724094354.90817-1-zhengqi.arch@bytedance.com> <20230724094354.90817-22-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-nfs@vger.kernel.org > On Jul 24, 2023, at 17:43, Qi Zheng = wrote: >=20 > Use new APIs to dynamically allocate the mm-shadow shrinker. >=20 > Signed-off-by: Qi Zheng > --- > mm/workingset.c | 26 ++++++++++++++------------ > 1 file changed, 14 insertions(+), 12 deletions(-) >=20 > diff --git a/mm/workingset.c b/mm/workingset.c > index 4686ae363000..4bc85f739b13 100644 > --- a/mm/workingset.c > +++ b/mm/workingset.c > @@ -762,12 +762,7 @@ static unsigned long scan_shadow_nodes(struct = shrinker *shrinker, > NULL); > } >=20 > -static struct shrinker workingset_shadow_shrinker =3D { > - .count_objects =3D count_shadow_nodes, > - .scan_objects =3D scan_shadow_nodes, > - .seeks =3D 0, /* ->count reports only fully expendable nodes */ > - .flags =3D SHRINKER_NUMA_AWARE | SHRINKER_MEMCG_AWARE, > -}; > +static struct shrinker *workingset_shadow_shrinker; Same as patch #17.=