Re: [PATCH 2/2] memcg, vmscan: Fix forced scan of anonymous pages

From: Johannes Weiner
Date: Fri Aug 01 2014 - 14:45:42 EST


On Thu, Jul 31, 2014 at 02:30:26PM +0200, Michal Hocko wrote:
> On Thu 31-07-14 13:49:45, Jerome Marchand wrote:
> > @@ -1950,8 +1950,11 @@ static void get_scan_count(struct lruvec *lruvec, int swappiness,
> > */
> > if (global_reclaim(sc)) {
> > unsigned long free = zone_page_state(zone, NR_FREE_PAGES);
> > + unsigned long zonefile =
> > + zone_page_state(zone, NR_LRU_BASE + LRU_ACTIVE_FILE) +
> > + zone_page_state(zone, NR_LRU_BASE + LRU_INACTIVE_FILE);
> >
> > - if (unlikely(file + free <= high_wmark_pages(zone))) {
> > + if (unlikely(zonefile + free <= high_wmark_pages(zone))) {
> > scan_balance = SCAN_ANON;
> > goto out;
> > }
>
> You could move file and anon further down when we actually use them.

Agreed with that. Can we merge this into the original patch?

---