Skip to content

CPU hotplug error handling fixes

Akinobu Mita lkml 1 version In review

Get series with b4
b4 am 20070716134855.GA1858@APFDCB5C

Versions newest first

  1. v1 Latest10 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10sysfs: fix kmem_cache_free(NULL)fs/sysfs/dir.c+7 -63 replies
2/10sysdev: add error check in sysdev_register()drivers/base/sys.c+38 -102 replies
3/10sysfs: fix error handling in create_files()fs/sysfs/group.c+12 -64 replies
4/10cpu: deliver CPU_UP_CANCELED only to NOTIFY_OKed callbacks with CPU_UP_PREPAREkernel/cpu.c+2 -04 replies
5/10topology: remove topology_dev_mapdrivers/base/topology.c+1 -100 replies
6/10thermal_throttle: fix cpu hotplug error handlingarch/i386/kernel/cpu/mcheck/therm_throt.c+6 -50 replies
7/10msr: fix cpu hotplug error handlingarch/i386/kernel/msr.c+19 -130 replies
8/10cpuid: fix cpu hotplug error handlingarch/i386/kernel/cpuid.c+19 -130 replies
9/10mce: fix cpu hotplug error handlingarch/x86_64/kernel/mce.c+24 -110 replies
10/10intel_cacheinfo: fix cpu hotplug error handlingarch/i386/kernel/cpu/intel_cacheinfo.c+40 -170 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/10] CPU hotplug error handling fixes

This series of patches fixes the error handling for cpu hotplug. The problem is revealed by CPU hotplug/unplug test with fault-injection.

The patch 1-3 are sysfs or driver core related error handling fixes. These are not directly related to cpu hotplug. But these are needed to pass the stress test.

The patch 4 changes the behavior when one of the callbacks in notifier chain returns NOTIFY_BAD with CPU_UP_PREPARE event. This change makes cpu hotplug error handling simple.

The patch 5 simplifies the cpu hotplug event handling in topology.c by the patch 4.

The patch 6-10 are error handling fixes in cpu hotplug event callbacks. These fixes also depend on the change by the patch 4.

Here is the test script I have confirmed with these patches. I guess we still have the similar bugs that I could not test due to no hardware. So it may be worth someone trying this script.

----------[ cut here ]----------

#!/bin/bash

FAILTYPE=failslab
CPU=1 CPU_ONLINE=/sys/devices/system/cpu/cpu${CPU}/online

faulty_system()

{
        bash -c "echo 1 > /proc/self/make-it-fail && exec $*"
}

[ "$UID" == 0 ] || exit 1
[ -n "$FAILTYPE" -a -f /debug/$FAILTYPE/probability ] || exit 1 [ -f $CPU_ONLINE ] || exit 1

echo N > /debug/$FAILTYPE/ignore-gfp-wait
echo Y > /debug/$FAILTYPE/task-filter
echo 1 > /debug/$FAILTYPE/probability
echo -1 > /debug/$FAILTYPE/times

while true
do
faulty_system "echo 0 > $CPU_ONLINE"
faulty_system "echo 1 > $CPU_ONLINE"
done