From: Mel Gorman <mgorman@suse.de>
To: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: linux-mm@kvack.org, linux-kernel <linux-kernel@vger.kernel.org>,
Rik van Riel <riel@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.cz>
Subject: Re: [PATCH 07/25] mm, vmscan: Make kswapd think of reclaim in terms of nodes
Date: Mon, 15 Jun 2015 09:27:20 +0100 [thread overview]
Message-ID: <20150615082720.GM26425@suse.de> (raw)
In-Reply-To: <00ea01d0a4de$19f165d0$4dd43170$@alibaba-inc.com>
On Fri, Jun 12, 2015 at 03:05:00PM +0800, Hillf Danton wrote:
> > - /* Reclaim above the high watermark. */
> > - sc->nr_to_reclaim = max(SWAP_CLUSTER_MAX, high_wmark_pages(zone));
> > + /* Aim to reclaim above all the zone high watermarks */
> > + for (z = 0; z <= end_zone; z++) {
> > + zone = pgdat->node_zones + end_zone;
> s/end_zone/z/ ?
Ouch, thanks!
With this bug, kswapd would reclaim based on a multiple of the highest
zone. Whether that was under or over reclaim would depend on the size of
that zone relative to lower zones.
> > + nr_to_reclaim += high_wmark_pages(zone);
> >
> [...]
> > @@ -3280,13 +3177,26 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
> > compact_pgdat(pgdat, order);
> >
> > /*
> > + * Stop reclaiming if any eligible zone is balanced and clear
> > + * node writeback or congested.
> > + */
> > + for (i = 0; i <= *classzone_idx; i++) {
> > + zone = pgdat->node_zones + i;
> > +
> > + if (zone_balanced(zone, sc.order, 0, *classzone_idx)) {
> > + clear_bit(PGDAT_CONGESTED, &pgdat->flags);
> > + clear_bit(PGDAT_DIRTY, &pgdat->flags);
> > + break;
> s/break/goto out/ ?
Yes. It'd actually be ok because it'll detect the same condition and
exit in the next outer loop but goto out is better.
--
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>
next prev parent reply other threads:[~2015-06-15 8:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 7:05 [PATCH 07/25] mm, vmscan: Make kswapd think of reclaim in terms of nodes Hillf Danton
2015-06-15 8:27 ` Mel Gorman [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-06-08 13:56 [RFC PATCH 00/25] Move LRU page reclaim from zones to nodes Mel Gorman
2015-06-08 13:56 ` [PATCH 07/25] mm, vmscan: Make kswapd think of reclaim in terms of nodes Mel Gorman
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=20150615082720.GM26425@suse.de \
--to=mgorman@suse.de \
--cc=hannes@cmpxchg.org \
--cc=hillf.zj@alibaba-inc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--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;
as well as URLs for NNTP newsgroup(s).