Re: [PATCH 5/5] mm: consider per-zone inactive ratio to deactivate
From: Mel Gorman
Date: Thu Jul 21 2016 - 04:16:24 EST
On Thu, Jul 21, 2016 at 04:10:50PM +0900, Joonsoo Kim wrote:
> > @@ -1993,6 +1994,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
> > + * 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; zid < MAX_NR_ZONES; zid++) {
>
> Should be changed to "zid = sc->reclaim_idx + 1"
>
You're right, well spotted!
--
Mel Gorman
SUSE Labs