Re: [patch 2/4] mm: memcontrol: add memory.current and memory.high to default hierarchy

From: Michal Hocko
Date: Thu Aug 07 2014 - 09:39:26 EST


On Thu 07-08-14 15:36:14, Michal Hocko wrote:
> On Mon 04-08-14 17:14:55, Johannes Weiner wrote:
> [...]
> > @@ -132,6 +137,19 @@ u64 res_counter_uncharge(struct res_counter *counter, unsigned long val);
> > u64 res_counter_uncharge_until(struct res_counter *counter,
> > struct res_counter *top,
> > unsigned long val);
> > +
> > +static inline unsigned long long res_counter_high(struct res_counter *cnt)
>
> soft limit used res_counter_soft_limit_excess which has quite a long
> name but at least those two should be consistent.
> I will post two helper patches which I have used to make this and other
> operations on res counter easier as a reply to this.

These two are sleeping in my queue for quite some time. I didn't get to
post them yet but if you think they will make sense I can try to rebase
them on the current tree and post.
---