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 Tue 03-05-11 16:45:23, KOSAKI Motohiro wrote:
> 2011/5/3 Michal Hocko <mhocko@xxxxxxx>:
> > On Sun 01-05-11 15:06:02, KOSAKI Motohiro wrote:
> >> > On Mon 25-04-11 18:28:49, KAMEZAWA Hiroyuki wrote:
> >> > > There are two watermarks added per-memcg including "high_wmark" and "low_wmark".
> >> > > The per-memcg kswapd is invoked when the memcg's memory usage(usage_in_bytes)
> >> > > is higher than the low_wmark. Then the kswapd thread starts to reclaim pages
> >> > > until the usage is lower than the high_wmark.
> >> >
> >> > I have mentioned this during Ying's patchsets already, but do we really
> >> > want to have this confusing naming? High and low watermarks have
> >> > opposite semantic for zones.
> >>
> >> Can you please clarify this? I feel it is not opposite semantics.
> >
> > In the global reclaim low watermark represents the point when we _start_
> > background reclaim while high watermark is the _stopper_. Watermarks are
> > based on the free memory while this proposal makes it based on the used
> > memory.
> > I understand that the result is same in the end but it is really
> > confusing because you have to switch your mindset from free to used and
> > from under the limit to above the limit.
> 
> Ah, right. So, do you have an alternative idea?

Why cannot we just keep the global reclaim semantic and make it free
memory (hard_limit - usage_in_bytes) based with low limit as the trigger
for reclaiming? 

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

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