* [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced
@ 2017-02-03 20:32 Mel Gorman
2017-02-03 21:24 ` Johannes Weiner
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Mel Gorman @ 2017-02-03 20:32 UTC (permalink / raw)
To: 'Andrew Morton'
Cc: Hillf Danton, 'Johannes Weiner', 'Mel Gorman',
'Michal Hocko', 'Minchan Kim',
'Rik van Riel',
linux-mm, linux-kernel
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
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced
2017-02-03 20:32 [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced Mel Gorman
@ 2017-02-03 21:24 ` Johannes Weiner
2017-02-04 3:09 ` Hillf Danton
2017-02-05 10:11 ` Michal Hocko
2 siblings, 0 replies; 5+ messages in thread
From: Johannes Weiner @ 2017-02-03 21:24 UTC (permalink / raw)
To: Mel Gorman
Cc: 'Andrew Morton', Hillf Danton, 'Michal Hocko',
'Minchan Kim', 'Rik van Riel',
linux-mm, linux-kernel
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>
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced
2017-02-03 20:32 [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced Mel Gorman
2017-02-03 21:24 ` Johannes Weiner
@ 2017-02-04 3:09 ` Hillf Danton
2017-02-05 10:11 ` Michal Hocko
2 siblings, 0 replies; 5+ messages in thread
From: Hillf Danton @ 2017-02-04 3:09 UTC (permalink / raw)
To: 'Mel Gorman', 'Andrew Morton'
Cc: 'Johannes Weiner', 'Michal Hocko',
'Minchan Kim', 'Rik van Riel',
linux-mm, linux-kernel
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;
> }
>
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced
2017-02-03 20:32 [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced Mel Gorman
2017-02-03 21:24 ` Johannes Weiner
2017-02-04 3:09 ` Hillf Danton
@ 2017-02-05 10:11 ` Michal Hocko
2017-02-05 10:13 ` Michal Hocko
2 siblings, 1 reply; 5+ messages in thread
From: Michal Hocko @ 2017-02-05 10:11 UTC (permalink / raw)
To: Mel Gorman
Cc: 'Andrew Morton', Hillf Danton, 'Johannes Weiner',
'Minchan Kim', 'Rik van Riel',
linux-mm, linux-kernel
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
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced
2017-02-05 10:11 ` Michal Hocko
@ 2017-02-05 10:13 ` Michal Hocko
0 siblings, 0 replies; 5+ messages in thread
From: Michal Hocko @ 2017-02-05 10:13 UTC (permalink / raw)
To: Mel Gorman
Cc: 'Andrew Morton', Hillf Danton, 'Johannes Weiner',
'Minchan Kim', 'Rik van Riel',
linux-mm, linux-kernel
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
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-02-05 10:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-03 20:32 [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced Mel Gorman
2017-02-03 21:24 ` Johannes Weiner
2017-02-04 3:09 ` Hillf Danton
2017-02-05 10:11 ` Michal Hocko
2017-02-05 10:13 ` Michal Hocko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox