[patch 0/9] CPU hotplug error handling fixes take2

From: Akinobu Mita
Date: Sun Jul 22 2007 - 11:44:20 EST


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

The changes from previous patchset:

- Removed the patch titled sysfs: avoid kmem_cache_free(NULL)
Because it was merged into mainline.

- Removed the patch titled sysdev: add error check in sysdev_register()
It turned out that the patch needs more fixes for microcode and
cpufreq. So I'll separate them from this series of patches.

- Added slab fix noticed by Gautham R Shenoy

The series of patches:

[patch 1/9] slab: cleanup cpuup_callback()
[patch 2/9] slab: fix memory leak in cpu hotplug error path
[patch 3/9] cpu: deliver CPU_UP_CANCELED only to NOTIFY_OKed callbacks
with CPU_UP_PREPARE
[patch 4/9] topology: remove topology_dev_map
[patch 5/9] thermal_throttle: fix cpu hotplug error handling
[patch 6/9] msr: fix cpu hotplug error handling
[patch 7/9] cpuid: fix cpu hotplug error handling
[patch 8/9] mce: fix cpu hotplug error handling
[patch 9/9] intel_cacheinfo: fix cpu hotplug error handling

The patch 1/9 factors out some code from cpuup_callback() to simplify
what the patch 2/9 does.

The patch 2/9 fixes memory leak in allocation failure path. Also it
avoids the memory leak that will be introduced by the patch 3/9.

The patch 3/9 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 4/9 simplifies the cpu hotplug event handling in topology.c
enabled by the patch 3/9.

The patch 5-9/9 are cpu hotplug error handling fixes in drivers.
Mainly these patches shift some callbacks from CPU_ONLINE to CPU_UP_PREPARE.

CPU hotplug/unplug test 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
-
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/