[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6599ad830806110045n6aec52ddkfb4be91b685357fe@mail.gmail.com>
Date: Wed, 11 Jun 2008 00:45:43 -0700
From: "Paul Menage" <menage@...gle.com>
To: "KOSAKI Motohiro" <kosaki.motohiro@...fujitsu.com>
Cc: containers@...ts.osdl.org, LKML <linux-kernel@...r.kernel.org>,
"Li Zefan" <lizf@...fujitsu.com>,
"Andrew Morton" <akpm@...ux-foundation.org>
Subject: Re: [PATCH] introduce task cgroup v2
On Sat, Jun 7, 2008 at 4:00 AM, KOSAKI Motohiro
<kosaki.motohiro@...fujitsu.com> wrote:
> +
> +#include <linux/cgroup.h>
> +#include <linux/err.h>
> +#include <linux/cgroup_task.h>
> +
> +struct task_cgroup {
> + struct cgroup_subsys_state css;
> + /*
> + * the counter to account for number of thread.
> + */
> + int max_tasks;
> + int nr_tasks;
> +
> + spinlock_t lock;
> +};
This looks rather like a res_counter. Can you resuse that rather than
implementing your own read/write/charge/uncharge routines?
Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists