|
@@ -7220,12 +7220,12 @@ void normalize_rt_tasks(void)
|
|
|
unsigned long flags;
|
|
|
struct rq *rq;
|
|
|
|
|
|
- read_lock_irqsave(&tasklist_lock, flags);
|
|
|
+ read_lock(&tasklist_lock);
|
|
|
for_each_process_thread(g, p) {
|
|
|
/*
|
|
|
* Only normalize user tasks:
|
|
|
*/
|
|
|
- if (!p->mm)
|
|
|
+ if (p->flags & PF_KTHREAD)
|
|
|
continue;
|
|
|
|
|
|
p->se.exec_start = 0;
|
|
@@ -7240,20 +7240,16 @@ void normalize_rt_tasks(void)
|
|
|
* Renice negative nice level userspace
|
|
|
* tasks back to 0:
|
|
|
*/
|
|
|
- if (task_nice(p) < 0 && p->mm)
|
|
|
+ if (task_nice(p) < 0)
|
|
|
set_user_nice(p, 0);
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- raw_spin_lock(&p->pi_lock);
|
|
|
- rq = __task_rq_lock(p);
|
|
|
-
|
|
|
+ rq = task_rq_lock(p, &flags);
|
|
|
normalize_task(rq, p);
|
|
|
-
|
|
|
- __task_rq_unlock(rq);
|
|
|
- raw_spin_unlock(&p->pi_lock);
|
|
|
+ task_rq_unlock(rq, p, &flags);
|
|
|
}
|
|
|
- read_unlock_irqrestore(&tasklist_lock, flags);
|
|
|
+ read_unlock(&tasklist_lock);
|
|
|
}
|
|
|
|
|
|
#endif /* CONFIG_MAGIC_SYSRQ */
|