Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1447976
| From | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/5] mm: consider per-zone inactive ratio to deactivate |
| Date | 2016-07-21 18:00 +0200 |
| Message-ID | <rXoye-107-11@gated-at.bofh.it> (permalink) |
| References | <rXmZs-8w7-5@gated-at.bofh.it> <rXmZs-8w7-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] Candidate fixes for premature OOM kills with node-lru v2 Mel Gorman <mgorman@techsingularity.net> - 2016-07-21 16:20 +0200
[PATCH 4/5] mm: consider per-zone inactive ratio to deactivate Mel Gorman <mgorman@techsingularity.net> - 2016-07-21 16:20 +0200
Re: [PATCH 4/5] mm: consider per-zone inactive ratio to deactivate Johannes Weiner <hannes@cmpxchg.org> - 2016-07-21 18:00 +0200
[PATCH 1/5] mm: add per-zone lru list stat Mel Gorman <mgorman@techsingularity.net> - 2016-07-21 16:20 +0200
Re: [PATCH 1/5] mm: add per-zone lru list stat Johannes Weiner <hannes@cmpxchg.org> - 2016-07-22 18:00 +0200
csiph-web