On Sat, 12 Dec 2009 15:06:52 +0200
"Kirill A. Shutemov" <[email protected]> wrote:

> On Sat, Dec 12, 2009 at 5:50 AM, Daisuke Nishimura
> <[email protected]> wrote:
> > Sorry, I disagree this change.
> >
> > mem_cgroup_soft_limit_check() is used for checking how much current usage 
> > exceeds
> > the soft_limit_in_bytes and updating softlimit tree asynchronously, instead 
> > of
> > checking every charge/uncharge. What if you change the soft_limit_in_bytes,
> > but the number of charges and uncharges are very balanced afterwards ?
> > The softlimit tree will not be updated for a long time.
> 
> I don't see how my patch affects the logic you've described.
> Statistics updates and
> checks in the same place. It just uses decrement instead of increment.
> 
Ah... my bad. Ignore this comment, please.
I misunderstood this patch.

> >
> > And IIUC, it's the same for your threshold feature, right ?
> > I think it would be better:
> >
> > - discard this change.
> > - in 4/4, rename mem_cgroup_soft_limit_check to mem_cgroup_event_check,
> >  and instead of adding a new STAT counter, do like:
> >
> >        if (mem_cgroup_event_check(mem)) {
> >                mem_cgroup_update_tree(mem, page);
> >                mem_cgroup_threshold(mem);
> >        }
> 
> I think that mem_cgroup_update_tree() and mem_cgroup_threshold() should be
> run with different frequency. How to share MEM_CGROUP_STAT_EVENTS
> between soft limits and thresholds in this case?
> 
hmm, both softlimit and your threshold count events at the same place(charge 
and uncharge).
So, I think those events can be shared.
Is there any reason they should run in different frequency ?


Thanks,
Daisuke Nishimura.
_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to