[RFC][ only for review ] memory controller bacground reclaim [3/5] high/low watermark support in res_counter

KAMEZAWA Hiroyuki kamezawa.hiroyu at jp.fujitsu.com
Wed Nov 28 19:24:02 PST 2007


On Thu, 29 Nov 2007 11:56:08 +0900 (JST)
yamamoto at valinux.co.jp (YAMAMOTO Takashi) wrote:

> > This patch adds high/low watermark parameter to res_counter.
> > splitted out from YAMAMOTO's background page reclaim for memory cgroup set.
> 
> thanks.
> 
> > +	 * Watermarks
> > +	 * Should be changed automatically when the limit is changed and
> > +	 * keep low < high < limit.
> > +	 */
> > +	unsigned long long high_watermark;
> > +	unsigned long long low_watermark;
> > +	/*
> 
> do you have any specific reason not to allow low == high == limit?
No.

> if you want to ensure low < high < limit, it's better to make the
> default values below meet the condition as well.
Hmm, I see.

> to me, it seems weird to prevent users from making these values back to
> the default.
> 
will fix.
LLONG_MAX-1 for high
LLONG_MAX-2 for low ...?

BTW, it should be "low + PAGE_SIZE < high + PAGE_SIZE < limit" ...?
Does anyone have good idea ?

Thanks,
-Kame



More information about the Containers mailing list