[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 17/47] rcu: dynamically allocate the rcu-lazy shrinker
- To: Muchun Song <muchun.song@xxxxxxxxx>
- From: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>
- Date: Wed, 26 Jul 2023 17:24:58 +0800
- Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, david@xxxxxxxxxxxxx, tkhai@xxxxx, Vlastimil Babka <vbabka@xxxxxxx>, Roman Gushchin <roman.gushchin@xxxxxxxxx>, djwong@xxxxxxxxxx, Christian Brauner <brauner@xxxxxxxxxx>, "Paul E. McKenney" <paulmck@xxxxxxxxxx>, tytso@xxxxxxx, steven.price@xxxxxxx, cel@xxxxxxxxxx, senozhatsky@xxxxxxxxxxxx, yujie.liu@xxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, x86@xxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-erofs@xxxxxxxxxxxxxxxx, linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx, cluster-devel@xxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, rcu@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, linux-raid@xxxxxxxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx
- Delivery-date: Wed, 26 Jul 2023 09:25:20 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2023/7/26 15:04, Muchun Song wrote:
On Jul 24, 2023, at 17:43, Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx> wrote:
Use new APIs to dynamically allocate the rcu-lazy shrinker.
Signed-off-by: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>
---
kernel/rcu/tree_nocb.h | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
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;
}
-static struct shrinker lazy_rcu_shrinker = {
- .count_objects = lazy_rcu_shrink_count,
- .scan_objects = lazy_rcu_shrink_scan,
- .batch = 0,
- .seeks = DEFAULT_SEEKS,
-};
+static struct shrinker *lazy_rcu_shrinker;
Seems there is no users of this variable, maybe we could drop
this.
Yeah, will change it to a local variable. And the patch #15 is
the same.
|