lkml.org 
[lkml]   [2012]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: WARNING: at kernel/rcutree.c:1558 rcu_do_batch+0x386/0x3a0(), during CPU hotplug
On Fri, Sep 14, 2012 at 02:25:19PM +0200, Peter Zijlstra wrote:
> On Fri, 2012-09-14 at 17:48 +0530, Srivatsa S. Bhat wrote:
> > #! /bin/bash
>
> CPUPATH="/sys/devices/system/cpu"
>
> > NUMBER_OF_CPUS=`ls -d /sys/devices/system/cpu/cpu[0-9]* | wc -l`
>
> apply the above
>
> > cd /sys/devices/system/cpu
>
> skip this, so running the script doesn't change PWD

Yes, that's good practice.

> > while [ 1 ]
>
> while :;

I used to use 'true', but ':' looks cool!

> > do
> > for ((i=1; i < NUMBER_OF_CPUS; i++))
> > do
> > sleep 1;
>
> Also play with shorter sleeps like: sleep .1, I've found that higher
> hotplug rate triggers some races faster.

OK.

> > state=`cat cpu$i/online`
> > if [ $state -eq 0 ]
> > then
> > echo 1 > cpu$i/online
> > else
> > echo 0 > cpu$i/online
>
> echo $((state^1)) > $CPUPATH/cpu$i/online

Good!

Thanks,
Fengguang


\
 
 \ /
  Last update: 2012-09-14 15:21    [from the cache]
©2003-2011 Jasper Spaans