[lxc-devel] [PATCH v2 0/4] add statistics to lxc-info

Dwight Engen dwight.engen at oracle.com
Wed Nov 6 15:51:37 UTC 2013


On Wed, 6 Nov 2013 08:18:17 -0600
Serge Hallyn <serge.hallyn at ubuntu.com> wrote:

> Quoting Dwight Engen (dwight.engen at oracle.com):
> > Hi Stéphane,
> > 
> > I was able to add the ***containers output fairly in a fairly
> > straightforward manner. I also split out the patch into more
> > discrete logical changes, adding/refactoring the list.c test and
> > fixing a leak in list_active_containers() along the way. Serge,
> > hopefully you don't mind I renamed a couple of variables in there
> > that were confusing me :)
> > 
> > Out of curiosity, I'm wondering why we chose to use an array
> > instead of a list? I suppose its easier for the caller and it does
> > make it easy to use qsort, but OTOH I guess we could've done sorted
> > inserts into a list as well. I was thinking about realloc() with a
> > large number of containers being eventually slow, but I guess its
> > only a bunch of pointers so it won't ever be all that large of a
> > chunk for realloc to move. Anyway, its working fine right now.
> 
> I've got no attachment to the code :)  If you think it'll be better
> as lists that's fine with me.

Hi Serge, I guess I was more or less just musing out loud, sorry for the
noise :) I think its fine the way it is, so I don't think we need to
change it unless its shown to be a problem.




More information about the lxc-devel mailing list