[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6599ad830907211631g6fb363d1n147fc0843fa4e626@mail.gmail.com>
Date: Tue, 21 Jul 2009 16:31:00 -0700
From: Paul Menage <menage@...gle.com>
To: Li Zefan <lizf@...fujitsu.com>
Cc: balbir@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, containers@...ts.linux-foundation.org,
kamezawa.hiroyu@...fujitsu.com
Subject: Re: [PATCH 4/9] [RFC] Allow cgroup hierarchies to be created with no
bound subsystems
OK, updated for the next version of these patches.
Thanks,
Paul
On Fri, Jul 3, 2009 at 12:57 AM, Li Zefan<lizf@...fujitsu.com> wrote:
>> +#define MAX_TASKS_SHOWN_PER_CSS 25
>> +static int cgroup_css_links_read(struct cgroup *cont,
>> + struct cftype *cft,
>> + struct seq_file *seq)
>> +{
>> + struct cg_cgroup_link *link, *saved_link;
>
> need a newline
>
>> + write_lock_irq(&css_set_lock);
>
> can be read_lock(&css_set_lock);
>
>> + list_for_each_entry_safe(link, saved_link, &cont->css_sets,
>
> can be list_for_each_entry()
>
>> + cgrp_link_list) {
>> + struct css_set *cg = link->cg;
>> + struct task_struct *task, *saved_task;
>> + int count = 0;
>> + seq_printf(seq, "css_set %p\n", cg);
>> + list_for_each_entry_safe(task, saved_task, &cg->tasks,
>
> ditto
>
>> + cg_list) {
>> + if (count++ > MAX_TASKS_SHOWN_PER_CSS) {
>> + seq_puts(seq, " ...\n");
>> + break;
>> + } else {
>> + seq_printf(seq, " task %d\n",
>> + task_pid_vnr(task));
>> + }
>> + }
>> + }
>> + write_unlock_irq(&css_set_lock);
>> + return 0;
>> +}
>
--
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