Re: [PATCH 32/35] clockevents: Fix cpu down race for hrtimer based broadcasting

From: Peter Zijlstra
Date: Sat Feb 21 2015 - 07:48:23 EST


On Thu, Feb 19, 2015 at 12:51:52PM -0500, Nicolas Pitre wrote:
>
> This breaks the b.L switcher disabling code which essentially does:
>
> static void bL_switcher_restore_cpus(void)
> {
> int i;
>
> for_each_cpu(i, &bL_switcher_removed_logical_cpus) {
> struct device *cpu_dev = get_cpu_device(i);
> int ret = device_online(cpu_dev);
> if (ret)
> dev_err(cpu_dev, "switcher: unable to restore CPU\n");
> }
> }

Just so I understand, this device_{on,ofF}line() stuff is basically just
cpu_{up,down}() but obfuscated through the device model nonsense, right?

Also it seems bL_switcher_enable() relies on lock_device_hotplug() to
stabilize the online cpu mask; it does not, only the hotplug lock does.

I'm having a very hard time trying to follow wth this thing all is
doing; its using hotplug but its also doing magic with cpu_suspend().

/me confused..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/