lkml.org 
[lkml]   [2009]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/9] [RFC] Allow cgroup hierarchies to be created with no bound subsystems
> +#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;
> +}


\
 
 \ /
  Last update: 2009-07-03 09:59    [W:0.157 / U:1.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site