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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190325164253.GE4102@linux.ibm.com>
Date:   Mon, 25 Mar 2019 09:42:53 -0700
From:   "Paul E. McKenney" <paulmck@...ux.ibm.com>
To:     Joel Fernandes <joel@...lfernandes.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Josh Triplett <josh@...htriplett.org>,
        Lai Jiangshan <jiangshanlai@...il.com>,
        linux-kselftest <linux-kselftest@...r.kernel.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Shuah Khan <shuah@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH] rcutorture: Select from only online CPUs

On Mon, Mar 25, 2019 at 12:33:37PM -0400, Joel Fernandes wrote:
> On Mon, Mar 25, 2019 at 11:02 AM Paul E. McKenney <paulmck@...ux.ibm.com> wrote:
> >
> > On Fri, Mar 22, 2019 at 11:46:19PM -0400, Joel Fernandes (Google) wrote:
> > > The rcutorture jitter.sh script selects a random CPU but does not check
> > > if it is offline or online. This leads to taskset errors many times. On
> > > my machine, hyper threading is disabled so half the cores are offline
> > > causing taskset errors a lot of times. Let us fix this by checking from
> > > only the online CPUs on the system.
> > >
> > > Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>
> >
> > Good catch!
> >
> > Please see below for one suggestion for simplification.
> >
> >                                                         Thanx, Paul
> >
> > > ---
> > >  tools/testing/selftests/rcutorture/bin/jitter.sh | 11 ++++++++++-
> > >  1 file changed, 10 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/tools/testing/selftests/rcutorture/bin/jitter.sh b/tools/testing/selftests/rcutorture/bin/jitter.sh
> > > index 3633828375e3..53bf9d99b5cd 100755
> > > --- a/tools/testing/selftests/rcutorture/bin/jitter.sh
> > > +++ b/tools/testing/selftests/rcutorture/bin/jitter.sh
> > > @@ -47,10 +47,19 @@ do
> > >               exit 0;
> > >       fi
> > >
> > > -     # Set affinity to randomly selected CPU
> > > +     # Set affinity to randomly selected online CPU
> > >       cpus=`ls /sys/devices/system/cpu/*/online |
> >
> >         cpus=`grep 1 /sys/devices/system/cpu/*/online |
> 
> Yes, this is better. Lets do it this way :)
> 
> > >               sed -e 's,/[^/]*$,,' -e 's/^[^0-9]*//' |
> > >               grep -v '^0*$'`
> >
> > Of course, now I have no idea why I excluded CPU 0...  :-/
> 
> Yes, I was wondering as well about that :-)

Please feel free to try including CPU 0 and running the set of single-CPU
rcutorture scenarios.  ;-)

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