linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@suse.de>
To: 'Andrew Morton' <akpm@linux-foundation.org>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>,
	'Johannes Weiner' <hannes@cmpxchg.org>,
	'Mel Gorman' <mgorman@suse.de>, 'Michal Hocko' <mhocko@suse.com>,
	'Minchan Kim' <minchan.kim@gmail.com>,
	'Rik van Riel' <riel@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mm, vmscan: Clear PGDAT_WRITEBACK when zone is balanced
Date: Fri, 3 Feb 2017 20:32:22 +0000	[thread overview]
Message-ID: <20170203203222.gq7hk66yc36lpgtb@suse.de> (raw)

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>

             reply	other threads:[~2017-02-03 20:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03 20:32 Mel Gorman [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170203203222.gq7hk66yc36lpgtb@suse.de \
    --to=mgorman@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan.kim@gmail.com \
    --cc=riel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox