[Hotplug_sig] Hotplug Testing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Getting CPU is fine. Iam going to submit a patch that will not list an
"online" file for cpu0 (if that is not removable), so basically
selecting the ones that have "online" file would probably make sense.

I don't think the intr part is ok, since /proc/interrupts list even
percpu interrupts, there is nothing to migrate there, the numbers I
picked are the ones that have scsi controller, eth and serial line
irq's, the ones I picked to generate interrupt activity.

Cheers,
ashok raj
- Open Source Technology Center
   

>-----Original Message-----
>From: Mark Wong [mailto:markw@xxxxxxxx]
>Sent: Wednesday, December 08, 2004 3:01 PM
>To: Raj, Ashok
>Cc: Joel Schopp; Tom Hanrahan; Luck, Tony; Keshavamurthy, Anil S;
hotplug_sig@xxxxxxxxxxxxxx; Shah,
>Rajesh
>Subject: Re: [Hotplug_sig] Hotplug Testing
>
>On Wed, Dec 08, 2004 at 10:43:26AM -0800, Ashok Raj wrote:
>> On Wed, Dec 08, 2004 at 11:52:53AM -0600, Joel Schopp wrote:
>>
>> This is the test i use for regression testing on IPF. I havent read
>> all the test senarious, but its important to test if irq will migrate
to this new
>> cpu, and also when the cpu will go away, we can handle without loss
of work
>> transparently.
>>
>> Attached is a simple shell script. The only one that is hard coded is
the irq numbers
>> which can be obtained from /proc/interrupts as well.
>>
>> SInce IPF we dont support boot cpu removal, (due to restriction with
CPEI, btw
>> this will go away when platforms support ACPI 3.0) the script doesnt
really try
>> removing cpu0.
>>
>> The script is a little flaky, i.e we dont check if current state is
offline/online
>> etc, it might be better to build those in if we need some robustness.
>>
>> In addition, i leave some time after an online, before i offline (in
parallel
>> there are ltptest and some make -j running for load) so we let some
work be handled
>> on this cpu as well before offlining.
>>
>>
>> hope this helps.
>>
>> Cheers,
>> ashok
>>
>
>Hi Ashok,
>
>Is doing something horrendous like this ok?
>
>Mark
>
>--- do_cpu.orig 2004-12-08 13:43:37.000000000 -0800
>+++ do_cpu      2004-12-08 14:58:14.000000000 -0800
>@@ -5,6 +5,8 @@
> TM_ONLINE=10 # Time delay after an online of cpu
> TM_OFFLINE=10 # Time delay after offline of cpu
> TM_DLY=30    # Time delay before start of entire new cycle.
>+CPUS=`grep processor /proc/cpuinfo | grep -v " 0$" | awk '{print $3}'
| xargs`
>+IRQS=`grep -e [[:digit:]+]: /proc/interrupts | awk '{print $1}' | sed
-e 's/://' | xargs`
>
> do_clean()
> {
>@@ -25,7 +27,7 @@
> migrate_irq()
> {
>        MASK=$((1<<$1))
>-       for irq in 45 48 49
>+       for irq in $IRQS
>        do
>                echo $MASK > /proc/irq/$irq/smp_affinity
>        done
>@@ -53,13 +55,13 @@
> do
>        CNT=$(($CNT+1))
>        echo "Loop Count $CNT"
>-       for cpu in 1 2 3
>+       for cpu in $CPUS
>        do
>                do_offline $cpu
>                sleep $TM_OFFLINE
>        done
>
>-       for cpu in 1 2 3
>+       for cpu in $CPUS
>        do
>                do_online $cpu
>                sleep $TM_ONLINE




[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux