Re: [PATCH v4 01/48] mm: move some shrinker-related function declarations to mm/internal.h

2023-08-16 Thread Muchun Song
remove() > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song One nit bellow. [...] > + > +/* > + * shrinker related functions > + */ This is a multi-comment format. "/* shrinker related functions. */" is the right one-line format of comment. > + > +#ifde

Re: [PATCH v4 02/48] mm: vmscan: move shrinker-related code into a separate file

2023-08-16 Thread Muchun Song
> On Aug 7, 2023, at 19:08, 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 Reviewed-by: Muchun Song

Re: [PATCH v4 12/48] gfs2: dynamically allocate the gfs2-qd shrinker

2023-08-16 Thread Muchun Song
> On Aug 7, 2023, at 19:09, Qi Zheng wrote: > > Use new APIs to dynamically allocate the gfs2-qd shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v4 19/48] rcu: dynamically allocate the rcu-kfree shrinker

2023-08-08 Thread Muchun Song
> On Aug 7, 2023, at 19:09, Qi Zheng wrote: > > Use new APIs to dynamically allocate the rcu-kfree shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v4 06/48] binder: dynamically allocate the android-binder shrinker

2023-08-08 Thread Muchun Song
> On Aug 7, 2023, at 19:08, Qi Zheng wrote: > > Use new APIs to dynamically allocate the android-binder shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 40/47] fs: super: dynamically allocate the s_shrink

2023-07-27 Thread Muchun Song
super_block. Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 31/47] mbcache: dynamically allocate the mbcache shrinker

2023-07-27 Thread Muchun Song
e critical section when releasing the struct mb_cache. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 28/47] bcache: dynamically allocate the md-bcache shrinker

2023-07-27 Thread Muchun Song
On 2023/7/24 17:43, Qi Zheng wrote: In preparation for implementing lockless slab shrink, use new APIs 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

Re: [PATCH v2 43/47] mm: shrinker: add a secondary array for shrinker_info::{map, nr_deferred}

2023-07-27 Thread Muchun Song
ld secondary array under the RCU lock, the found map and nr_deferred are > also true, so no data is lost. > > [1]. > https://lore.kernel.org/all/20220228122126.37293-13-songmuc...@bytedance.com/ > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

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

2023-07-27 Thread Muchun Song
ot 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 Reviewed-by: Muchun Song

Re: [PATCH v2 33/47] jbd2, ext4: dynamically allocate the jbd2-journal shrinker

2023-07-27 Thread Muchun Song
read-side critical section when releasing the struct journal_s. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 41/47] mm: shrinker: remove old APIs

2023-07-27 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Now no users are using the old APIs, just remove them. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 38/47] xfs: dynamically allocate the xfs-qm shrinker

2023-07-27 Thread Muchun Song
tical section when releasing the struct xfs_quotainfo. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 36/47] xfs: dynamically allocate the xfs-buf shrinker

2023-07-27 Thread Muchun Song
e critical section when releasing the struct xfs_buftarg. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 29/47] vmw_balloon: dynamically allocate the vmw-balloon shrinker

2023-07-27 Thread Muchun Song
e critical section when releasing the struct vmballoon. > > And we can simply exit vmballoon_init() when registering the shrinker > fails. So the shrinker_registered indication is redundant, just remove it. > > Signed-off-by: Qi Zheng Nice cleanup. Reviewed-by: Muchun Song

Re: [PATCH v2 32/47] ext4: dynamically allocate the ext4-es shrinker

2023-07-27 Thread Muchun Song
e critical section when releasing the struct ext4_sb_info. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 30/47] virtio_balloon: dynamically allocate the virtio-balloon shrinker

2023-07-27 Thread Muchun Song
read-side critical section when releasing the struct virtio_balloon. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 39/47] zsmalloc: dynamically allocate the mm-zspool shrinker

2023-07-27 Thread Muchun Song
e critical section when releasing the struct zs_pool. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 37/47] xfs: dynamically allocate the xfs-inodegc shrinker

2023-07-27 Thread Muchun Song
e critical section when releasing the struct xfs_mount. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 23/47] drm/msm: dynamically allocate the drm-msm_gem shrinker

2023-07-26 Thread Muchun Song
the struct msm_drm_private. Signed-off-by: Qi Zheng Reviewed-by: Muchun Song A nit bellow. --- drivers/gpu/drm/msm/msm_drv.c | 4 ++- drivers/gpu/drm/msm/msm_drv.h | 4 +-- drivers/gpu/drm/msm/msm_gem_shrinker.c | 36 -- 3 files changed, 28

Re: [PATCH v2 13/47] nfs: dynamically allocate the nfs-acl shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the nfs-acl shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 19/47] mm: thp: dynamically allocate the thp-related shrinkers

2023-07-26 Thread Muchun Song
On 2023/7/24 17:43, Qi Zheng wrote: Use new APIs to dynamically allocate the thp-zero and thp-deferred_split shrinkers. Signed-off-by: Qi Zheng --- mm/huge_memory.c | 69 +++- 1 file changed, 45 insertions(+), 24 deletions(-) diff --git

Re: [PATCH v2 17/47] rcu: dynamically allocate the rcu-lazy shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the rcu-lazy shrinker. > > Signed-off-by: Qi Zheng > --- > kernel/rcu/tree_nocb.h | 19 +++ > 1 file changed, 11 insertions(+), 8 deletions(-) > > diff --git a/kernel/rcu/tree_nocb.h

Re: [PATCH v2 27/47] md/raid5: dynamically allocate the md-raid5 shrinker

2023-07-26 Thread Muchun Song
e critical section when releasing the struct r5conf. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 25/47] dm: dynamically allocate the dm-bufio shrinker

2023-07-26 Thread Muchun Song
e critical section when releasing the struct dm_bufio_client. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 20/47] sunrpc: dynamically allocate the sunrpc_cred shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the sunrpc_cred shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 18/47] rcu: dynamically allocate the rcu-kfree shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the rcu-kfree shrinker. > > Signed-off-by: Qi Zheng > --- > kernel/rcu/tree.c | 21 + > 1 file changed, 13 insertions(+), 8 deletions(-) > > diff --git a/kernel/rcu/tree.c

Re: [PATCH v2 12/47] NFSv4.2: dynamically allocate the nfs-xattr shrinkers

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the nfs-xattr shrinkers. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 07/47] xenbus/backend: dynamically allocate the xen-backend shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the xen-backend shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song Thanks.

Re: [PATCH v2 26/47] dm zoned: dynamically allocate the dm-zoned-meta shrinker

2023-07-26 Thread Muchun Song
read-side critical section when releasing the struct dmz_metadata. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 14/47] nfsd: dynamically allocate the nfsd-filecache shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the nfsd-filecache shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 06/47] drm/ttm: dynamically allocate the drm-ttm_pool shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the drm-ttm_pool shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song Thanks.

Re: [PATCH v2 11/47] gfs2: dynamically allocate the gfs2-qd shrinker

2023-07-26 Thread Muchun Song
On 2023/7/24 17:43, Qi Zheng wrote: Use new APIs to dynamically allocate the gfs2-qd shrinker. Signed-off-by: Qi Zheng --- fs/gfs2/main.c | 6 +++--- fs/gfs2/quota.c | 26 -- fs/gfs2/quota.h | 3 ++- 3 files changed, 25 insertions(+), 10 deletions(-) diff

Re: [PATCH v2 21/47] mm: workingset: dynamically allocate the mm-shadow shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the mm-shadow shrinker. > > Signed-off-by: Qi Zheng > --- > mm/workingset.c | 26 ++ > 1 file changed, 14 insertions(+), 12 deletions(-) > > diff --git a/mm/workingset.c

Re: [PATCH v2 04/47] kvm: mmu: dynamically allocate the x86-mmu shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the x86-mmu shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song Thanks.

Re: [PATCH v2 15/47] quota: dynamically allocate the dquota-cache shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the dquota-cache shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 16/47] ubifs: dynamically allocate the ubifs-slab shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the ubifs-slab shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 22/47] drm/i915: dynamically allocate the i915_gem_mm shrinker

2023-07-26 Thread Muchun Song
e critical section when releasing the struct drm_i915_private. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [PATCH v2 10/47] gfs2: dynamically allocate the gfs2-glock shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the gfs2-glock shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song Thanks.

Re: [PATCH v2 09/47] f2fs: dynamically allocate the f2fs-shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the f2fs-shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song Thanks.

Re: [PATCH v2 03/47] mm: shrinker: add infrastructure for dynamically allocating shrinker

2023-07-26 Thread Muchun Song
On 2023/7/24 17:43, Qi Zheng wrote: Currently, the shrinker instances can be divided into the following three types: a) global shrinker instance statically defined in the kernel, such as workingset_shadow_shrinker. b) global shrinker instance statically defined in the kernel modules,

Re: [PATCH v2 08/47] erofs: dynamically allocate the erofs-shrinker

