[PATCH 2/8] cgroup: kill CSS_REMOVED
Tejun Heo
tj at kernel.org
Wed Oct 31 17:44:20 UTC 2012
Hello, Glauber.
On Wed, Oct 31, 2012 at 09:38:32PM +0400, Glauber Costa wrote:
> Because I am allocating an array big enough to hold one entry per memcg.
> The natural array index for this, is the css_id. Obviously, I don't want
> this array to have 65k entries in size, so I resize it (doubling every
> time) Because I don't know the css_id at this time, I have to do it later.
>
> Another option for this - which I also considered - would be to use a
> different index. We get more packing, since not all memcgs will be kmem
> limited (and the index would contain only the kmem limited memcgs), and
> we can allocate this index during ->create().
>
> I initially picked the css_index because I though a specialized index
> might be confusing. But if you feel strongly about all the allocations
> happening inside ->create(), this would be a way to avoid it. Would you
> prefer that?
I'll think more about it. The whole css_id thing might need some soul
searching too anyway. Let's continue this one your patch thread.
Thanks.
--
tejun
More information about the Containers
mailing list