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


Groups > linux.kernel > #1573424 > unrolled thread

[PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced

Started byMel Gorman <mgorman@suse.de>
First post2017-02-03 21:40 +0100
Last post2017-02-05 11:20 +0100
Articles 5 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced Mel Gorman <mgorman@suse.de> - 2017-02-03 21:40 +0100
    Re: [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced Johannes Weiner <hannes@cmpxchg.org> - 2017-02-03 22:30 +0100
    Re: [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2017-02-04 04:20 +0100
    Re: [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced Michal Hocko <mhocko@kernel.org> - 2017-02-05 11:20 +0100
      Re: [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced Michal Hocko <mhocko@kernel.org> - 2017-02-05 11:20 +0100

#1573424 — [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced

FromMel Gorman <mgorman@suse.de>
Date2017-02-03 21:40 +0100
Subject[PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced
Message-ID<t6SOe-6J7-11@gated-at.bofh.it>
Hillf Danton pointed out that since commit 1d82de618dd ("mm, vmscan:
make kswapd reclaim in terms of nodes") that PGDAT_WRITEBACK is no longer
cleared. It was not noticed as triggering it requires pages under writeback
to cycle twice through the LRU and before kswapd gets stalled. Historically,
such issues tended to occur on small machines writing heavily to slow
storage such as a USB stick. Once kswapd stalls, direct reclaim stalls may
be higher but due to the fact that memory pressure is requires, it would not
be very noticable. Michal Hocko suggested removing the flag entirely but
the conservative fix is to restore the intended PGDAT_WRITEBACK behaviour
and clear the flag when a suitable zone is balanced.

Signed-off-by: Mel Gorman <mgorman@suse.de>
---
 mm/vmscan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 532a2a750952..3379fa5ce6d8 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3103,6 +3103,7 @@ static bool zone_balanced(struct zone *zone, int order, int classzone_idx)
 	 */
 	clear_bit(PGDAT_CONGESTED, &zone->zone_pgdat->flags);
 	clear_bit(PGDAT_DIRTY, &zone->zone_pgdat->flags);
+	clear_bit(PGDAT_WRITEBACK, &zone->zone_pgdat->flags);
 
 	return true;
 }

-- 
Mel Gorman
SUSE Labs

[toc] | [next] | [standalone]


#1573453

FromJohannes Weiner <hannes@cmpxchg.org>
Date2017-02-03 22:30 +0100
Message-ID<t6TAB-7il-15@gated-at.bofh.it>
In reply to#1573424
On Fri, Feb 03, 2017 at 08:32:22PM +0000, Mel Gorman wrote:
> Hillf Danton pointed out that since commit 1d82de618dd ("mm, vmscan:
> make kswapd reclaim in terms of nodes") that PGDAT_WRITEBACK is no longer
> cleared. It was not noticed as triggering it requires pages under writeback
> to cycle twice through the LRU and before kswapd gets stalled. Historically,
> such issues tended to occur on small machines writing heavily to slow
> storage such as a USB stick. Once kswapd stalls, direct reclaim stalls may
> be higher but due to the fact that memory pressure is requires, it would not
> be very noticable. Michal Hocko suggested removing the flag entirely but
> the conservative fix is to restore the intended PGDAT_WRITEBACK behaviour
> and clear the flag when a suitable zone is balanced.
> 
> Signed-off-by: Mel Gorman <mgorman@suse.de>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

[toc] | [prev] | [next] | [standalone]


#1573581

From"Hillf Danton" <hillf.zj@alibaba-inc.com>
Date2017-02-04 04:20 +0100
Message-ID<t6Z3j-2V3-1@gated-at.bofh.it>
In reply to#1573424
On February 04, 2017 4:32 AM Mel Gorman wrote: 
> 
> Hillf Danton pointed out that since commit 1d82de618dd ("mm, vmscan:
> make kswapd reclaim in terms of nodes") that PGDAT_WRITEBACK is no longer
> cleared. It was not noticed as triggering it requires pages under writeback
> to cycle twice through the LRU and before kswapd gets stalled. Historically,
> such issues tended to occur on small machines writing heavily to slow
> storage such as a USB stick. Once kswapd stalls, direct reclaim stalls may
> be higher but due to the fact that memory pressure is requires, it would not
> be very noticable. Michal Hocko suggested removing the flag entirely but
> the conservative fix is to restore the intended PGDAT_WRITEBACK behaviour
> and clear the flag when a suitable zone is balanced.
> 
> Signed-off-by: Mel Gorman <mgorman@suse.de>
> ---
Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>

>  mm/vmscan.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 532a2a750952..3379fa5ce6d8 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -3103,6 +3103,7 @@ static bool zone_balanced(struct zone *zone, int order, int classzone_idx)
>  	 */
>  	clear_bit(PGDAT_CONGESTED, &zone->zone_pgdat->flags);
>  	clear_bit(PGDAT_DIRTY, &zone->zone_pgdat->flags);
> +	clear_bit(PGDAT_WRITEBACK, &zone->zone_pgdat->flags);
> 
>  	return true;
>  }
> 

[toc] | [prev] | [next] | [standalone]


#1573858

FromMichal Hocko <mhocko@kernel.org>
Date2017-02-05 11:20 +0100
Message-ID<t7s5k-5Z3-9@gated-at.bofh.it>
In reply to#1573424
On Fri 03-02-17 20:32:22, Mel Gorman wrote:
> Hillf Danton pointed out that since commit 1d82de618dd ("mm, vmscan:
> make kswapd reclaim in terms of nodes") that PGDAT_WRITEBACK is no longer
> cleared. It was not noticed as triggering it requires pages under writeback
> to cycle twice through the LRU and before kswapd gets stalled. Historically,
> such issues tended to occur on small machines writing heavily to slow
> storage such as a USB stick. Once kswapd stalls, direct reclaim stalls may
> be higher but due to the fact that memory pressure is requires, it would not
> be very noticable. Michal Hocko suggested removing the flag entirely but
> the conservative fix is to restore the intended PGDAT_WRITEBACK behaviour
> and clear the flag when a suitable zone is balanced.
> 
> Signed-off-by: Mel Gorman <mgorman@suse.de>

I agree this is a more conservative approach but I think removing
PGDAT_WRITEBACK should simplify things a bit.

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

> ---
>  mm/vmscan.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 532a2a750952..3379fa5ce6d8 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -3103,6 +3103,7 @@ static bool zone_balanced(struct zone *zone, int order, int classzone_idx)
>  	 */
>  	clear_bit(PGDAT_CONGESTED, &zone->zone_pgdat->flags);
>  	clear_bit(PGDAT_DIRTY, &zone->zone_pgdat->flags);
> +	clear_bit(PGDAT_WRITEBACK, &zone->zone_pgdat->flags);
>  
>  	return true;
>  }
> 
> -- 
> Mel Gorman
> SUSE Labs

-- 
Michal Hocko
SUSE Labs

[toc] | [prev] | [next] | [standalone]


#1573860

FromMichal Hocko <mhocko@kernel.org>
Date2017-02-05 11:20 +0100
Message-ID<t7s5k-5Z3-17@gated-at.bofh.it>
In reply to#1573858
On Sun 05-02-17 11:11:13, Michal Hocko wrote:
> On Fri 03-02-17 20:32:22, Mel Gorman wrote:
> > Hillf Danton pointed out that since commit 1d82de618dd ("mm, vmscan:
> > make kswapd reclaim in terms of nodes") that PGDAT_WRITEBACK is no longer
> > cleared. It was not noticed as triggering it requires pages under writeback
> > to cycle twice through the LRU and before kswapd gets stalled. Historically,
> > such issues tended to occur on small machines writing heavily to slow
> > storage such as a USB stick. Once kswapd stalls, direct reclaim stalls may
> > be higher but due to the fact that memory pressure is requires, it would not
> > be very noticable. Michal Hocko suggested removing the flag entirely but
> > the conservative fix is to restore the intended PGDAT_WRITEBACK behaviour
> > and clear the flag when a suitable zone is balanced.
> > 
> > Signed-off-by: Mel Gorman <mgorman@suse.de>
> 
> I agree this is a more conservative approach but I think removing
> PGDAT_WRITEBACK should simplify things a bit.
> 
> Acked-by: Michal Hocko <mhocko@suse.com>

Ohh, an please add
Fixes: 1d82de618ddd ("mm, vmscan: make kswapd reclaim in terms of nodes")
-- 
Michal Hocko
SUSE Labs

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web