LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: Andrea Parri <andrea.parri@amarulasolutions.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Morten Rasmussen <morten.rasmussen@arm.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: Question about sched_setaffinity()
Date: Mon, 13 May 2019 08:53:52 -0700	[thread overview]
Message-ID: <20190513155352.GL3923@linux.ibm.com> (raw)
In-Reply-To: <20190513153714.GA40957@google.com>

On Mon, May 13, 2019 at 11:37:14AM -0400, Joel Fernandes wrote:
> On Mon, May 13, 2019 at 05:20:43AM -0700, Paul E. McKenney wrote:
> > On Sun, May 12, 2019 at 03:05:39AM +0200, Andrea Parri wrote:
> > > > > > The fix is straightforward.  I just added "rcutorture.shuffle_interval=0"
> > > > > > to the TRIVIAL.boot file, which stops rcutorture from shuffling its
> > > > > > kthreads around.
> > > > > 
> > > > > I added the option to the file and I didn't reproduce the issue.
> > > > 
> > > > Thank you!  May I add your Tested-by?
> > > 
> > > Please feel free to do so.  But it may be worth to squash "the commits"
> > > (and adjust the changelogs accordingly).  And you might want to remove
> > > some of those debug checks/prints?
> > 
> > Revert/remove a number of the commits, but yes.  ;-)
> > 
> > And remove the extra loop, but leave the single WARN_ON() complaining
> > about being on the wrong CPU.
> 
> The other "toy" implementation I noticed is based on reader/writer locking.
> 
> Would you see value in having that as an additional rcu torture type?

Interesting question!

My kneejerk reaction is "no" because the fact that reader-writer locking
primitives pass locktorture imply that they have the needed semantics
to be a toy RCU implementation.  (Things like NMI handlers prevent them
from operating correctly within the Linux kernel, and even things like
interrupt handlers would require disabling interrupts for Linux-kernel
use, but from a toy/textbook perspective, they qualify.)

We do have a large number of toy RCU implementations in perfbook, though,
and I believe reader-writer locking is one of them.

But the current "trivial" version would actually work in the Linux
kernel as it is, give or take more esoteric things like CPU hotplug
and respecting user-level uses of sched_setaffinity().  Which could be
"fixed", but at the expense of making it quite a bit less trivial.
(See early-2000s LKML traffic for some proposals along these lines.)

							Thanx, Paul


  reply	other threads:[~2019-05-13 15:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-27 18:02 Paul E. McKenney
2019-04-30 10:03 ` Peter Zijlstra
2019-04-30 10:51   ` Paul E. McKenney
2019-04-30 11:55     ` Peter Zijlstra
2019-05-01 19:12       ` Paul E. McKenney
2019-05-01 19:16         ` Steven Rostedt
2019-05-01 20:27           ` Paul E. McKenney
2019-05-07 22:16             ` Paul E. McKenney
2019-05-09 17:36               ` Paul E. McKenney
2019-05-09 19:36                 ` Paul E. McKenney
2019-05-10 12:08                   ` Peter Zijlstra
2019-05-10 23:07                     ` Paul E. McKenney
2019-05-11 21:45                       ` Andrea Parri
2019-05-12  0:39                         ` Paul E. McKenney
2019-05-12  1:05                           ` Andrea Parri
2019-05-13 12:20                             ` Paul E. McKenney
2019-05-13 15:37                               ` Joel Fernandes
2019-05-13 15:53                                 ` Paul E. McKenney [this message]
2019-05-13  8:10                       ` Peter Zijlstra
2019-05-13 12:19                         ` Paul E. McKenney
2019-05-09 21:40                 ` Andrea Parri
2019-05-09 21:56                   ` Andrea Parri
2019-05-09 22:17                     ` Paul E. McKenney
2019-05-10  6:32                       ` Andrea Parri

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=20190513155352.GL3923@linux.ibm.com \
    --to=paulmck@linux.ibm.com \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=bigeasy@linutronix.de \
    --cc=joel@joelfernandes.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    --subject='Re: Question about sched_setaffinity()' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).