Re: [RFC][PATCH 0/4] Memory controller soft limit patches (v2)

From: Balbir Singh
Date: Mon Feb 16 2009 - 23:42:43 EST


* KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> [2009-02-17 13:20:39]:

> On Tue, 17 Feb 2009 13:03:52 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
>
> > > > 2. I don't like to change usual direct-memory-reclaim path. It will be obstacles
> > > > for VM-maintaners to improve memory reclaim. memcg's LRU is designed for
> > > > shrinking memory usage and not for avoiding memory shortage. IOW, it's slow routine
> > > > for reclaiming memory for memory shortage.
> > >
> > > I don't think I agree here. Direct reclaim is the first indication of
> > > shortage and if order 0 pages are short, memcg's above their soft
> > > limit can be targetted first.
> > >
> > My "slow" means "the overhead seems to be big". The latency will increase.
> >
> > About 0-order
> > In patch 4/4
> > + did_some_progress = mem_cgroup_soft_limit_reclaim(gfp_mask);
> > + /*
> > should be
> > if (!order)
> > did_some_progress = mem....
> above is wrong.
>
> if (!order && (gfp_mask & GFP_MOVABLE)) ....Hmm, but this is not correct.
> I have no good idea to avoid unnecessary works.
>
> BTW, why don't you call soft_limit_reclaim from kswapd's path ?
>

I think it has to be both kswapd and pdflush path, I can consider that
option as well. That needs more thought on the design.


--
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/