Re: [RFC REPOST] cgroup: removing css reference drain wait duringcgroup removal
From: Tejun Heo
Date: Wed Mar 14 2012 - 02:11:27 EST
Hello,
On Wed, Mar 14, 2012 at 09:28:28AM +0900, KAMEZAWA Hiroyuki wrote:
> > I agree this isn't perfect but then again failing rmdir isn't perfect
> > either and given that the condition can be wholly avoided in
> > hierarchical mode, which should be the default anyway (is there any
> > reason to keep flat mode except for backward compatibility?), I don't
> > think the trade off is too bad.
>
> One reason is 'performance'. You can see performance trouble when you
> creates deep tree of memcgs in hierarchy mode. The deeper memcg tree,
> the more res_coutners will be shared.
>
> For example, libvirt creates cgroup tree as
>
> /cgroup/memory/libvirt/qemu/GuestXXX/....
> /cgroup/memory/libvirt/lxc/GuestXXX/...
>
> No one don't want to count up 4 res_coutner, which is very very heavy,
> for handling independent workloads of "Guest".
Yes, performance definitely is a concern but I think that it would be
better to either avoid building deep hierarchies or provide a generic
way to skip some levels rather than implementing different behavior
mode per controller. Per-controller behavior selection ends up
requiring highly specialized configuration which is very difficult to
generalize and automate.
> IIUC, in general, even in the processes are in a tree, in major case
> of servers, their workloads are independent.
> I think FLAT mode is the dafault. 'heararchical' is a crazy thing which
> cannot be managed.
I currently am hoping that cgroup core can provide a generic mechanism
to abbreviate, if you will, hierarchies so that controllers can be
used the same way, with hierarchy unaware controllers using the same
mechanism to essentially achieve flat view of the same hierarchy. It
might as well be a pipe dream tho. I'll think more about it.
Anyways, I'm building up updates on top of the patch to strip out
pre_destroy waiting and failure handling. Is anyone interested in
doing the memcg part, pretty please?
Thank you very much.
--
tejun
--
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/