oom: print triggering task's cpuset and mems allowed

When cpusets are enabled, it's necessary to print the triggering task's
set of allowable nodes so the subsequently printed meminfo can be
interpreted correctly.

We also print the task's cpuset name for informational purposes.

[rientjes@google.com: task lock current before dereferencing cpuset]
Cc: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
David Rientjes 2009-01-06 14:39:01 -08:00 committed by Linus Torvalds
parent c7d4caeb1d
commit 75aa199410
3 changed files with 43 additions and 0 deletions

View file

@ -78,6 +78,8 @@ extern int current_cpuset_is_being_rebound(void);
extern void rebuild_sched_domains(void);
extern void cpuset_print_task_mems_allowed(struct task_struct *p);
#else /* !CONFIG_CPUSETS */
static inline int cpuset_init_early(void) { return 0; }
@ -159,6 +161,10 @@ static inline void rebuild_sched_domains(void)
partition_sched_domains(1, NULL, NULL);
}
static inline void cpuset_print_task_mems_allowed(struct task_struct *p)
{
}
#endif /* !CONFIG_CPUSETS */
#endif /* _LINUX_CPUSET_H */