|
@@ -788,36 +788,6 @@ void deactivate_task(struct rq *rq, struct task_struct *p, int flags)
|
|
|
dequeue_task(rq, p, flags);
|
|
dequeue_task(rq, p, flags);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void sched_set_stop_task(int cpu, struct task_struct *stop)
|
|
|
|
|
-{
|
|
|
|
|
- struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
|
|
|
|
|
- struct task_struct *old_stop = cpu_rq(cpu)->stop;
|
|
|
|
|
-
|
|
|
|
|
- if (stop) {
|
|
|
|
|
- /*
|
|
|
|
|
- * Make it appear like a SCHED_FIFO task, its something
|
|
|
|
|
- * userspace knows about and won't get confused about.
|
|
|
|
|
- *
|
|
|
|
|
- * Also, it will make PI more or less work without too
|
|
|
|
|
- * much confusion -- but then, stop work should not
|
|
|
|
|
- * rely on PI working anyway.
|
|
|
|
|
- */
|
|
|
|
|
- sched_setscheduler_nocheck(stop, SCHED_FIFO, ¶m);
|
|
|
|
|
-
|
|
|
|
|
- stop->sched_class = &stop_sched_class;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- cpu_rq(cpu)->stop = stop;
|
|
|
|
|
-
|
|
|
|
|
- if (old_stop) {
|
|
|
|
|
- /*
|
|
|
|
|
- * Reset it back to a normal scheduling class so that
|
|
|
|
|
- * it can die in pieces.
|
|
|
|
|
- */
|
|
|
|
|
- old_stop->sched_class = &rt_sched_class;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
/*
|
|
/*
|
|
|
* __normal_prio - return the priority that is based on the static prio
|
|
* __normal_prio - return the priority that is based on the static prio
|
|
|
*/
|
|
*/
|
|
@@ -1588,6 +1558,36 @@ static void update_avg(u64 *avg, u64 sample)
|
|
|
*avg += diff >> 3;
|
|
*avg += diff >> 3;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void sched_set_stop_task(int cpu, struct task_struct *stop)
|
|
|
|
|
+{
|
|
|
|
|
+ struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
|
|
|
|
|
+ struct task_struct *old_stop = cpu_rq(cpu)->stop;
|
|
|
|
|
+
|
|
|
|
|
+ if (stop) {
|
|
|
|
|
+ /*
|
|
|
|
|
+ * Make it appear like a SCHED_FIFO task, its something
|
|
|
|
|
+ * userspace knows about and won't get confused about.
|
|
|
|
|
+ *
|
|
|
|
|
+ * Also, it will make PI more or less work without too
|
|
|
|
|
+ * much confusion -- but then, stop work should not
|
|
|
|
|
+ * rely on PI working anyway.
|
|
|
|
|
+ */
|
|
|
|
|
+ sched_setscheduler_nocheck(stop, SCHED_FIFO, ¶m);
|
|
|
|
|
+
|
|
|
|
|
+ stop->sched_class = &stop_sched_class;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ cpu_rq(cpu)->stop = stop;
|
|
|
|
|
+
|
|
|
|
|
+ if (old_stop) {
|
|
|
|
|
+ /*
|
|
|
|
|
+ * Reset it back to a normal scheduling class so that
|
|
|
|
|
+ * it can die in pieces.
|
|
|
|
|
+ */
|
|
|
|
|
+ old_stop->sched_class = &rt_sched_class;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
#else
|
|
#else
|
|
|
|
|
|
|
|
static inline int __set_cpus_allowed_ptr(struct task_struct *p,
|
|
static inline int __set_cpus_allowed_ptr(struct task_struct *p,
|