]> git.baikalelectronics.ru Git - kernel.git/commit
sched/fair: Restore previous rq_flags when migrating tasks in hotplug
authorMatt Fleming <matt@codeblueprint.co.uk>
Wed, 26 Oct 2016 15:15:44 +0000 (16:15 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 30 Jan 2017 10:46:35 +0000 (11:46 +0100)
commitd8b5c00c4fb97fe2fe5d72fb5fde134df9c037c8
tree013c49fa232779343680d3c8dd21871809dafd54
parentc95fb056a8d9e764fa4ec1c104d86a5e82b41042
sched/fair: Restore previous rq_flags when migrating tasks in hotplug

__migrate_task() can return with a different runqueue locked than the
one we passed as an argument. So that we can repin the lock in
migrate_tasks() (and keep the update_rq_clock() bit) we need to
restore the old rq_flags before repinning.

Note that it wouldn't be correct to change move_queued_task() to repin
because of the change of runqueue and the fact that having an
up-to-date clock on the initial rq doesn't mean the new rq has one
too.

Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c