All of lore.kernel.org
 help / color / mirror / Atom feed
From: youquan_song@linux.intel.com
To: linux-kernel@vger.kernel.org
Cc: youquan.song@intel.com
Subject: From 2.6.24 to 2.6.25-rc2, CPU can not do hotplug when one task set affinity to it
Date: Thu, 21 Feb 2008 01:43:39 -0800 (PST)	[thread overview]
Message-ID: <2422.172.16.116.56.1203587019.squirrel@linux.intel.com> (raw)

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'.


                 reply	other threads:[~2008-02-21  9:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=2422.172.16.116.56.1203587019.squirrel@linux.intel.com \
    --to=youquan_song@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=youquan.song@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.