<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/cpu.c, branch v4.9.10</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.10</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.10'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-01-06T09:40:10Z</updated>
<entry>
<title>hotplug: Make register and unregister notifier API symmetric</title>
<updated>2017-01-06T09:40:10Z</updated>
<author>
<name>Michal Hocko</name>
<email>mhocko@suse.com</email>
</author>
<published>2016-12-07T13:54:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=56eaecc8ecf398c7af3fa252eff6164102b0ace1'/>
<id>urn:sha1:56eaecc8ecf398c7af3fa252eff6164102b0ace1</id>
<content type='text'>
commit 777c6e0daebb3fcefbbd6f620410a946b07ef6d0 upstream.

Yu Zhao has noticed that __unregister_cpu_notifier only unregisters its
notifiers when HOTPLUG_CPU=y while the registration might succeed even
when HOTPLUG_CPU=n if MODULE is enabled. This means that e.g. zswap
might keep a stale notifier on the list on the manual clean up during
the pool tear down and thus corrupt the list. Resulting in the following

[  144.964346] BUG: unable to handle kernel paging request at ffff880658a2be78
[  144.971337] IP: [&lt;ffffffffa290b00b&gt;] raw_notifier_chain_register+0x1b/0x40
&lt;snipped&gt;
[  145.122628] Call Trace:
[  145.125086]  [&lt;ffffffffa28e5cf8&gt;] __register_cpu_notifier+0x18/0x20
[  145.131350]  [&lt;ffffffffa2a5dd73&gt;] zswap_pool_create+0x273/0x400
[  145.137268]  [&lt;ffffffffa2a5e0fc&gt;] __zswap_param_set+0x1fc/0x300
[  145.143188]  [&lt;ffffffffa2944c1d&gt;] ? trace_hardirqs_on+0xd/0x10
[  145.149018]  [&lt;ffffffffa2908798&gt;] ? kernel_param_lock+0x28/0x30
[  145.154940]  [&lt;ffffffffa2a3e8cf&gt;] ? __might_fault+0x4f/0xa0
[  145.160511]  [&lt;ffffffffa2a5e237&gt;] zswap_compressor_param_set+0x17/0x20
[  145.167035]  [&lt;ffffffffa2908d3c&gt;] param_attr_store+0x5c/0xb0
[  145.172694]  [&lt;ffffffffa290848d&gt;] module_attr_store+0x1d/0x30
[  145.178443]  [&lt;ffffffffa2b2b41f&gt;] sysfs_kf_write+0x4f/0x70
[  145.183925]  [&lt;ffffffffa2b2a5b9&gt;] kernfs_fop_write+0x149/0x180
[  145.189761]  [&lt;ffffffffa2a99248&gt;] __vfs_write+0x18/0x40
[  145.194982]  [&lt;ffffffffa2a9a412&gt;] vfs_write+0xb2/0x1a0
[  145.200122]  [&lt;ffffffffa2a9a732&gt;] SyS_write+0x52/0xa0
[  145.205177]  [&lt;ffffffffa2ff4d97&gt;] entry_SYSCALL_64_fastpath+0x12/0x17

This can be even triggered manually by changing
/sys/module/zswap/parameters/compressor multiple times.

Fix this issue by making unregister APIs symmetric to the register so
there are no surprises.

Fixes: 47e627bc8c9a ("[PATCH] hotplug: Allow modules to use the cpu hotplug notifiers even if !CONFIG_HOTPLUG_CPU")
Reported-and-tested-by: Yu Zhao &lt;yuzhao@google.com&gt;
Signed-off-by: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: linux-mm@kvack.org
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Dan Streetman &lt;ddstreet@ieee.org&gt;
Link: http://lkml.kernel.org/r/20161207135438.4310-1-mhocko@kernel.org
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpu/hotplug: Use distinct name for cpu_hotplug.dep_map</title>
<updated>2016-10-16T09:09:32Z</updated>
<author>
<name>Joonas Lahtinen</name>
<email>joonas.lahtinen@linux.intel.com</email>
</author>
<published>2016-10-12T10:18:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a705e07b9c80df27b6bb12f7a4cd4cf4ed2f728b'/>
<id>urn:sha1:a705e07b9c80df27b6bb12f7a4cd4cf4ed2f728b</id>
<content type='text'>
Use distinctive name for cpu_hotplug.dep_map to avoid the actual
cpu_hotplug.lock appearing as cpu_hotplug.lock#2 in lockdep splats.

Signed-off-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Acked-by: Gautham R. Shenoy &lt;ego@linux.vnet.ibm.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Gautham R . Shenoy &lt;ego@linux.vnet.ibm.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: intel-gfx@lists.freedesktop.org
Cc: trivial@kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2016-10-04T02:43:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-04T02:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=597f03f9d133e9837d00965016170271d4f87dcf'/>
<id>urn:sha1:597f03f9d133e9837d00965016170271d4f87dcf</id>
<content type='text'>
Pull CPU hotplug updates from Thomas Gleixner:
 "Yet another batch of cpu hotplug core updates and conversions:

   - Provide core infrastructure for multi instance drivers so the
     drivers do not have to keep custom lists.

   - Convert custom lists to the new infrastructure. The block-mq custom
     list conversion comes through the block tree and makes the diffstat
     tip over to more lines removed than added.

   - Handle unbalanced hotplug enable/disable calls more gracefully.

   - Remove the obsolete CPU_STARTING/DYING notifier support.

   - Convert another batch of notifier users.

   The relayfs changes which conflicted with the conversion have been
   shipped to me by Andrew.

   The remaining lot is targeted for 4.10 so that we finally can remove
   the rest of the notifiers"

* 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits)
  cpufreq: Fix up conversion to hotplug state machine
  blk/mq: Reserve hotplug states for block multiqueue
  x86/apic/uv: Convert to hotplug state machine
  s390/mm/pfault: Convert to hotplug state machine
  mips/loongson/smp: Convert to hotplug state machine
  mips/octeon/smp: Convert to hotplug state machine
  fault-injection/cpu: Convert to hotplug state machine
  padata: Convert to hotplug state machine
  cpufreq: Convert to hotplug state machine
  ACPI/processor: Convert to hotplug state machine
  virtio scsi: Convert to hotplug state machine
  oprofile/timer: Convert to hotplug state machine
  block/softirq: Convert to hotplug state machine
  lib/irq_poll: Convert to hotplug state machine
  x86/microcode: Convert to hotplug state machine
  sh/SH-X3 SMP: Convert to hotplug state machine
  ia64/mca: Convert to hotplug state machine
  ARM/OMAP/wakeupgen: Convert to hotplug state machine
  ARM/shmobile: Convert to hotplug state machine
  arm64/FP/SIMD: Convert to hotplug state machine
  ...
</content>
</entry>
<entry>
<title>Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2016-10-03T17:29:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-03T17:29:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4b978934a440c1aafce986353001b03289eaa040'/>
<id>urn:sha1:4b978934a440c1aafce986353001b03289eaa040</id>
<content type='text'>
Pull RCU updates from Ingo Molnar:
 "The main changes in this cycle were:

   - Expedited grace-period changes, most notably avoiding having user
     threads drive expedited grace periods, using a workqueue instead.

   - Miscellaneous fixes, including a performance fix for lists that was
     sent with the lists modifications.

   - CPU hotplug updates, most notably providing exact CPU-online
     tracking for RCU. This will in turn allow removal of the checks
     supporting RCU's prior heuristic that was based on the assumption
     that CPUs would take no longer than one jiffy to come online.

   - Torture-test updates.

   - Documentation updates"

* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
  list: Expand list_first_entry_or_null()
  torture: TOROUT_STRING(): Insert a space between flag and message
  rcuperf: Consistently insert space between flag and message
  rcutorture: Print out barrier error as document says
  torture: Add task state to writer-task stall printk()s
  torture: Convert torture_shutdown() to hrtimer
  rcutorture: Convert to hotplug state machine
  cpu/hotplug: Get rid of CPU_STARTING reference
  rcu: Provide exact CPU-online tracking for RCU
  rcu: Avoid redundant quiescent-state chasing
  rcu: Don't use modular infrastructure in non-modular code
  sched: Make wake_up_nohz_cpu() handle CPUs going offline
  rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads
  rcu: Use RCU's online-CPU state for expedited IPI retry
  rcu: Exclude RCU-offline CPUs from expedited grace periods
  rcu: Make expedited RCU CPU stall warnings respond to controls
  rcu: Stop disabling expedited RCU CPU stall warnings
  rcu: Drive expedited grace periods from workqueue
  rcu: Consolidate expedited grace period machinery
  documentation: Record reason for rcu_head two-byte alignment
  ...
