* From 2.6.24 to 2.6.25-rc2, CPU can not do hotplug when one task set affinity to it
@ 2008-02-21 9:43 youquan_song
0 siblings, 0 replies; only message in thread
From: youquan_song @ 2008-02-21 9:43 UTC (permalink / raw)
To: linux-kernel; +Cc: youquan.song
In SMP sever platform, with kernel 2.6.24-rc2 and kernel 2.6.25-rc2,
Set one task affinity to one CPU core, then set offline the CPU core.
After that we can not set online the CPU core again.
1. run the test.sh script: test.sh 1 ( 1 is the logical CPU )
test.sh script:
#!/bin/bash
main(){
typeset -i CPU=$1
./task.sh > /dev/null&
PID=$!
if [ `cat /sys/devices/system/cpu/cpu${CPU}/online` = "0" ]; then
echo "1" > /sys/devices/system/cpu/cpu${CPU}/online
fi
MASK=$((1<<${CPU}))
`taskset -p ${MASK} ${PID} > /dev/null 2>&1`
echo "0" > /sys/devices/system/cpu/cpu${CPU}/online
echo "1" > /sys/devices/system/cpu/cpu${CPU}/online
kill -9 $PID > /dev/null 2>&1
echo "PASS\n"
}
typeset -i TEST_CPU=$1
main $TEST_CPU
2. task.sh script as following
#!/bin/bash
while :
do
NOOP=1
done
Actual Result:
The test.sh will block at set online the CPU ( echo "1" >
/sys/devices/system/cpu/cpu${CPU}/online ).
we check the test.sh has dead by 'ps -aux'.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-21 9:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21 9:43 From 2.6.24 to 2.6.25-rc2, CPU can not do hotplug when one task set affinity to it youquan_song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox