From: joel at joelfernandes.org (Joel Fernandes)
Subject: [PATCH] rcutorture: Select from only online CPUs
Date: Mon, 25 Mar 2019 18:02:37 -0400 [thread overview]
Message-ID: <20190325220237.GA22743@google.com> (raw)
In-Reply-To: <20190325164253.GE4102@linux.ibm.com>
On Mon, Mar 25, 2019 at 09:42:53AM -0700, Paul E. McKenney wrote:
> 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 at linux.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 at joelfernandes.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. ;-)
Sounds good, I will test that out on your latest dev branch. Thanks,
- Joel
WARNING: multiple messages have this Message-ID (diff)
From: joel@joelfernandes.org (Joel Fernandes)
Subject: [PATCH] rcutorture: Select from only online CPUs
Date: Mon, 25 Mar 2019 18:02:37 -0400 [thread overview]
Message-ID: <20190325220237.GA22743@google.com> (raw)
Message-ID: <20190325220237.xiN_BM95js2_YiAFP1SuzjSpk310RAqe1_etK8Fxirw@z> (raw)
In-Reply-To: <20190325164253.GE4102@linux.ibm.com>
On Mon, Mar 25, 2019@09:42:53AM -0700, Paul E. McKenney wrote:
> On Mon, Mar 25, 2019@12:33:37PM -0400, Joel Fernandes wrote:
> > On Mon, Mar 25, 2019@11:02 AM Paul E. McKenney <paulmck@linux.ibm.com> wrote:
> > >
> > > On Fri, Mar 22, 2019@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 at joelfernandes.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. ;-)
Sounds good, I will test that out on your latest dev branch. Thanks,
- Joel
WARNING: multiple messages have this Message-ID (diff)
From: Joel Fernandes <joel@joelfernandes.org>
To: "Paul E. McKenney" <paulmck@linux.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
linux-kselftest <linux-kselftest@vger.kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Shuah Khan <shuah@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] rcutorture: Select from only online CPUs
Date: Mon, 25 Mar 2019 18:02:37 -0400 [thread overview]
Message-ID: <20190325220237.GA22743@google.com> (raw)
In-Reply-To: <20190325164253.GE4102@linux.ibm.com>
On Mon, Mar 25, 2019 at 09:42:53AM -0700, Paul E. McKenney wrote:
> 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@linux.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@joelfernandes.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. ;-)
Sounds good, I will test that out on your latest dev branch. Thanks,
- Joel
next prev parent reply other threads:[~2019-03-25 22:02 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-23 3:46 [PATCH] rcutorture: Select from only online CPUs joel
2019-03-23 3:46 ` Joel Fernandes (Google)
2019-03-23 3:46 ` Joel Fernandes (Google)
2019-03-25 15:01 ` paulmck
2019-03-25 15:01 ` Paul E. McKenney
2019-03-25 15:01 ` Paul E. McKenney
2019-03-25 16:33 ` joel
2019-03-25 16:33 ` Joel Fernandes
2019-03-25 16:33 ` Joel Fernandes
2019-03-25 16:42 ` paulmck
2019-03-25 16:42 ` Paul E. McKenney
2019-03-25 16:42 ` Paul E. McKenney
2019-03-25 22:02 ` joel [this message]
2019-03-25 22:02 ` Joel Fernandes
2019-03-25 22:02 ` Joel Fernandes
2019-03-25 22:40 ` joel
2019-03-25 22:40 ` Joel Fernandes
2019-03-25 22:40 ` Joel Fernandes
2019-03-26 16:01 ` paulmck
2019-03-26 16:01 ` Paul E. McKenney
2019-03-26 16:01 ` Paul E. McKenney
2019-03-26 18:35 ` joel
2019-03-26 18:35 ` Joel Fernandes
2019-03-26 18:35 ` Joel Fernandes
2019-03-26 18:40 ` joel
2019-03-26 18:40 ` Joel Fernandes
2019-03-26 18:40 ` Joel Fernandes
2019-03-26 20:46 ` paulmck
2019-03-26 20:46 ` Paul E. McKenney
2019-03-26 20:46 ` Paul E. McKenney
2019-03-26 23:48 ` joel
2019-03-26 23:48 ` Joel Fernandes
2019-03-26 23:48 ` Joel Fernandes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190325220237.GA22743@google.com \
--to=unknown@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.