From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
stable <stable@vger.kernel.org>
Subject: Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled
Date: Thu, 17 Nov 2016 08:02:11 -0800 [thread overview]
Message-ID: <20161117160211.GB3612@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161117101725.3abcb413@gandalf.local.home>
On Thu, Nov 17, 2016 at 10:17:25AM -0500, Steven Rostedt wrote:
> On Thu, 17 Nov 2016 15:02:18 +0000 (UTC)
> Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:
>
>
> > That's an interesting approach. I would be tempted to give it a
> > per-thread (rather than per-process) scope.
>
> Sure, per thread, but have it inherit to child processes.
>
> >
> > E.g., a thread could do the following to ask to be
> > interrupted by IPIs:
> >
> > membarrier(MEMBARRIER_CMD_REGISTER_EXPEDITED, 0)
> >
> > and could unregister with:
> >
> > membarrier(MEMBARRIER_CMD_UNREGISTER_EXPEDITED, 0)
>
> Sure why not ;-)
Makes a lot of sense to me!
> > We can then keep a per-thread refcount internally.
> > (not sure the "EXPEDITED" is the right word there...
> > do we want it to be "NOHZ_FULL" instead ?)
>
> No, it shouldn't mention NOHZ_FULL. Perhaps have all tasks do this
> regardless, even though it will only affect nohz full ones. But in the
> future it may be other tasks as well.
>
> >
> > Then in membarrier(MEMBARRIER_CMD_SHARED, 0), for each
> > nohz_full cpu, we grab the rq lock, and only send an IPI
> > if the running thread is registered as "expedited".
>
> Yeah, something like that. That way it wont interrupt tasks that are
> running in no-hz-full and don't care about this syscall.
And this as well!
Thanx, Paul
next prev parent reply other threads:[~2016-11-17 18:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 16:29 [PATCH] Fix: disable sys_membarrier when nohz_full is enabled Mathieu Desnoyers
2016-11-03 17:49 ` Paul E. McKenney
2016-11-07 17:08 ` Mathieu Desnoyers
2016-11-07 18:06 ` Paul E. McKenney
2016-11-07 18:10 ` Mathieu Desnoyers
2016-11-07 20:03 ` Paul E. McKenney
2016-11-08 11:15 ` Mathieu Desnoyers
2016-11-12 17:58 ` Paul E. McKenney
2016-11-17 6:51 ` Lai Jiangshan
2016-11-17 11:46 ` Mathieu Desnoyers
2016-11-17 13:40 ` Paul E. McKenney
2016-11-17 13:54 ` Mathieu Desnoyers
2016-11-17 14:09 ` Paul E. McKenney
2016-11-17 14:50 ` Steven Rostedt
2016-11-17 15:02 ` Mathieu Desnoyers
2016-11-17 15:17 ` Steven Rostedt
2016-11-17 16:02 ` Paul E. McKenney [this message]
2016-11-17 13:38 ` Paul E. McKenney
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=20161117160211.GB3612@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rostedt@goodmis.org \
--cc=stable@vger.kernel.org \
/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.