lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160520093423.GE3193@twins.programming.kicks-ass.net>
Date:	Fri, 20 May 2016 11:34:23 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Giovanni Gherdovich <ggherdovich@...e.com>
Cc:	Davidlohr Bueso <dave@...olabs.net>, manfred@...orfullife.com,
	Waiman.Long@....com, mingo@...nel.org,
	torvalds@...ux-foundation.org, mgorman@...hsingularity.net,
	linux-kernel@...r.kernel.org
Subject: Re: sem_lock() vs qspinlocks

On Fri, May 20, 2016 at 11:07:49AM +0200, Giovanni Gherdovich wrote:
> ----------- run_cascade.sh -------------------------------------
> #!/bin/bash
> 
> TESTCASE=$1
> CASCADE_PATH="libmicro-1-installed/bin-x86_64"
> 
> case $TESTCASE in
>     c_flock_200)
>         BINNAME="cascade_flock"
>         COMMAND="$CASCADE_PATH/cascade_flock -E -D 60000 -L -S -W \
>                                              -N c_flock_200 \
>                                              -P 200 -I 5000000"
>         # c_flock_200 is supposed to last 60 seconds.
>         SLEEPTIME=70
>         ;;
>     c_cond_10)
>         BINNAME="cascade_cond"
>         COMMAND="$CASCADE_PATH/cascade_cond -E -C 2000 -L -S -W \
>                                             -N c_cond_10 \
>                                             -T 10 -I 3000"
>         # c_cond_10 terminates in less than 1 second.
>         SLEEPTIME=5
>         ;;
>     *)
>         echo "Unknown test case" >&2
>         exit 1
>         ;;
> esac
> 
> ERRORS=0
> uname -a
> for i in {1..10} ; do
>     {
>         eval $COMMAND &
>     } >/dev/null 2>&1
>     sleep $SLEEPTIME
>     if pidof $BINNAME >/dev/null ; then
>         echo Run \#$i: $TESTCASE hangs
>         for PID in $(pidof $BINNAME) ; do
>             head -1 /proc/$PID/stack
>         done | sort | uniq -c
>         ERRORS=$((ERRORS+1))
>         killall $BINNAME
>     else
>         echo Run \#$i: $TESTCASE exits successfully
>     fi
> done
> echo $TESTCASE hanged $ERRORS times.
> ----------------------------------------------------------------

Thanks, that's a much nicer script than mine ;-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