Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207205
b: refs/heads/master
c: c55db95
h: refs/heads/master
i:
  207203: 322b5fb
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Aug 10, 2010
1 parent 7c5c396 commit 652c265
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd8e8f405ca386c7ce7cbb996ccd985d283b0e03
refs/heads/master: c55db95788a2a55a77f5a3ced1e59578710440b2
39 changes: 21 additions & 18 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,35 +336,38 @@ static struct task_struct *select_bad_process(unsigned long *ppoints,
*/
static void dump_tasks(const struct mem_cgroup *mem)
{
struct task_struct *g, *p;
struct task_struct *p;
struct task_struct *task;

printk(KERN_INFO "[ pid ] uid tgid total_vm rss cpu oom_adj "
"name\n");
do_each_thread(g, p) {
struct mm_struct *mm;

if (mem && !task_in_mem_cgroup(p, mem))
for_each_process(p) {
/*
* We don't have is_global_init() check here, because the old
* code do that. printing init process is not big matter. But
* we don't hope to make unnecessary compatibility breaking.
*/
if (p->flags & PF_KTHREAD)
continue;
if (!thread_group_leader(p))
if (mem && !task_in_mem_cgroup(p, mem))
continue;

task_lock(p);
mm = p->mm;
if (!mm) {
task = find_lock_task_mm(p);
if (!task) {
/*
* total_vm and rss sizes do not exist for tasks with no
* mm so there's no need to report them; they can't be
* oom killed anyway.
* Probably oom vs task-exiting race was happen and ->mm
* have been detached. thus there's no need to report
* them; they can't be oom killed anyway.
*/
task_unlock(p);
continue;
}

printk(KERN_INFO "[%5d] %5d %5d %8lu %8lu %3d %3d %s\n",
p->pid, __task_cred(p)->uid, p->tgid, mm->total_vm,
get_mm_rss(mm), (int)task_cpu(p), p->signal->oom_adj,
p->comm);
task_unlock(p);
} while_each_thread(g, p);
task->pid, __task_cred(task)->uid, task->tgid,
task->mm->total_vm, get_mm_rss(task->mm),
(int)task_cpu(task), task->signal->oom_adj, p->comm);
task_unlock(task);
}
}

static void dump_header(struct task_struct *p, gfp_t gfp_mask, int order,
Expand Down

0 comments on commit 652c265

Please sign in to comment.