Re: [Intel-gfx] [PATCH 24/29] mm: vmscan: make global slab shrink lockless

2023-07-06 Thread Qi Zheng
On 2023/7/4 11:45, Qi Zheng wrote: On 2023/7/4 00:39, Paul E. McKenney wrote: On Fri, Jun 23, 2023 at 04:29:39PM +1000, Dave Chinner wrote: On Thu, Jun 22, 2023 at 05:12:02PM +0200, Vlastimil Babka wrote: On 6/22/23 10:53, Qi Zheng wrote: @@ -1067,33 +1068,27 @@ static unsigned long

Re: [Intel-gfx] [PATCH 24/29] mm: vmscan: make global slab shrink lockless

2023-07-06 Thread Qi Zheng
On 2023/7/4 00:39, Paul E. McKenney wrote: On Fri, Jun 23, 2023 at 04:29:39PM +1000, Dave Chinner wrote: On Thu, Jun 22, 2023 at 05:12:02PM +0200, Vlastimil Babka wrote: On 6/22/23 10:53, Qi Zheng wrote: @@ -1067,33 +1068,27 @@ static unsigned long shrink_slab(gfp_t gfp_mask, int nid

Re: [Intel-gfx] [PATCH 24/29] mm: vmscan: make global slab shrink lockless

2023-07-06 Thread Qi Zheng
Hi Dave, On 2023/6/24 19:08, Qi Zheng wrote: Hi Dave, On 2023/6/24 06:19, Dave Chinner wrote: On Fri, Jun 23, 2023 at 09:10:57PM +0800, Qi Zheng wrote: On 2023/6/23 14:29, Dave Chinner wrote: On Thu, Jun 22, 2023 at 05:12:02PM +0200, Vlastimil Babka wrote: On 6/22/23 10:53, Qi Zheng wrote

Re: [Intel-gfx] [PATCH 24/29] mm: vmscan: make global slab shrink lockless

2023-06-27 Thread Qi Zheng
On 2023/6/24 19:08, Qi Zheng wrote: Hi Dave, On 2023/6/24 06:19, Dave Chinner wrote: On Fri, Jun 23, 2023 at 09:10:57PM +0800, Qi Zheng wrote: On 2023/6/23 14:29, Dave Chinner wrote: On Thu, Jun 22, 2023 at 05:12:02PM +0200, Vlastimil Babka wrote: On 6/22/23 10:53, Qi Zheng wrote: Yes

[Intel-gfx] [PATCH 14/29] jbd2, ext4: dynamically allocate the jbd2-journal shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the jbd2-journal shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct journal_s. S

Re: [Intel-gfx] [PATCH 29/29] mm: shrinker: move shrinker-related code into a separate file

2023-06-27 Thread Qi Zheng
Hi Sergey, On 2023/6/23 13:25, Sergey Senozhatsky wrote: On (23/06/22 16:53), Qi Zheng wrote: +/* + * Remove one + */ +void unregister_shrinker(struct shrinker *shrinker) +{ + struct dentry *debugfs_entry; + int debugfs_id; + + if (!(shrinker->flags & SHRINKER_REG

Re: [Intel-gfx] [PATCH 24/29] mm: vmscan: make global slab shrink lockless

2023-06-27 Thread Qi Zheng
On 2023/6/22 23:12, Vlastimil Babka wrote: On 6/22/23 10:53, Qi Zheng wrote: The shrinker_rwsem is a global read-write lock in shrinkers subsystem, which protects most operations such as slab shrink, registration and unregistration of shrinkers, etc. This can easily cause problems in the

[Intel-gfx] [PATCH 21/29] fs: super: dynamically allocate the s_shrink

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the s_shrink, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct super_block. Signed-off-by: Qi Zheng --

Re: [Intel-gfx] [PATCH 29/29] mm: shrinker: move shrinker-related code into a separate file

2023-06-27 Thread Qi Zheng
Hi Vlastimil, On 2023/6/22 22:53, Vlastimil Babka wrote: On 6/22/23 10:53, Qi Zheng wrote: The mm/vmscan.c file is too large, so separate the shrinker-related code from it into a separate file. No functional changes. Signed-off-by: Qi Zheng Maybe do this move as patch 01 so the further

[Intel-gfx] [PATCH 20/29] zsmalloc: dynamically allocate the mm-zspool shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the mm-zspool shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct zs_pool. Signed-off-by: Qi

Re: [Intel-gfx] [PATCH 24/29] mm: vmscan: make global slab shrink lockless

2023-06-27 Thread Qi Zheng
On 2023/6/23 01:41, Alan Huang wrote: 2023年6月23日 上午12:42,Qi Zheng 写道: On 2023/6/22 23:12, Vlastimil Babka wrote: On 6/22/23 10:53, Qi Zheng wrote: The shrinker_rwsem is a global read-write lock in shrinkers subsystem, which protects most operations such as slab shrink, registration

[Intel-gfx] [PATCH 05/29] drm/panfrost: dynamically allocate the drm-panfrost shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the drm-panfrost shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct panfrost_d

[Intel-gfx] [PATCH 10/29] vmw_balloon: dynamically allocate the vmw-balloon shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the vmw-balloon shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct vmballoon. Signed-off-by: Qi

[Intel-gfx] [PATCH 23/29] mm: shrinker: add refcount and completion_wait fields

2023-06-27 Thread Qi Zheng
This commit introduces refcount and completion_wait fields to struct shrinker to manage the life cycle of shrinker instance. Just a preparation work for implementing the lockless slab shrink, no functional changes. Signed-off-by: Qi Zheng --- include/linux/shrinker.h | 11 +++ mm

[Intel-gfx] [PATCH 03/29] drm/i915: dynamically allocate the i915_gem_mm shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the i915_gem_mm shrinker, so that it can be freed asynchronously by using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct drm_i915_pr

[Intel-gfx] [PATCH 12/29] mbcache: dynamically allocate the mbcache shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the mbcache shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct mb_cache. Signed-o

[Intel-gfx] [PATCH 00/29] use refcount+RCU method to implement lockless slab shrink

2023-06-27 Thread Qi Zheng
From: Qi Zheng Hi all, 1. Background = We used to implement the lockless slab shrink with SRCU [1], but then kernel test robot reported -88.8% regression in stress-ng.ramfs.ops_per_sec test case [2], so we reverted it [3]. This patch series aims to re-implement the lockless slab

[Intel-gfx] [PATCH 11/29] virtio_balloon: dynamically allocate the virtio-balloon shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the virtio-balloon shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct virtio_balloon. Signed-off-b

[Intel-gfx] [PATCH 14/29] jbd2, ext4: dynamically allocate the jbd2-journal shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the jbd2-journal shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct journal_s. Signed-off-by: Qi

[Intel-gfx] [PATCH 04/29] drm/msm: dynamically allocate the drm-msm_gem shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the drm-msm_gem shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct msm_drm_pr

[Intel-gfx] [PATCH 11/29] virtio_balloon: dynamically allocate the virtio-balloon shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the virtio-balloon shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct virtio_ba

[Intel-gfx] [PATCH 24/29] mm: vmscan: make global slab shrink lockless

2023-06-27 Thread Qi Zheng
9.38938-1-zhengqi.a...@bytedance.com/ [2]. https://lore.kernel.org/lkml/202305230837.db2c233f-yujie@intel.com/ [3]. https://lore.kernel.org/all/20230609081518.3039120-1-qi.zh...@linux.dev/ [4]. https://lore.kernel.org/lkml/zijhou1d55d4h...@dread.disaster.area/ Signed-off-by: Qi Zheng --- incl

[Intel-gfx] [PATCH 13/29] ext4: dynamically allocate the ext4-es shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the ext4-es shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct ext4_sb_info. Signe

[Intel-gfx] [PATCH 02/29] mm: vmscan: introduce some helpers for dynamically allocating shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng Introduce some helpers for dynamically allocating shrinker instance, and their uses are as follows: 1. shrinker_alloc_and_init() Used to allocate and initialize a shrinker instance, the priv_data parameter is used to pass the pointer of the previously embedded structure of the

[Intel-gfx] [PATCH 00/29] use refcount+RCU method to implement lockless slab shrink

2023-06-27 Thread Qi Zheng
From: Qi Zheng Hi all, 1. Background = We used to implement the lockless slab shrink with SRCU [1], but then kernel test robot reported -88.8% regression in stress-ng.ramfs.ops_per_sec test case [2], so we reverted it [3]. This patch series aims to re-implement the lockless slab

Re: [Intel-gfx] [PATCH 24/29] mm: vmscan: make global slab shrink lockless

2023-06-27 Thread Qi Zheng
Hi Dave, On 2023/6/24 06:19, Dave Chinner wrote: On Fri, Jun 23, 2023 at 09:10:57PM +0800, Qi Zheng wrote: On 2023/6/23 14:29, Dave Chinner wrote: On Thu, Jun 22, 2023 at 05:12:02PM +0200, Vlastimil Babka wrote: On 6/22/23 10:53, Qi Zheng wrote: Yes, I suggested the IDR route because radix

Re: [Intel-gfx] [PATCH 15/29] NFSD: dynamically allocate the nfsd-client shrinker

2023-06-27 Thread Qi Zheng
Hi Chuck, On 2023/6/24 05:49, Chuck Lever wrote: On Thu, Jun 22, 2023 at 04:53:21PM +0800, Qi Zheng wrote: In preparation for implementing lockless slab shrink, we need to dynamically allocate the nfsd-client shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn&#

[Intel-gfx] [PATCH 04/29] drm/msm: dynamically allocate the drm-msm_gem shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the drm-msm_gem shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct msm_drm_private. Signed-off-b

[Intel-gfx] [PATCH 15/29] NFSD: dynamically allocate the nfsd-client shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the nfsd-client shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct nfsd_net. Signed-off-by: Qi

[Intel-gfx] [PATCH 19/29] xfs: dynamically allocate the xfs-qm shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the xfs-qm shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct xfs_quotainfo. Signed-off-by: Qi

[Intel-gfx] [PATCH 05/29] drm/panfrost: dynamically allocate the drm-panfrost shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the drm-panfrost shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct panfrost_device. Signed-off-b

Re: [Intel-gfx] [PATCH 24/29] mm: vmscan: make global slab shrink lockless

2023-06-27 Thread Qi Zheng
On 2023/6/23 14:29, Dave Chinner wrote: On Thu, Jun 22, 2023 at 05:12:02PM +0200, Vlastimil Babka wrote: On 6/22/23 10:53, Qi Zheng wrote: @@ -1067,33 +1068,27 @@ static unsigned long shrink_slab(gfp_t gfp_mask, int nid, if (!mem_cgroup_disabled() && !mem_cgroup_is_ro

[Intel-gfx] [PATCH 08/29] md/raid5: dynamically allocate the md-raid5 shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the md-raid5 shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct r5conf. Signed-off-by: Qi

[Intel-gfx] [PATCH 25/29] mm: vmscan: make memcg slab shrink lockless

2023-06-27 Thread Qi Zheng
see that the first perf hotspot becomes shrink_slab, which is what we expect. Signed-off-by: Qi Zheng --- mm/vmscan.c | 58 + 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 767569698946..357a1f2

Re: [Intel-gfx] [PATCH 05/29] drm/panfrost: dynamically allocate the drm-panfrost shrinker

2023-06-27 Thread Qi Zheng
Hi Steven, The email you replied to was the failed version (due to the error below), so I copied your reply and replied to you on this successful version. (4.7.1 Error: too many recipients from 49.7.199.173) On 2023/6/23 18:01, Steven Price wrote: > On 22/06/2023 09:39, Qi Zheng wrote: >

Re: [Intel-gfx] [PATCH 00/29] use refcount+RCU method to implement lockless slab shrink

2023-06-27 Thread Qi Zheng
Hi all, Well, this one was sent successfully. Since I always get the following error message, I deleted the original cc people and only kept the mailing lists. 4.7.1 Error: too many recipients from 49.7.199.173 Thanks, Qi

[Intel-gfx] [PATCH 09/29] bcache: dynamically allocate the md-bcache shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the md-bcache shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct cache_set. Signe

[Intel-gfx] [PATCH 16/29] NFSD: dynamically allocate the nfsd-reply shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the nfsd-reply shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct nfsd_net. Signed-off-by: Qi

[Intel-gfx] [PATCH 03/29] drm/i915: dynamically allocate the i915_gem_mm shrinker

2023-06-27 Thread Qi Zheng
ff-by: Qi Zheng --- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 27 ++-- drivers/gpu/drm/i915/i915_drv.h | 3 ++- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrin

[Intel-gfx] [PATCH 26/29] mm: shrinker: make count and scan in shrinker debugfs lockless

2023-06-27 Thread Qi Zheng
Like global and memcg slab shrink, also make count and scan operations in memory shrinker debugfs lockless. The debugfs_remove_recursive() will wait for debugfs_file_put() to return, so there is no need to call rcu_read_lock() before calling shrinker_try_get(). Signed-off-by: Qi Zheng --- mm

[Intel-gfx] [PATCH 12/29] mbcache: dynamically allocate the mbcache shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the mbcache shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct mb_cache. Signed-off-by: Qi

[Intel-gfx] [PATCH 01/29] mm: shrinker: add shrinker::private_data field

2023-06-27 Thread Qi Zheng
To prepare for the dynamic allocation of shrinker instances embedded in other structures, add a private_data field to struct shrinker, so that we can use shrinker::private_data to record and get the original embedded structure. Signed-off-by: Qi Zheng --- include/linux/shrinker.h | 2 ++ 1 file

[Intel-gfx] [PATCH 29/29] mm: shrinker: move shrinker-related code into a separate file

2023-06-27 Thread Qi Zheng
The mm/vmscan.c file is too large, so separate the shrinker-related code from it into a separate file. No functional changes. Signed-off-by: Qi Zheng --- include/linux/shrinker.h | 3 + mm/Makefile | 4 +- mm/shrinker.c| 750

[Intel-gfx] [PATCH 27/29] mm: vmscan: hold write lock to reparent shrinker nr_deferred

2023-06-27 Thread Qi Zheng
shrinker_rwsem to reparent. Signed-off-by: Qi Zheng --- mm/vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 357a1f2ad690..0711b63e68d9 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -433,7 +433,7 @@ void reparent_shrinker_deferred(struct

[Intel-gfx] [PATCH 18/29] xfs: dynamically allocate the xfs-inodegc shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the xfs-inodegc shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct xfs_mount. Signed-off-by: Qi

[Intel-gfx] [PATCH 02/29] mm: vmscan: introduce some helpers for dynamically allocating shrinker

2023-06-27 Thread Qi Zheng
. 2. shrinker_free() Used to free the shrinker instance when the registration of shrinker fails. 3. unregister_and_free_shrinker() Used to unregister and free the shrinker instance, and the kfree() will be changed to kfree_rcu() later. Signed-off-by: Qi Zheng --- include/linux/shrinker.h | 12

[Intel-gfx] [PATCH 01/29] mm: shrinker: add shrinker::private_data field

2023-06-27 Thread Qi Zheng
From: Qi Zheng To prepare for the dynamic allocation of shrinker instances embedded in other structures, add a private_data field to struct shrinker, so that we can use shrinker::private_data to record and get the original embedded structure. Signed-off-by: Qi Zheng --- include/linux

[Intel-gfx] [PATCH 06/29] dm: dynamically allocate the dm-bufio shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the dm-bufio shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct dm_bufio_client. Signed-off-by: Qi

[Intel-gfx] [PATCH 09/29] bcache: dynamically allocate the md-bcache shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the md-bcache shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct cache_set. Signed-off-by: Qi

[Intel-gfx] [PATCH 22/29] drm/ttm: introduce pool_shrink_rwsem

2023-06-27 Thread Qi Zheng
update before freeing memory. So we introduce a new pool_shrink_rwsem to implement a private synchronize_shrinkers(), so as to achieve the same purpose. Signed-off-by: Qi Zheng --- drivers/gpu/drm/ttm/ttm_pool.c | 15 +++ include/linux/shrinker.h | 1 - mm/vmscan.c

[Intel-gfx] [PATCH 13/29] ext4: dynamically allocate the ext4-es shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the ext4-es shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct ext4_sb_info. Signed-off-by: Qi

[Intel-gfx] [PATCH 06/29] dm: dynamically allocate the dm-bufio shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the dm-bufio shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct dm_bufio_client. S

[Intel-gfx] [PATCH 01/29] mm: shrinker: add shrinker::private_data field

2023-06-27 Thread Qi Zheng
From: Qi Zheng To prepare for the dynamic allocation of shrinker instances embedded in other structures, add a private_data field to struct shrinker, so that we can use shrinker::private_data to record and get the original embedded structure. Signed-off-by: Qi Zheng --- include/linux

[Intel-gfx] [PATCH 07/29] dm zoned: dynamically allocate the dm-zoned-meta shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the dm-zoned-meta shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct dmz_metadata. Signed-off-b

[Intel-gfx] [PATCH 10/29] vmw_balloon: dynamically allocate the vmw-balloon shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the vmw-balloon shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct vmballoon. S

[Intel-gfx] [PATCH 17/29] xfs: dynamically allocate the xfs-buf shrinker

2023-06-27 Thread Qi Zheng
In preparation for implementing lockless slab shrink, we need to dynamically allocate the xfs-buf shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct xfs_buftarg. Signed-off-by: Qi

Re: [Intel-gfx] [External] Re: [PATCH 01/29] mm: shrinker: add shrinker::private_data field

2023-06-27 Thread Qi Zheng
Hi Vlastimil, On 2023/6/22 22:47, Vlastimil Babka wrote: On 6/22/23 10:53, Qi Zheng wrote: To prepare for the dynamic allocation of shrinker instances embedded in other structures, add a private_data field to struct shrinker, so that we can use shrinker::private_data to record and get the

[Intel-gfx] [PATCH 28/29] mm: shrinkers: convert shrinker_rwsem to mutex

2023-06-27 Thread Qi Zheng
Now there are no readers of shrinker_rwsem, so we can simply replace it with mutex lock. Signed-off-by: Qi Zheng --- drivers/md/dm-cache-metadata.c | 2 +- drivers/md/dm-thin-metadata.c | 2 +- fs/super.c | 2 +- mm/shrinker_debug.c| 14 +++--- mm

[Intel-gfx] [PATCH 00/29] use refcount+RCU method to implement lockless slab shrink

2023-06-27 Thread Qi Zheng
mpleted in 60.12s (1 min, 0.12 secs) We can see that the ops/s has hardly changed. This series is based on next-20230613. Comments and suggestions are welcome. Thanks, Qi. Qi Zheng (29): mm: shrinker: add shrinker::private_data field mm: vmscan: introduce some helpers for dynamically allo

[Intel-gfx] [PATCH 08/29] md/raid5: dynamically allocate the md-raid5 shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the md-raid5 shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct r5conf. Signed-o

[Intel-gfx] [PATCH 07/29] dm zoned: dynamically allocate the dm-zoned-meta shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng In preparation for implementing lockless slab shrink, we need to dynamically allocate the dm-zoned-meta shrinker, so that it can be freed asynchronously using kfree_rcu(). Then it doesn't need to wait for RCU read-side critical section when releasing the struct dmz_met

Re: [Intel-gfx] [PATCH 02/29] mm: vmscan: introduce some helpers for dynamically allocating shrinker

2023-06-27 Thread Qi Zheng
Hi Dave, On 2023/6/23 14:12, Dave Chinner wrote: On Thu, Jun 22, 2023 at 04:53:08PM +0800, Qi Zheng wrote: Introduce some helpers for dynamically allocating shrinker instance, and their uses are as follows: 1. shrinker_alloc_and_init() Used to allocate and initialize a shrinker instance, the

[Intel-gfx] [PATCH 02/29] mm: vmscan: introduce some helpers for dynamically allocating shrinker

2023-06-27 Thread Qi Zheng
From: Qi Zheng Introduce some helpers for dynamically allocating shrinker instance, and their uses are as follows: 1. shrinker_alloc_and_init() Used to allocate and initialize a shrinker instance, the priv_data parameter is used to pass the pointer of the previously embedded structure of the

Re: [Intel-gfx] [External] [PATCH 00/29] use refcount+RCU method to implement lockless slab shrink

2023-06-27 Thread Qi Zheng
This patch set failed to send due to the following reasons, please ignore. 4.7.1 Error: too many recipients from 49.7.199.65