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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2AC1C41513 for ; Wed, 26 Jul 2023 07:07:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232494AbjGZHHw (ORCPT ); Wed, 26 Jul 2023 03:07:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232374AbjGZHHh (ORCPT ); Wed, 26 Jul 2023 03:07:37 -0400 Received: from out-32.mta1.migadu.com (out-32.mta1.migadu.com [95.215.58.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C9EA3A90; Wed, 26 Jul 2023 00:05:10 -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=1690355108; 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=KXYamYs9irq65yhoLRu1td82YuFMeMDqOuwaU+oDyHM=; b=USoqEnOQU6eM3+N9zIAHCDwhNC+8+UNIWLHIgerhexBlGJCaVmSRSO1wU4o3mjHNGYO9Rs DYRZMApHrS1Pjvb6NJH1mJ50Vk6voJ6kQPH4oorM80xUHt6/RAFEITooiN15iQlceLlIh+ 2SDmjYt2iC3yWxkOb7vPU57vNB82awk= MIME-Version: 1.0 Subject: Re: [PATCH v2 17/47] rcu: dynamically allocate the rcu-lazy 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-18-zhengqi.arch@bytedance.com> Date: Wed, 26 Jul 2023 15:04:30 +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, senozhatsky@chromium.org, 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: <3A164818-56E1-4EB4-A927-1B2D23B81659@linux.dev> References: <20230724094354.90817-1-zhengqi.arch@bytedance.com> <20230724094354.90817-18-zhengqi.arch@bytedance.com> To: Qi Zheng X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org > On Jul 24, 2023, at 17:43, Qi Zheng = wrote: >=20 > Use new APIs to dynamically allocate the rcu-lazy shrinker. >=20 > Signed-off-by: Qi Zheng > --- > kernel/rcu/tree_nocb.h | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) >=20 > diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h > index 43229d2b0c44..919f17561733 100644 > --- a/kernel/rcu/tree_nocb.h > +++ b/kernel/rcu/tree_nocb.h > @@ -1397,12 +1397,7 @@ lazy_rcu_shrink_scan(struct shrinker *shrink, = struct shrink_control *sc) > return count ? count : SHRINK_STOP; > } >=20 > -static struct shrinker lazy_rcu_shrinker =3D { > - .count_objects =3D lazy_rcu_shrink_count, > - .scan_objects =3D lazy_rcu_shrink_scan, > - .batch =3D 0, > - .seeks =3D DEFAULT_SEEKS, > -}; > +static struct shrinker *lazy_rcu_shrinker; Seems there is no users of this variable, maybe we could drop this.