diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-09-21 11:06:27 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-21 11:37:27 +0200 |
commit | d01d4827858cdc2e1c437c87ab65ec0a00fd40f8 (patch) | |
tree | 433ed8bfdf144887129e9b0ea625c99780bedfd6 /fs/proc/array.c | |
parent | sched: Simplify sys_sched_rr_get_interval() system call (diff) | |
download | linux-d01d4827858cdc2e1c437c87ab65ec0a00fd40f8.tar.xz linux-d01d4827858cdc2e1c437c87ab65ec0a00fd40f8.zip |
sched: Always show Cpus_allowed field in /proc/<pid>/status
The Cpus_allowed fields in /proc/<pid>/status is currently only
shown in case of CONFIG_CPUSETS. However their contents are also
useful for the !CONFIG_CPUSETS case.
So change the current behaviour and always show these fields.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090921090627.GD4649@osiris.boeblingen.de.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r-- | fs/proc/array.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 725a650bbbb8..762aea9c9c71 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -321,6 +321,16 @@ static inline void task_context_switch_counts(struct seq_file *m, p->nivcsw); } +static void task_cpus_allowed(struct seq_file *m, struct task_struct *task) +{ + seq_printf(m, "Cpus_allowed:\t"); + seq_cpumask(m, &task->cpus_allowed); + seq_printf(m, "\n"); + seq_printf(m, "Cpus_allowed_list:\t"); + seq_cpumask_list(m, &task->cpus_allowed); + seq_printf(m, "\n"); +} + int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { @@ -335,6 +345,7 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, } task_sig(m, task); task_cap(m, task); + task_cpus_allowed(m, task); cpuset_task_status_allowed(m, task); #if defined(CONFIG_S390) task_show_regs(m, task); |