+21
−30
+16
−6
+2
−2
+1
−1
+8
−14
Loading
Add {DE,EN}QUEUE_CLASS and fold the sched_class::switch* methods into
the change pattern. This completes and makes the pattern more
symmetric.
This changes the order of callbacks slightly:
OLD NEW
|
| switching_from()
dequeue_task(); | dequeue_task()
put_prev_task(); | put_prev_task()
| switched_from()
|
... change task ... | ... change task ...
|
switching_to(); | switching_to()
enqueue_task(); | enqueue_task()
set_next_task(); | set_next_task()
prev_class->switched_from() |
switched_to() | switched_to()
|
Notably, it moves the switched_from() callback right after the
dequeue/put. Existing implementations don't appear to be affected by
this change in location -- specifically the task isn't enqueued on the
class in question in either location.
Make (CLASS)^(SAVE|MOVE), because there is nothing to save-restore
when changing scheduling classes.
Signed-off-by:
Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by:
Juri Lelli <juri.lelli@redhat.com>
Acked-by:
Tejun Heo <tj@kernel.org>
Acked-by:
Vincent Guittot <vincent.guittot@linaro.org>