Re: [PATCH 0/8 v3] cgroups: Task counter subsystem (was: New maxnumber of tasks subsystem)
From: Tim Hockin
Date: Fri Aug 12 2011 - 17:11:48 EST
On Mon, Aug 1, 2011 at 4:19 PM, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 29 Jul 2011 18:13:22 +0200
> Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:
>> This patchset is aimed at reducing the impact of a forkbomb to a
>> cgroup boundaries, thus minimizing the consequences of such an attack
>> against the rest of the system.
>> This can be useful when cgroups are used to stage some processes or run
> Really? ÂHow useful? ÂWhy is it useful enough to justify adding code
> such as this to the kernel?
> Is forkbomb-prevention the only use? ÂOthers have proposed different
> ways of preventing forkbombs which were independent of cgroups - is
> this way better and if so, why?
I certainly want this for exactly the proposed use - putting a bounds
on threads/tasks per container. It's rlimits but more useful.
IMHO, most every limit that can be set at a system level should be
settable at a cgroup level. This is just one more isolation leak.
>> Âblock/blk-cgroup.c Â Â Â Â Â Â| Â 10 ++-
>> Âinclude/linux/cgroup.h Â Â Â Â| Â 15 +++-
>> Âinclude/linux/cgroup_subsys.h | Â Â8 ++
>> Âinclude/linux/res_counter.h Â | Â 12 +++
>> Âinit/Kconfig Â Â Â Â Â Â Â Â Â| Â Â7 ++
>> Âkernel/Makefile Â Â Â Â Â Â Â | Â Â1 +
>> Âkernel/cgroup.c Â Â Â Â Â Â Â | Â 25 ++++--
>> Âkernel/cgroup_freezer.c Â Â Â | Â Â3 +-
>> Âkernel/cgroup_task_counter.c Â| Â176 +++++++++++++++++++++++++++++++++++++++++
>> Âkernel/cpuset.c Â Â Â Â Â Â Â | Â Â6 +-
>> Âkernel/events/core.c Â Â Â Â Â| Â Â5 +-
>> Âkernel/fork.c Â Â Â Â Â Â Â Â | Â Â4 +
>> Âkernel/res_counter.c Â Â Â Â Â| Â 81 ++++++++++++++++---
>> Âkernel/sched.c Â Â Â Â Â Â Â Â| Â Â6 +-
> The patch forgot to document the feature: how it works, what it's
> useful for, what behaviour users can expect to see, when they should
> consider using it, what the userspace control interface is and how to
> configure it, etc. ÂDocumentation/cgroups/ is the place for that.
+1 - I am not very familiar with the cgroups code, so I am disinclined
to learn it all just to evaluate the functionality and API of this
patch. Design doc, please?
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/