All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov@tarantool.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.com>,
	linux-mm@kvack.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] mm: workingset: fix premature shadow node shrinking with cgroups
Date: Thu, 23 Mar 2017 11:28:22 +0300	[thread overview]
Message-ID: <20170323082822.GA17625@esperanza> (raw)
In-Reply-To: <20170322005320.8165-1-hannes@cmpxchg.org>

On Tue, Mar 21, 2017 at 08:53:20PM -0400, Johannes Weiner wrote:
> 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware")
> enabled cgroup-awareness in the shadow node shrinker, but forgot to
> also enable cgroup-awareness in the list_lru the shadow nodes sit on.
> 
> Consequently, all shadow nodes are sitting on a global (per-NUMA node)
> list, while the shrinker applies the limits according to the amount of
> cache in the cgroup its shrinking. The result is excessive pressure on
> the shadow nodes from cgroups that have very little cache.
> 
> Enable memcg-mode on the shadow node LRUs, such that per-cgroup limits
> are applied to per-cgroup lists.
> 
> Fixes: 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware")
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
> Cc: <stable@vger.kernel.org> # 4.6+

Acked-by: Vladimir Davydov <vdavydov@tarantool.org>

> ---
>  mm/workingset.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/workingset.c b/mm/workingset.c
> index ac839fca0e76..eda05c71fa49 100644
> --- a/mm/workingset.c
> +++ b/mm/workingset.c
> @@ -532,7 +532,7 @@ static int __init workingset_init(void)
>  	pr_info("workingset: timestamp_bits=%d max_order=%d bucket_order=%u\n",
>  	       timestamp_bits, max_order, bucket_order);
>  
> -	ret = list_lru_init_key(&shadow_nodes, &shadow_nodes_key);
> +	ret = __list_lru_init(&shadow_nodes, true, &shadow_nodes_key);
>  	if (ret)
>  		goto err;
>  	ret = register_shrinker(&workingset_shadow_shrinker);
> -- 
> 2.12.0
> 

WARNING: multiple messages have this Message-ID
From: Vladimir Davydov <vdavydov@tarantool.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.com>,
	linux-mm@kvack.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] mm: workingset: fix premature shadow node shrinking with cgroups
Date: Thu, 23 Mar 2017 11:28:22 +0300	[thread overview]
Message-ID: <20170323082822.GA17625@esperanza> (raw)
In-Reply-To: <20170322005320.8165-1-hannes@cmpxchg.org>

On Tue, Mar 21, 2017 at 08:53:20PM -0400, Johannes Weiner wrote:
> 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware")
> enabled cgroup-awareness in the shadow node shrinker, but forgot to
> also enable cgroup-awareness in the list_lru the shadow nodes sit on.
> 
> Consequently, all shadow nodes are sitting on a global (per-NUMA node)
> list, while the shrinker applies the limits according to the amount of
> cache in the cgroup its shrinking. The result is excessive pressure on
> the shadow nodes from cgroups that have very little cache.
> 
> Enable memcg-mode on the shadow node LRUs, such that per-cgroup limits
> are applied to per-cgroup lists.
> 
> Fixes: 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware")
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
> Cc: <stable@vger.kernel.org> # 4.6+

Acked-by: Vladimir Davydov <vdavydov@tarantool.org>

> ---
>  mm/workingset.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/workingset.c b/mm/workingset.c
> index ac839fca0e76..eda05c71fa49 100644
> --- a/mm/workingset.c
> +++ b/mm/workingset.c
> @@ -532,7 +532,7 @@ static int __init workingset_init(void)
>  	pr_info("workingset: timestamp_bits=%d max_order=%d bucket_order=%u\n",
>  	       timestamp_bits, max_order, bucket_order);
>  
> -	ret = list_lru_init_key(&shadow_nodes, &shadow_nodes_key);
> +	ret = __list_lru_init(&shadow_nodes, true, &shadow_nodes_key);
>  	if (ret)
>  		goto err;
>  	ret = register_shrinker(&workingset_shadow_shrinker);
> -- 
> 2.12.0
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-03-23  8:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22  0:53 Johannes Weiner
2017-03-22  0:53 ` Johannes Weiner
2017-03-23  8:28 ` Vladimir Davydov [this message]
2017-03-23  8:28   ` Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170323082822.GA17625@esperanza \
    --to=vdavydov@tarantool.org \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --subject='Re: [PATCH] mm: workingset: fix premature shadow node shrinking with cgroups' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.