lkml.org 
[lkml]   [2015]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/3] 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>
---
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 59096a5..e5a09d2 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -504,20 +504,11 @@ static void cpu_stop_park(unsigned int cpu)
WARN_ON(!list_empty(&stopper->works));
}

-static void cpu_stop_unpark(unsigned int cpu)
-{
- struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
-
- spin_lock_irq(&stopper->lock);
- stopper->enabled = true;
- spin_unlock_irq(&stopper->lock);
-}
-
void stop_machine_unpark(int cpu)
{
struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);

- cpu_stop_unpark(cpu);
+ stopper->enabled = true;
kthread_unpark(stopper->thread);
}

@@ -527,7 +518,6 @@ static struct smp_hotplug_thread cpu_stop_threads = {
.thread_fn = cpu_stopper_thread,
.thread_comm = "migration/%u",
.create = cpu_stop_create,
- .setup = cpu_stop_unpark,
.park = cpu_stop_park,
.selfparking = true,
};
--
1.5.5.1


\
 
 \ /
  Last update: 2015-10-09 18:21    [W:1.876 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site