Re: [RFC][PATCH 2/5] add softlimit to res_counter

From: KAMEZAWA Hiroyuki
Date: Thu Mar 12 2009 - 00:15:57 EST


On Thu, 12 Mar 2009 09:40:38 +0530
Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:

> Correct me if I am wrong, but this boils down to checking if the top
> root is above it's soft limit?

Level_1 soft limit=400M
Level_2 soft limit=200M
Level_3 no soft limit
Level_3 softlimit=100M
Level_2 soft limit=200M
Level_2 soft limit=200M

When checking Level3, we need to check Level_2 and Level_1.


> Instead of checking all the way up in
> the hierarchy, can't we do a conditional check for
>
> c->parent == NULL && (c->softlimit < c->usage)
>
> BTW, I would prefer to split the word softlimit to soft_limit, it is
> more readable that way.
>
Ok, it will give me tons of HUNK but will do ;)

Thanks,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/