On Tue, Feb 22, 2011 at 11:17:05AM -0700, Eric Blake wrote: > On 02/22/2011 10:55 AM, Daniel P. Berrange wrote: > > The virCgroupKill method kills all PIDs found in a cgroup > > > > The virCgroupKillRecursively method does this recursively > > for child cgroups. > > > > The virCgroupKillPainfully method does a recursive kill > > several times in a row until everything has really died > > Do we really need three APIs, or can we just have: > > virCgroupKill(..., VIR_CGROUP_KILL_RECURSIVE | VIR_CGROUP_KILL_PAINFUL) > > I haven't reviewed the body of the patch, yet. Agreed, I was surpized by this at first. Went though the patch my only remarks are rc = killedAny ? 1 : 0; is overkill since killedAny values seems only 0 or 1 anyway and the loop for virCgroupKillPainfully looks a bit arbitrary, sending 15 signals to all looks a lot, and the delay for the loop a bit short, if there is like a hundred processes in that group that could be a bit heavy, isn't it ? Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@xxxxxxxxxxxx | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list