diff options
author | Oleg Nesterov <oleg@redhat.com> | 2015-10-09 12:00:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-10-20 04:23:56 -0400 |
commit | f0cf16cbd0659d2dd21352da9f06f3fab7a51596 (patch) | |
tree | 88579ea69b73ad79151c90878357f6480b9340fb | |
parent | c00166d87e730088d919814020e96ffed129d0d1 (diff) |
stop_machine: Kill cpu_stop_threads->setup() and cpu_stop_unpark()
Now that we always use stop_machine_unpark() to wake the stopper
threas up, we can kill ->setup() and fold cpu_stop_unpark() into
stop_machine_unpark().
And we do not need stopper->lock to set stopper->enabled = true.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: heiko.carstens@de.ibm.com
Link: http://lkml.kernel.org/r/20151009160051.GA10169@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | kernel/stop_machine.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index 59096a55089f..e5a09d2dc575 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c | |||
@@ -504,20 +504,11 @@ static void cpu_stop_park(unsigned int cpu) | |||
504 | WARN_ON(!list_empty(&stopper->works)); | 504 | WARN_ON(!list_empty(&stopper->works)); |
505 | } | 505 | } |
506 | 506 | ||
507 | static void cpu_stop_unpark(unsigned int cpu) | ||
508 | { | ||
509 | struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu); | ||
510 | |||
511 | spin_lock_irq(&stopper->lock); | ||
512 | stopper->enabled = true; | ||
513 | spin_unlock_irq(&stopper->lock); | ||
514 | } | ||
515 | |||
516 | void stop_machine_unpark(int cpu) | 507 | void stop_machine_unpark(int cpu) |
517 | { | 508 | { |
518 | struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu); | 509 | struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu); |
519 | 510 | ||
520 | cpu_stop_unpark(cpu); | 511 | stopper->enabled = true; |
521 | kthread_unpark(stopper->thread); | 512 | kthread_unpark(stopper->thread); |
522 | } | 513 | } |
523 | 514 | ||
@@ -527,7 +518,6 @@ static struct smp_hotplug_thread cpu_stop_threads = { | |||
527 | .thread_fn = cpu_stopper_thread, | 518 | .thread_fn = cpu_stopper_thread, |
528 | .thread_comm = "migration/%u", | 519 | .thread_comm = "migration/%u", |
529 | .create = cpu_stop_create, | 520 | .create = cpu_stop_create, |
530 | .setup = cpu_stop_unpark, | ||
531 | .park = cpu_stop_park, | 521 | .park = cpu_stop_park, |
532 | .selfparking = true, | 522 | .selfparking = true, |
533 | }; | 523 | }; |