[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160721155259.GB30303@cmpxchg.org>
Date: Thu, 21 Jul 2016 11:52:59 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: Mel Gorman <mgorman@...hsingularity.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Minchan Kim <minchan@...nel.org>,
Michal Hocko <mhocko@...e.cz>,
Vlastimil Babka <vbabka@...e.cz>,
Linux-MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/5] mm: consider per-zone inactive ratio to deactivate
On Thu, Jul 21, 2016 at 03:11:00PM +0100, Mel Gorman wrote:
> @@ -1981,6 +1982,32 @@ static bool inactive_list_is_low(struct lruvec *lruvec, bool file)
> inactive = lruvec_lru_size(lruvec, file * LRU_FILE);
> active = lruvec_lru_size(lruvec, file * LRU_FILE + LRU_ACTIVE);
>
> + /*
> + * For global reclaim on zone-constrained allocations, it is necessary
> + * to check if rotations are required for lowmem to be reclaimed. This
s/rotation/deactivation/
> + * calculates the inactive/active pages available in eligible zones.
> + */
> + if (global_reclaim(sc)) {
> + struct pglist_data *pgdat = lruvec_pgdat(lruvec);
> + int zid;
> +
> + for (zid = sc->reclaim_idx + 1; zid < MAX_NR_ZONES; zid++) {
The emphasis on global vs. memcg reclaim is somewhat strange, because
this is only about excluding pages from the balancing math that will
be skipped. Memcg reclaim is never zone-restricted, but if it were, it
would make sense to exclude the skipped pages there as well.
Indeed, for memcg reclaim sc->reclaim_idx+1 is always MAX_NR_ZONES,
and so the for loop alone will do the right thing.
Can you please drop the global_reclaim() branch, the sc function
parameter, and the "global reclaim" from the comment?
Thanks
Powered by blists - more mailing lists