[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <48F631E9.1010707@linux.vnet.ibm.com>
Date: Wed, 15 Oct 2008 12:09:45 -0600
From: Chris J Arges <arges@...ux.vnet.ibm.com>
To: oprofile-list@...ts.sourceforge.net, linux-kernel@...r.kernel.org
CC: Robert Richter <robert.richter@....com>,
Maynard Johnson <maynardj@...ibm.com>
Subject: [PATCH] oprofile: hotplug cpu fix
This patch addresses crashes when hotplugging cpus while profiling.
I used the following script to test :
#!/bin/bash
startup()
{
opcontrol --init
opcontrol --vmlinux=/boot/vmlinux
opcontrol --reset
opcontrol --start
opcontrol --dump
}
shutdown()
{
opcontrol --dump
opcontrol -h
}
startup
echo 0 > /sys/devices/system/cpu/cpu2/online
echo 0 > /sys/devices/system/cpu/cpu1/online
shutdown
startup
echo 1 > /sys/devices/system/cpu/cpu2/online
echo 1 > /sys/devices/system/cpu/cpu1/online
shutdown
startup
echo 0 > /sys/devices/system/cpu/cpu2/online
shutdown
startup
echo 1 > /sys/devices/system/cpu/cpu2/online
echo 0 > /sys/devices/system/cpu/cpu2/online
shutdown
echo 1 > /sys/devices/system/cpu/cpu2/online
Without the patch on my Power machine (ppc970mp) I get the following error:
Vector: 300 (Data Access) at [c000000276143950]
pc: d0000000000366e8: .add_event_entry+0x60/0xb0 [oprofile]
lr: d000000000035e60: .sync_buffer+0x68/0x4ac [oprofile]
Without the patch on my x86 (Core 2 Duo) machine:
mutex_lock +0x8/0x20
sync_buffer +0x29/0x3e0
wq_sync_buffer +0x0/0x70
Since I'm guessing hotplugging cpus and using oprofile is not a common
occurrence, this patch is just a do-no-harm fix, instead
of a full solution with a hotplug callback, etc.
Thanks,
--chris
View attachment "0001-oprofile-hotplug-cpu-fix.patch" of type "text/x-patch" (1711 bytes)
Powered by blists - more mailing lists