All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction
@ 2021-07-30  6:26 ` Baolin Wang
  0 siblings, 0 replies; 10+ messages in thread
From: Baolin Wang @ 2021-07-30  6:26 UTC (permalink / raw)
  To: akpm, hannes, mhocko, vdavydov.dev
  Cc: baolin.wang, cgroups, linux-mm, linux-kernel

Since commit c843966c556d ("mm: allow swappiness that prefers reclaiming
anon over the file workingset") has expended the swappiness value to
make swap to be preferred in some systems. We should also change the
memcg swappiness restriction to allow memcg swap-preferred.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6580c23..988fc94 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4046,7 +4046,7 @@ static int mem_cgroup_swappiness_write(struct cgroup_subsys_state *css,
 {
 	struct mem_cgroup *memcg = mem_cgroup_from_css(css);
 
-	if (val > 100)
+	if (val > 200)
 		return -EINVAL;
 
 	if (!mem_cgroup_is_root(memcg))
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction
@ 2021-07-30  6:26 ` Baolin Wang
  0 siblings, 0 replies; 10+ messages in thread
From: Baolin Wang @ 2021-07-30  6:26 UTC (permalink / raw)
  To: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	hannes-druUgvl0LCNAfugRpC6u6w, mhocko-DgEjT+Ai2ygdnm+yROfE0A,
	vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w
  Cc: baolin.wang-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf,
	cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Since commit c843966c556d ("mm: allow swappiness that prefers reclaiming
anon over the file workingset") has expended the swappiness value to
make swap to be preferred in some systems. We should also change the
memcg swappiness restriction to allow memcg swap-preferred.

Signed-off-by: Baolin Wang <baolin.wang-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6580c23..988fc94 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4046,7 +4046,7 @@ static int mem_cgroup_swappiness_write(struct cgroup_subsys_state *css,
 {
 	struct mem_cgroup *memcg = mem_cgroup_from_css(css);
 
-	if (val > 100)
+	if (val > 200)
 		return -EINVAL;
 
 	if (!mem_cgroup_is_root(memcg))
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction
@ 2021-07-30  6:39   ` Michal Hocko
  0 siblings, 0 replies; 10+ messages in thread
From: Michal Hocko @ 2021-07-30  6:39 UTC (permalink / raw)
  To: Baolin Wang; +Cc: akpm, hannes, vdavydov.dev, cgroups, linux-mm, linux-kernel

On Fri 30-07-21 14:26:35, Baolin Wang wrote:
> Since commit c843966c556d ("mm: allow swappiness that prefers reclaiming
> anon over the file workingset") has expended the swappiness value to
> make swap to be preferred in some systems. We should also change the
> memcg swappiness restriction to allow memcg swap-preferred.
> 
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>

Yes, this looks like an omission. It doesn't really make sense to have
two different constrains on the value.

Acked-by: Michal Hocko <mhocko@suse.com>

Thanks!

> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 6580c23..988fc94 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -4046,7 +4046,7 @@ static int mem_cgroup_swappiness_write(struct cgroup_subsys_state *css,
>  {
>  	struct mem_cgroup *memcg = mem_cgroup_from_css(css);
>  
> -	if (val > 100)
> +	if (val > 200)
>  		return -EINVAL;
>  
>  	if (!mem_cgroup_is_root(memcg))
> -- 
> 1.8.3.1

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction
@ 2021-07-30  6:39   ` Michal Hocko
  0 siblings, 0 replies; 10+ messages in thread
From: Michal Hocko @ 2021-07-30  6:39 UTC (permalink / raw)
  To: Baolin Wang
  Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	hannes-druUgvl0LCNAfugRpC6u6w,
	vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w,
	cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Fri 30-07-21 14:26:35, Baolin Wang wrote:
> Since commit c843966c556d ("mm: allow swappiness that prefers reclaiming
> anon over the file workingset") has expended the swappiness value to
> make swap to be preferred in some systems. We should also change the
> memcg swappiness restriction to allow memcg swap-preferred.
> 
> Signed-off-by: Baolin Wang <baolin.wang-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org>

Yes, this looks like an omission. It doesn't really make sense to have
two different constrains on the value.

Acked-by: Michal Hocko <mhocko-IBi9RG/b67k@public.gmane.org>

Thanks!

> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 6580c23..988fc94 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -4046,7 +4046,7 @@ static int mem_cgroup_swappiness_write(struct cgroup_subsys_state *css,
>  {
>  	struct mem_cgroup *memcg = mem_cgroup_from_css(css);
>  
> -	if (val > 100)
> +	if (val > 200)
>  		return -EINVAL;
>  
>  	if (!mem_cgroup_is_root(memcg))
> -- 
> 1.8.3.1

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction
@ 2021-08-03 15:20     ` Vlastimil Babka
  0 siblings, 0 replies; 10+ messages in thread
From: Vlastimil Babka @ 2021-08-03 15:20 UTC (permalink / raw)
  To: Michal Hocko, Baolin Wang
  Cc: akpm, hannes, vdavydov.dev, cgroups, linux-mm, linux-kernel

On 7/30/21 8:39 AM, Michal Hocko wrote:
> On Fri 30-07-21 14:26:35, Baolin Wang wrote:
>> Since commit c843966c556d ("mm: allow swappiness that prefers reclaiming
>> anon over the file workingset") has expended the swappiness value to
>> make swap to be preferred in some systems. We should also change the
>> memcg swappiness restriction to allow memcg swap-preferred.
>> 
>> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> 
> Yes, this looks like an omission. It doesn't really make sense to have
> two different constrains on the value.
> 
> Acked-by: Michal Hocko <mhocko@suse.com>

So, also Fixes: c843966c556d ("mm: allow swappiness that prefers reclaiming anon
over the file workingset")
?

> Thanks!
> 
>> ---
>>  mm/memcontrol.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
>> index 6580c23..988fc94 100644
>> --- a/mm/memcontrol.c
>> +++ b/mm/memcontrol.c
>> @@ -4046,7 +4046,7 @@ static int mem_cgroup_swappiness_write(struct cgroup_subsys_state *css,
>>  {
>>  	struct mem_cgroup *memcg = mem_cgroup_from_css(css);
>>  
>> -	if (val > 100)
>> +	if (val > 200)
>>  		return -EINVAL;
>>  
>>  	if (!mem_cgroup_is_root(memcg))
>> -- 
>> 1.8.3.1
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction
@ 2021-08-03 15:20     ` Vlastimil Babka
  0 siblings, 0 replies; 10+ messages in thread
From: Vlastimil Babka @ 2021-08-03 15:20 UTC (permalink / raw)
  To: Michal Hocko, Baolin Wang
  Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	hannes-druUgvl0LCNAfugRpC6u6w,
	vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w,
	cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 7/30/21 8:39 AM, Michal Hocko wrote:
> On Fri 30-07-21 14:26:35, Baolin Wang wrote:
>> Since commit c843966c556d ("mm: allow swappiness that prefers reclaiming
>> anon over the file workingset") has expended the swappiness value to
>> make swap to be preferred in some systems. We should also change the
>> memcg swappiness restriction to allow memcg swap-preferred.
>> 
>> Signed-off-by: Baolin Wang <baolin.wang-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org>
> 
> Yes, this looks like an omission. It doesn't really make sense to have
> two different constrains on the value.
> 
> Acked-by: Michal Hocko <mhocko-IBi9RG/b67k@public.gmane.org>

So, also Fixes: c843966c556d ("mm: allow swappiness that prefers reclaiming anon
over the file workingset")
?

> Thanks!
> 
>> ---
>>  mm/memcontrol.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
>> index 6580c23..988fc94 100644
>> --- a/mm/memcontrol.c
>> +++ b/mm/memcontrol.c
>> @@ -4046,7 +4046,7 @@ static int mem_cgroup_swappiness_write(struct cgroup_subsys_state *css,
>>  {
>>  	struct mem_cgroup *memcg = mem_cgroup_from_css(css);
>>  
>> -	if (val > 100)
>> +	if (val > 200)
>>  		return -EINVAL;
>>  
>>  	if (!mem_cgroup_is_root(memcg))
>> -- 
>> 1.8.3.1
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction
@ 2021-08-03 15:45       ` Baolin Wang
  0 siblings, 0 replies; 10+ messages in thread
From: Baolin Wang @ 2021-08-03 15:45 UTC (permalink / raw)
  To: Vlastimil Babka, Michal Hocko
  Cc: akpm, hannes, vdavydov.dev, cgroups, linux-mm, linux-kernel



On 2021/8/3 23:20, Vlastimil Babka wrote:
> On 7/30/21 8:39 AM, Michal Hocko wrote:
>> On Fri 30-07-21 14:26:35, Baolin Wang wrote:
>>> Since commit c843966c556d ("mm: allow swappiness that prefers reclaiming
>>> anon over the file workingset") has expended the swappiness value to
>>> make swap to be preferred in some systems. We should also change the
>>> memcg swappiness restriction to allow memcg swap-preferred.
>>>
>>> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
>>
>> Yes, this looks like an omission. It doesn't really make sense to have
>> two different constrains on the value.
>>
>> Acked-by: Michal Hocko <mhocko@suse.com>
> 
> So, also Fixes: c843966c556d ("mm: allow swappiness that prefers reclaiming anon
> over the file workingset")
> ?

Sure. Andrew, do I need resend it with adding fixes tag, or you can help 
to add it? Thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction
@ 2021-08-03 15:45       ` Baolin Wang
  0 siblings, 0 replies; 10+ messages in thread
From: Baolin Wang @ 2021-08-03 15:45 UTC (permalink / raw)
  To: Vlastimil Babka, Michal Hocko
  Cc: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	hannes-druUgvl0LCNAfugRpC6u6w,
	vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w,
	cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA



On 2021/8/3 23:20, Vlastimil Babka wrote:
> On 7/30/21 8:39 AM, Michal Hocko wrote:
>> On Fri 30-07-21 14:26:35, Baolin Wang wrote:
>>> Since commit c843966c556d ("mm: allow swappiness that prefers reclaiming
>>> anon over the file workingset") has expended the swappiness value to
>>> make swap to be preferred in some systems. We should also change the
>>> memcg swappiness restriction to allow memcg swap-preferred.
>>>
>>> Signed-off-by: Baolin Wang <baolin.wang-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org>
>>
>> Yes, this looks like an omission. It doesn't really make sense to have
>> two different constrains on the value.
>>
>> Acked-by: Michal Hocko <mhocko-IBi9RG/b67k@public.gmane.org>
> 
> So, also Fixes: c843966c556d ("mm: allow swappiness that prefers reclaiming anon
> over the file workingset")
> ?

Sure. Andrew, do I need resend it with adding fixes tag, or you can help 
to add it? Thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction
@ 2021-08-03 20:25         ` Andrew Morton
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Morton @ 2021-08-03 20:25 UTC (permalink / raw)
  To: Baolin Wang
  Cc: Vlastimil Babka, Michal Hocko, hannes, vdavydov.dev, cgroups,
	linux-mm, linux-kernel

On Tue, 3 Aug 2021 23:45:20 +0800 Baolin Wang <baolin.wang@linux.alibaba.com> wrote:

> > So, also Fixes: c843966c556d ("mm: allow swappiness that prefers reclaiming anon
> > over the file workingset")
> > ?
> 
> Sure. Andrew, do I need resend it with adding fixes tag, or you can help 
> to add it? Thanks.

I added the Fixes tag, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction
@ 2021-08-03 20:25         ` Andrew Morton
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Morton @ 2021-08-03 20:25 UTC (permalink / raw)
  To: Baolin Wang
  Cc: Vlastimil Babka, Michal Hocko, hannes-druUgvl0LCNAfugRpC6u6w,
	vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w,
	cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Tue, 3 Aug 2021 23:45:20 +0800 Baolin Wang <baolin.wang-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org> wrote:

> > So, also Fixes: c843966c556d ("mm: allow swappiness that prefers reclaiming anon
> > over the file workingset")
> > ?
> 
> Sure. Andrew, do I need resend it with adding fixes tag, or you can help 
> to add it? Thanks.

I added the Fixes tag, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-08-03 20:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30  6:26 [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction Baolin Wang
2021-07-30  6:26 ` Baolin Wang
2021-07-30  6:39 ` Michal Hocko
2021-07-30  6:39   ` Michal Hocko
2021-08-03 15:20   ` Vlastimil Babka
2021-08-03 15:20     ` Vlastimil Babka
2021-08-03 15:45     ` Baolin Wang
2021-08-03 15:45       ` Baolin Wang
2021-08-03 20:25       ` Andrew Morton
2021-08-03 20:25         ` Andrew Morton

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.