2023-07-26 Thread Muchun Song
> On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Use new APIs to dynamically allocate the erofs-shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song Thanks.

Re: [PATCH v2 01/47] mm: vmscan: move shrinker-related code into a separate file

2023-07-25 Thread Muchun Song
> On Jul 24, 2023, at 17:43, 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 > --- > include/linux/shrinker.h | 3 + > mm/Makefile | 4 +- >

Re: [PATCH v2 01/47] mm: vmscan: move shrinker-related code into a separate file

2023-07-25 Thread Muchun Song
> On Jul 25, 2023, at 11:09, Qi Zheng wrote: > > > > On 2023/7/25 10:35, Muchun Song wrote: >>> On Jul 24, 2023, at 17:43, Qi Zheng wrote: >>> >>> The mm/vmscan.c file is too large, so separate the shrinker-related >>> code

Re: [PATCH v2 02/47] mm: shrinker: remove redundant shrinker_rwsem in debugfs operations

2023-07-25 Thread Muchun Song
re > is no need to hold shrinker_rwsem during debugfs operations. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song Thanks.

Re: [PATCH 2/3] mm/slab: delete cache_alloc_debugcheck_before()

2022-06-12 Thread Muchun Song
-off-by: Daniel Vetter Nice cleanup. Reviewed-by: Muchun Song Thanks.

Re: [PATCH 03/27] mm: remove pointless includes from

2022-02-10 Thread Muchun Song
Gunthorpe > Reviewed-by: Chaitanya Kulkarni Reviewed-by: Muchun Song

Re: [PATCH 4/8] mm: move free_devmap_managed_page to memremap.c

2022-02-08 Thread Muchun Song
On Mon, Feb 7, 2022 at 2:42 PM Christoph Hellwig wrote: > > free_devmap_managed_page has nothing to do with the code in swap.c, > move it to live with the rest of the code for devmap handling. > > Signed-off-by: Christoph Hellwig Reviewed-by: Muchun Song Thanks.

Re: [PATCH 2/8] mm: remove the __KERNEL__ guard from

2022-02-08 Thread Muchun Song
On Mon, Feb 7, 2022 at 2:42 PM Christoph Hellwig wrote: > > __KERNEL__ ifdefs don't make sense outside of include/uapi/. > > Signed-off-by: Christoph Hellwig Reviewed-by: Muchun Song Thanks.

Re: [PATCH 1/8] mm: remove a pointless CONFIG_ZONE_DEVICE check in memremap_pages

2022-02-08 Thread Muchun Song
On Mon, Feb 7, 2022 at 2:36 PM Christoph Hellwig wrote: > > memremap.c is only built when CONFIG_ZONE_DEVICE is set, so remove > the superflous extra check. > > Signed-off-by: Christoph Hellwig Reviewed-by: Muchun Song Thanks.

Re: [External] [PATCH v4] dma-buf: Add DmaBufTotal counter in meminfo

2021-04-17 Thread Muchun Song
On Sat, Apr 17, 2021 at 9:44 PM wrote: > > On 4/17/21 3:07 PM, Muchun Song wrote: > > On Sat, Apr 17, 2021 at 6:41 PM Peter Enderborg > > wrote: > >> This adds a total used dma-buf memory. Details > >> can be found in debugfs, however it is not for everyone &g

Re: [External] [PATCH v4] dma-buf: Add DmaBufTotal counter in meminfo

2021-04-17 Thread Muchun Song
On Sat, Apr 17, 2021 at 6:41 PM Peter Enderborg wrote: > > This adds a total used dma-buf memory. Details > can be found in debugfs, however it is not for everyone > and not always available. dma-buf are indirect allocated by > userspace. So with this value we can monitor and detect > userspace

Re: [External] [PATCH v3] dma-buf: Add DmaBufTotal counter in meminfo

2021-04-17 Thread Muchun Song
On Sat, Apr 17, 2021 at 12:08 AM Peter Enderborg wrote: > > This adds a total used dma-buf memory. Details > can be found in debugfs, however it is not for everyone > and not always available. dma-buf are indirect allocated by > userspace. So with this value we can monitor and detect > userspace

Re: [PATCH v3] drm/virtio: fix missing dma_fence_put() in virtio_gpu_execbuffer_ioctl()

2020-07-30 Thread Muchun Song
> synchronization") > Co-developed-by: Xin He > Signed-off-by: Xin He > Signed-off-by: Qi Liu > Reviewed-by: Muchun Song > --- > > changelog in v3: > 1) Change the subject from "drm/virtio: fixed memory leak in > virtio_gpu_execbuffer_ioctl()" to >