public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [patch 0/9] CPU hotplug error handling fixes take2
Date: Mon, 23 Jul 2007 00:33:12 +0900	[thread overview]
Message-ID: <20070722153312.083951746@gmail.com> (raw)

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

             reply	other threads:[~2007-07-22 15:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22 15:33 Akinobu Mita [this message]
2007-07-22 15:33 ` [patch 1/9] slab: cleanup cpuup_callback() Akinobu Mita
2007-07-22 15:33 ` [patch 2/9] slab: fix memory leak in cpu hotplug error path Akinobu Mita
2007-07-24  9:46   ` Pekka Enberg
2007-07-22 15:33 ` [patch 3/9] cpu: deliver CPU_UP_CANCELED only to NOTIFY_OKed callbacks with CPU_UP_PREPARE Akinobu Mita
2007-07-22 23:48   ` Rusty Russell
2007-07-22 15:33 ` [patch 4/9] topology: remove topology_dev_map Akinobu Mita
2007-07-23 23:16   ` Greg KH
2007-07-22 15:33 ` [patch 5/9] thermal_throttle: fix cpu hotplug error handling Akinobu Mita
2007-07-22 15:33 ` [patch 6/9] msr: " Akinobu Mita
2007-07-22 15:33 ` [patch 7/9] cpuid: " Akinobu Mita
2007-07-22 15:33 ` [patch 8/9] mce: " Akinobu Mita
2007-07-22 15:33 ` [patch 9/9] intel_cacheinfo: " Akinobu Mita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070722153312.083951746@gmail.com \
    --to=akinobu.mita@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox