Thread (110 messages) 110 messages, 6 authors, 2023-07-27

Re: [PATCH v2 42/47] drm/ttm: introduce pool_shrink_rwsem

From: Muchun Song <muchun.song@linux.dev>
Date: 2023-07-26 08:05:38
Also in: dm-devel, dri-devel, kvm, linux-arm-msm, linux-bcache, linux-btrfs, linux-ext4, linux-f2fs-devel, linux-fsdevel, linux-mm, linux-nfs, linux-raid, linux-xfs, lkml, rcu, xen-devel

On Jul 24, 2023, at 17:43, Qi Zheng [off-list ref] wrote:

Currently, the synchronize_shrinkers() is only used by TTM pool. It only
requires that no shrinkers run in parallel.

After we use RCU+refcount method to implement the lockless slab shrink,
we can not use shrinker_rwsem or synchronize_rcu() to guarantee that all
shrinker invocations have seen an 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 <redacted>
Reviewed-by: Muchun Song <redacted>

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help