Re: [PATCH 07/10] mm: base LRU balancing on an explicit cost model

From: Johannes Weiner
Date: Wed Jun 08 2016 - 12:06:17 EST


On Wed, Jun 08, 2016 at 05:14:21PM +0900, Minchan Kim wrote:
> On Mon, Jun 06, 2016 at 03:48:33PM -0400, Johannes Weiner wrote:
> > @@ -249,15 +249,10 @@ void rotate_reclaimable_page(struct page *page)
> > }
> > }
> >
> > -static void update_page_reclaim_stat(struct lruvec *lruvec,
> > - int file, int rotated,
> > - unsigned int nr_pages)
> > +void lru_note_cost(struct lruvec *lruvec, bool file, unsigned int nr_pages)
> > {
> > - struct zone_reclaim_stat *reclaim_stat = &lruvec->reclaim_stat;
> > -
> > - reclaim_stat->recent_scanned[file] += nr_pages;
> > - if (rotated)
> > - reclaim_stat->recent_rotated[file] += nr_pages;
> > + lruvec->balance.numer[file] += nr_pages;
> > + lruvec->balance.denom += nr_pages;
>
> balance.numer[0] + balance.number[1] = balance.denom
> so we can remove denom at the moment?

You're right, it doesn't make sense to keep that around anymore. I'll
remove it.

Thanks!