Re: [PATCH 1/7] memcg: add high/low watermark to res_counter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2 May 2011 14:37:41 +0530
Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> [2011-04-25 18:28:49]:
		res_counter_set_high_wmark_limit(&mem->res, limit);
> > +	} else {
> > +		u64 low_wmark, high_wmark, low_distance;
> > +		if (mem->high_wmark_distance <= HILOW_DISTANCE)
> > +			low_distance = mem->high_wmark_distance / 2;
> > +		else
> > +			low_distance = HILOW_DISTANCE;
> > +		if (low_distance < PAGE_SIZE * 2)
> > +			low_distance = PAGE_SIZE * 2;
> > +
> > +		low_wmark = limit - low_distance;
> > +		high_wmark = limit - mem->high_wmark_distance;
> > +
> > +		res_counter_set_low_wmark_limit(&mem->res, low_wmark);
> > +		res_counter_set_high_wmark_limit(&mem->res, high_wmark);
> > +	}
> > +}
> > +
> 
> I've not seen the documentation patch, but it might be good to have
> some comments with what to expect the watermarks to be and who sets up
> up high_wmark_distance. 
> 

I'll refine these namings.

Thanks,
-Kame

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]