Anna-Maria Gleixner
e46b1db249
mm/compaction: Convert to hotplug state machine
...
Install the callbacks via the state machine. Should the hotplug init fail then
no threads are spawned.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de >
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: Michal Hocko <mhocko@suse.com >
Cc: Mel Gorman <mgorman@techsingularity.net >
Cc: linux-mm@kvack.org
Cc: rt@linutronix.de
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Vlastimil Babka <vbabka@suse.cz >
Link: http://lkml.kernel.org/r/20161126231350.10321-15-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-12-02 00:52:37 +01:00
Anna-Maria Gleixner
21647615db
iommu/vt-d: Convert to hotplug state machine
...
Install the callbacks via the state machine.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de >
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: Joerg Roedel <joro@8bytes.org >
Cc: iommu@lists.linux-foundation.org
Cc: rt@linutronix.de
Cc: David Woodhouse <dwmw2@infradead.org >
Link: http://lkml.kernel.org/r/20161126231350.10321-14-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-12-02 00:52:37 +01:00
Sebastian Andrzej Siewior
cab7a7e5b6
mm/zswap: Convert pool to hotplug state machine
...
Install the callbacks via the state machine. Multi state is used to address the
per-pool notifier. Uppon adding of the intance the callback is invoked for all
online CPUs so the manual init can go.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: linux-mm@kvack.org
Cc: Seth Jennings <sjenning@redhat.com >
Cc: rt@linutronix.de
Link: http://lkml.kernel.org/r/20161126231350.10321-13-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-12-02 00:52:36 +01:00
Sebastian Andrzej Siewior
ad7ed7708d
mm/zswap: Convert dst-mem to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: linux-mm@kvack.org
Cc: Seth Jennings <sjenning@redhat.com >
Cc: rt@linutronix.de
Link: http://lkml.kernel.org/r/20161126231350.10321-12-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-12-02 00:52:36 +01:00
Sebastian Andrzej Siewior
215c89d055
mm/zsmalloc: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com >
Cc: linux-mm@kvack.org
Cc: Minchan Kim <minchan@kernel.org >
Cc: rt@linutronix.de
Cc: Nitin Gupta <ngupta@vflare.org >
Link: http://lkml.kernel.org/r/20161126231350.10321-11-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-12-02 00:52:36 +01:00
Sebastian Andrzej Siewior
5438da977f
mm/vmstat: Convert to hotplug state machine
...
Install the callbacks via the state machine, but do not invoke them as we
can initialize the node state without calling the callbacks on all online
CPUs.
start_shepherd_timer() is now called outside the get_online_cpus() block
which is safe as it only operates on cpu possible mask.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Cc: linux-mm@kvack.org
Cc: rt@linutronix.de
Cc: Johannes Weiner <hannes@cmpxchg.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Mel Gorman <mgorman@techsingularity.net >
Cc: Vlastimil Babka <vbabka@suse.cz >
Link: http://lkml.kernel.org/r/20161129145221.ffc3kg3hd7lxiwj6@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-12-02 00:52:35 +01:00
Sebastian Andrzej Siewior
4c501327b4
mm/vmstat: Avoid on each online CPU loops
...
Both iterations over online cpus can be replaced by the proper node
specific functions.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Acked-by: Michal Hocko <mhocko@suse.com >
Cc: linux-mm@kvack.org
Cc: rt@linutronix.de
Cc: Johannes Weiner <hannes@cmpxchg.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Mel Gorman <mgorman@techsingularity.net >
Cc: Vlastimil Babka <vbabka@suse.cz >
Link: http://lkml.kernel.org/r/20161129145113.fn3lw5aazjjvdrr3@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-12-02 00:52:35 +01:00
Sebastian Andrzej Siewior
76f290935b
mm/vmstat: Drop get_online_cpus() from init_cpu_node_state/vmstat_cpu_dead()
...
Both functions are called with protection against cpu hotplug already so
*_online_cpus() could be dropped.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Acked-by: Michal Hocko <mhocko@suse.com >
Cc: linux-mm@kvack.org
Cc: rt@linutronix.de
Cc: Johannes Weiner <hannes@cmpxchg.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Mel Gorman <mgorman@techsingularity.net >
Cc: Vlastimil Babka <vbabka@suse.cz >
Link: http://lkml.kernel.org/r/20161126231350.10321-8-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-12-02 00:52:35 +01:00
Sebastian Andrzej Siewior
b32614c034
tracing/rb: Convert to hotplug state machine
...
Install the callbacks via the state machine. The notifier in struct
ring_buffer is replaced by the multi instance interface. Upon
__ring_buffer_alloc() invocation, cpuhp_state_add_instance() will invoke
the trace_rb_cpu_prepare() on each CPU.
This callback may now fail. This means __ring_buffer_alloc() will fail and
cleanup (like previously) and during a CPU up event this failure will not
allow the CPU to come up.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: rt@linutronix.de
Link: http://lkml.kernel.org/r/20161126231350.10321-7-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-12-02 00:52:34 +01:00
Sebastian Andrzej Siewior
14660b7ea3
oprofile/nmi timer: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: oprofile-list@lists.sf.net
Cc: Robert Richter <rric@kernel.org >
Cc: rt@linutronix.de
Link: http://lkml.kernel.org/r/20161126231350.10321-6-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-12-02 00:52:34 +01:00
Sebastian Andrzej Siewior
9c6bafab03
net/iucv: Use explicit clean up labels in iucv_init()
...
Ursula suggested to use explicit labels for clean up in the error path
instead of one `out_free' label, which handles multiple exits, introduced
in commit 38b482929e ("net/iucv: Convert to hotplug state machine").
Suggested-by: Ursula Braun <ubraun@linux.vnet.ibm.com >
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: linux-s390@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: rt@linutronix.de
Cc: "David S. Miller" <davem@davemloft.net >
Link: http://lkml.kernel.org/r/20161124161013.dukr42y2nwscosk6@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-28 17:29:04 +01:00
Sebastian Andrzej Siewior
c8b877a5e5
x86/pci/amd-bus: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
The smp_call_function_single() is dropped because the ONLINE callback is
invoked on the target CPU since commit 1cf4f629d9 ("cpu/hotplug: Move
online calls to hotplugged cpu"). smp_call_function_single() invokes the
invoked function with interrupts disabled, but this calling convention is
not preserved as the MSR is not modified by anything else than this code.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: Bjorn Helgaas <bhelgaas@google.com >
Cc: linux-pci@vger.kernel.org
Cc: rt@linuxtronix.de
Link: http://lkml.kernel.org/r/20161117183541.8588-21-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:43 +01:00
Sebastian Andrzej Siewior
89666c5047
x86/oprofile/nmi: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: Robert Richter <rric@kernel.org >
Cc: oprofile-list@lists.sf.net
Cc: rt@linuxtronix.de
Link: http://lkml.kernel.org/r/20161117183541.8588-20-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:43 +01:00
Anna-Maria Gleixner
08ed487c81
x86/oprofile/nmi: Remove superfluous smp_function_call_single()
...
Since commit 1cf4f629d9 ("cpu/hotplug: Move online calls to
hotplugged cpu") the CPU_ONLINE and CPU_DOWN_PREPARE notifiers are
always run on the hot plugged CPU, and as of commit 3b9d6da67e
("cpu/hotplug: Fix rollback during error-out in __cpu_disable()")
the CPU_DOWN_FAILED notifier also runs on the hot plugged CPU.
This patch converts the SMP functional calls into direct calls.
smp_call_function_single() executes the function with interrupts
disabled. This calling convention is preserved.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de >
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: Robert Richter <rric@kernel.org >
Cc: rt@linuxtronix.de
Cc: oprofile-list@lists.sf.net
Link: http://lkml.kernel.org/r/20161117183541.8588-19-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:42 +01:00
Sebastian Andrzej Siewior
e5355cd6e7
sparc/sysfs: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
The previous convention of keeping the files around until the CPU is dead
has not been preserved as there is no point to keep them available when the
cpu is going down. This makes the hotplug call symmetric.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Acked-by: "David S. Miller" <davem@davemloft.net >
Cc: sparclinux@vger.kernel.org
Cc: rt@linuxtronix.de
Link: http://lkml.kernel.org/r/20161117183541.8588-18-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:42 +01:00
Sebastian Andrzej Siewior
977ab257a2
powerpc/sysfs: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
The previous convention of keeping the files around until the CPU is dead
has not been preserved as there is no point to keep them available when the
cpu is going down. This makes the hotplug call symmetric.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org >
Cc: rt@linuxtronix.de
Cc: Paul Mackerras <paulus@samba.org >
Cc: Michael Ellerman <mpe@ellerman.id.au >
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/20161117183541.8588-17-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:42 +01:00
Sebastian Andrzej Siewior
9b377e217f
ARM/hw_breakpoint: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
smp_call_function_single() has been removed because the function is already
invoked on the target CPU.
[ tglx: Added protection agaist hotplug back according to discussion with Will ]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: rt@linuxtronix.de
Cc: Will Deacon <will.deacon@arm.com >
Cc: Russell King <linux@armlinux.org.uk >
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20161117183541.8588-16-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:41 +01:00
Sebastian Andrzej Siewior
a3c9b14f6f
arm/bL_switcher: Convert to hotplug state machine
...
Install the callbacks via the state machine.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: rt@linuxtronix.de
Cc: linux-arm-kernel@lists.infradead.org
Cc: Russell King <linux@armlinux.org.uk >
Link: http://lkml.kernel.org/r/20161117183541.8588-15-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:41 +01:00
Sebastian Andrzej Siewior
31eff2434d
sched/nohz: Convert to hotplug state machine
...
Install the callbacks via the state machine.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: rt@linuxtronix.de
Link: http://lkml.kernel.org/r/20161117183541.8588-14-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:41 +01:00
Sebastian Andrzej Siewior
38b482929e
net/iucv: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke the
callbacks on the already online CPUs. The smp function calls in the
online/downprep callbacks are not required as the callback is guaranteed to
be invoked on the upcoming/outgoing cpu.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: linux-s390@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: Ursula Braun <ubraun@linux.vnet.ibm.com >
Cc: rt@linuxtronix.de
Link: http://lkml.kernel.org/r/20161117183541.8588-13-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:40 +01:00
Sebastian Andrzej Siewior
948b9c60cb
watchdog/octeon: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: Wim Van Sebroeck <wim@iguana.be >
Cc: rt@linuxtronix.de
Cc: Guenter Roeck <linux@roeck-us.net >
Cc: linux-watchdog@vger.kernel.org
Link: http://lkml.kernel.org/r/20161117183541.8588-12-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:40 +01:00
Sebastian Andrzej Siewior
9c248f8896
PCI/xgene-msi: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: linux-pci@vger.kernel.org
Cc: Duc Dang <dhdang@apm.com >
Cc: rt@linuxtronix.de
Cc: Bjorn Helgaas <bhelgaas@google.com >
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20161117183541.8588-8-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:40 +01:00
Sebastian Andrzej Siewior
8fba38c937
x86/msr: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
Move the callbacks to online/offline as there is no point in having the
files around before the cpu is online and until its completely gone.
[ tglx: Move the callbacks to online/offline ]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: rt@linuxtronix.de
Link: http://lkml.kernel.org/r/20161117183541.8588-4-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:39 +01:00
Thomas Gleixner
ee92be9b0d
x86/cpuid: Move the hotplug callbacks to online
...
No point to have this file around before the cpu is online and no point to
have it around until the cpu is dead. Get rid of the explicit state.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Cc: Sebastian Siewior <bigeasy@linutronix.de >
2016-11-22 23:34:39 +01:00
Sebastian Andrzej Siewior
8c07b494ab
x86/cpuid: Convert to hotplug state machine
...
Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de >
Cc: rt@linuxtronix.de
Link: http://lkml.kernel.org/r/20161117183541.8588-3-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
2016-11-22 23:34:39 +01:00