Messages in this thread | | | Subject | Re: CFS Bandwidth Control - Test results of cgroups tasks pinned vs unpinnede | From | Peter Zijlstra <> | Date | Tue, 20 Sep 2011 14:55:20 +0200 |
| |
On Thu, 2011-09-15 at 23:25 +0530, Kamalesh Babulal wrote:
> lb.sh > ------ > #!/bin/bash > > rm -rf test* > rm -rf t*
You're insane, right?
> ITERATIONS=60 # No of Iterations to capture the details > NUM_CPUS=$(cat /proc/cpuinfo |grep -i proces|wc -l) > > NUM_HOGS=$((NUM_CPUS * 2)) # No of hogs threads to invoke > > echo "System has $NUM_CPUS cpus..... Spawing $NUM_HOGS cpu hogs ... for $ITERATIONS seconds.." > if [ ! -e while1.c ] > then > cat >> while1.c << EOF > int > main (int argc, char **argv) > { > while(1); > return (0); > } > EOF > fi > > for i in $(seq 1 $NUM_HOGS) > do > gcc -o while$i while1.c > if [ $? -ne 0 ] > then > echo "Looks like gcc is not present ... aborting" > exit > fi > done > > for i in $(seq 1 $NUM_HOGS) > do > ./while$i &
You can kill the above two blocks by doing:
while :; do :; done &
> pids[$i]=$! > pids_old[$i]=`cat /proc/$!/sched |grep -i nr_migr|grep -iv cold|cut -d ":" -f2|sed 's/ //g'` > done
and a fixup of the pkill muck.
| |