lkml.org 
[lkml]   [2012]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/8] cgroup: kill CSS_REMOVED
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


\
 
 \ /
  Last update: 2012-10-31 19:21    [W:0.049 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site