Re: [PATCH] mm: memcontrol: Set the correct memcg swappiness restriction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx>

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@xxxxxxxx>

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux