|
@@ -256,14 +256,11 @@ static struct task_struct *select_bad_process(unsigned long *ppoints,
|
|
for_each_process(p) {
|
|
for_each_process(p) {
|
|
unsigned long points;
|
|
unsigned long points;
|
|
|
|
|
|
- /*
|
|
|
|
- * skip kernel threads and tasks which have already released
|
|
|
|
- * their mm.
|
|
|
|
- */
|
|
|
|
|
|
+ /* skip tasks that have already released their mm */
|
|
if (!p->mm)
|
|
if (!p->mm)
|
|
continue;
|
|
continue;
|
|
- /* skip the init task */
|
|
|
|
- if (is_global_init(p))
|
|
|
|
|
|
+ /* skip the init task and kthreads */
|
|
|
|
+ if (is_global_init(p) || (p->flags & PF_KTHREAD))
|
|
continue;
|
|
continue;
|
|
if (mem && !task_in_mem_cgroup(p, mem))
|
|
if (mem && !task_in_mem_cgroup(p, mem))
|
|
continue;
|
|
continue;
|