lkml.org 
[lkml]   [2021]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v7 PATCH 09/12] mm: vmscan: use per memcg nr_deferred of shrinker
On Tue, Feb 09, 2021 at 09:46:43AM -0800, Yang Shi wrote:
> Use per memcg's nr_deferred for memcg aware shrinkers. The shrinker's nr_deferred
> will be used in the following cases:
> 1. Non memcg aware shrinkers
> 2. !CONFIG_MEMCG
> 3. memcg is disabled by boot parameter
>
> Signed-off-by: Yang Shi <shy828301@gmail.com>
> ---
> mm/vmscan.c | 78 ++++++++++++++++++++++++++++++++++++++++++++---------
> 1 file changed, 66 insertions(+), 12 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index d4b030a0b2a9..748aa6e90f83 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -368,6 +368,24 @@ static void unregister_memcg_shrinker(struct shrinker *shrinker)
> up_write(&shrinker_rwsem);
> }
>
> +static long count_nr_deferred_memcg(int nid, struct shrinker *shrinker,
> + struct mem_cgroup *memcg)

"Count" is not associated with xchg() semantics in my head, but I don't know
what's the better version. Maybe steal or pop?

Otherwise the patch looks good to me.

Thanks!

\
 
 \ /
  Last update: 2021-02-10 03:21    [W:0.388 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site