Re: [PATCH 4/4] Memory controller soft limit reclaim on contention(v3)

From: Balbir Singh
Date: Sun Mar 01 2009 - 23:44:32 EST


* KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> [2009-03-02 12:08:01]:

> Hi Balbir,
>
> > @@ -2015,9 +2016,12 @@ static int kswapd(void *p)
> > finish_wait(&pgdat->kswapd_wait, &wait);
> >
> > if (!try_to_freeze()) {
> > + struct zonelist *zl = pgdat->node_zonelists;
> > /* We can speed up thawing tasks if we don't call
> > * balance_pgdat after returning from the refrigerator
> > */
> > + if (!order)
> > + mem_cgroup_soft_limit_reclaim(zl, GFP_KERNEL);
> > balance_pgdat(pgdat, order);
> > }
> > }
>
> kswapd's roll is increasing free pages until zone->pages_high in "own node".
> mem_cgroup_soft_limit_reclaim() free one (or more) exceed page in any node.
>
> Oh, well.
> I think it is not consistency.
>
> if mem_cgroup_soft_limit_reclaim() is aware to target node and its pages_high,
> I'm glad.
>

Yes, correct the role of kswapd is to keep increasing free pages until
zone->pages_high and the first set of pages to consider is the memory
controller over their soft limits. We pass the zonelist to ensure that
while doing soft reclaim, we focus on the zonelist associated with the
node. Kamezawa had concernes over calling the soft limit reclaim from
__alloc_pages_internal(), did you prefer that call path?

--
Balbir
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/