</content>
</entry>
<entry>
<title>slab: Convert to hotplug state machine</title>
<updated>2016-09-06T16:30:20Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2016-08-23T12:53:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6731d4f12315aed5f7eefc52dac30428e382d7d0'/>
<id>urn:sha1:6731d4f12315aed5f7eefc52dac30428e382d7d0</id>
<content type='text'>
Install the callbacks via the state machine.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Reviewed-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Pekka Enberg &lt;penberg@kernel.org&gt;
Cc: linux-mm@kvack.org
Cc: rt@linutronix.de
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Link: http://lkml.kernel.org/r/20160823125319.abeapfjapf2kfezp@linutronix.de
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>relayfs: Convert to hotplug state machine</title>
<updated>2016-09-06T16:30:20Z</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2016-08-18T12:57:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e6d4989a9ad1ccc343f29578a461612ed80fc6c5'/>
<id>urn:sha1:e6d4989a9ad1ccc343f29578a461612ed80fc6c5</id>
<content type='text'>
Install the callbacks via the state machine. They are installed at run time but
relay_prepare_cpu() does not need to be invoked by the boot CPU because
relay_open() was not yet invoked and there are no pools that need to be created.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Reviewed-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: rt@linutronix.de
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Link: http://lkml.kernel.org/r/20160818125731.27256-3-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>cpu/hotplug: Remove CPU_STARTING and CPU_DYING notifier</title>
<updated>2016-09-06T16:30:19Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2016-08-18T12:57:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ee1e714b94521b0bb27b04dfd1728ec51b19d4f0'/>
<id>urn:sha1:ee1e714b94521b0bb27b04dfd1728ec51b19d4f0</id>
<content type='text'>
All users are converted to state machine, remove CPU_STARTING and the
corresponding CPU_DYING.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: rt@linutronix.de
Link: http://lkml.kernel.org/r/20160818125731.27256-2-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>cpu/hotplug: Make state names consistent</title>
<updated>2016-09-06T14:20:28Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2016-09-06T14:13:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=677f6646533d701c8609b8bcb9304173c11cc194'/>
<id>urn:sha1:677f6646533d701c8609b8bcb9304173c11cc194</id>
<content type='text'>
We should have all names in the scheme "[subsys/]facility:state]". Fix the
core to comply.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>cpu/hotplug: Replace anon union</title>
<updated>2016-09-05T13:32:58Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2016-09-05T13:28:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3c1627e999e45e292d5d7ea3751ed86a6383ee2c'/>
<id>urn:sha1:3c1627e999e45e292d5d7ea3751ed86a6383ee2c</id>
<content type='text'>
Some compilers are unhappy with the anon union in the state array. Replace
it with a named union.

While at it align the state array initializers proper and add the missing
name tags.

Fixes: cf392d10b69e "cpu/hotplug: Add multi instance support"
Reported-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Reported-by: Fenguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: rt@linutronix.de
</content>
</entry>
<entry>
<title>cpu/hotplug: Handle unbalanced hotplug enable/disable</title>
<updated>2016-09-02T18:37:17Z</updated>
<author>
<name>Lianwei Wang</name>
<email>lianwei.wang@gmail.com</email>
</author>
<published>2016-06-10T06:43:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=01b41159066531cc8d664362ff0cd89dd137bbfa'/>
<id>urn:sha1:01b41159066531cc8d664362ff0cd89dd137bbfa</id>
<content type='text'>
When cpu_hotplug_enable() is called unbalanced w/o a preceeding
cpu_hotplug_disable() the code emits a warning, but happily decrements the
disabled counter. This causes the next operations to malfunction.

Prevent the decrement and just emit a warning.

Signed-off-by: Lianwei Wang &lt;lianwei.wang@gmail.com&gt;
Cc: peterz@infradead.org
Cc: linux-pm@vger.kernel.org
Cc: oleg@redhat.com
Link: http://lkml.kernel.org/r/1465541008-12476-1-git-send-email-lianwei.wang@gmail.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
</feed>
