Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1566191

Re: [PATCH RFC 3/3] mm, vmscan: correct prepare_kswapd_sleep return value

From Rik van Riel <riel@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH RFC 3/3] mm, vmscan: correct prepare_kswapd_sleep return value
Date 2017-01-24 23:10 +0100
Message-ID <t3hrQ-1E3-7@gated-at.bofh.it> (permalink)
References <t341z-1po-3@gated-at.bofh.it> <t341z-1po-1@gated-at.bofh.it>
Organization Red Hat, Inc

Show all headers | View raw


On Tue, 2017-01-24 at 15:49 +0800, Jia He wrote:
> When there is no reclaimable pages in the zone, even the zone is
> not balanced, we let kswapd go sleeping. That is prepare_kswapd_sleep
> will return true in this case.
> 
> Signed-off-by: Jia He <hejianet@gmail.com>
> ---
>  mm/vmscan.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 7396a0a..54445e2 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -3140,7 +3140,8 @@ static bool prepare_kswapd_sleep(pg_data_t
> *pgdat, int order, int classzone_idx)
>  		if (!managed_zone(zone))
>  			continue;
>  
> -		if (!zone_balanced(zone, order, classzone_idx))
> +		if (!zone_balanced(zone, order, classzone_idx)
> +			&& !zone_reclaimable_pages(zone))
>  			return false;
>  	}

This patch does the opposite of what your changelog
says.  The above keeps kswapd running forever if
the zone is not balanced, and there are no reclaimable
pages.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH RFC 3/3] mm, vmscan: correct prepare_kswapd_sleep return value Jia He <hejianet@gmail.com> - 2017-01-24 08:50 +0100
  Re: [PATCH RFC 3/3] mm, vmscan: correct prepare_kswapd_sleep return  value Rik van Riel <riel@redhat.com> - 2017-01-24 23:10 +0100
    Re: [PATCH RFC 3/3] mm, vmscan: correct prepare_kswapd_sleep return  value hejianet <hejianet@gmail.com> - 2017-01-25 03:30 +0100

csiph-web