Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1524597

Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled
Date 2016-11-17 18:50 +0100
Message-ID <sEyYV-3Mb-1@gated-at.bofh.it> (permalink)
References (2 earlier) <sEtmy-7P-23@gated-at.bofh.it> <sEw15-1T0-69@gated-at.bofh.it> <sEw15-1T0-67@gated-at.bofh.it> <sEyvT-3yz-1@gated-at.bofh.it> <sEyFz-3CT-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 ;-)

> 
> 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.

-- Steve

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled Lai Jiangshan <jiangshanlai@gmail.com> - 2016-11-17 08:00 +0100
  Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-11-17 12:50 +0100
    Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-11-17 15:40 +0100
      Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled Steven Rostedt <rostedt@goodmis.org> - 2016-11-17 18:20 +0100
        Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-11-17 18:30 +0100
          Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled Steven Rostedt <rostedt@goodmis.org> - 2016-11-17 18:50 +0100
            Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-11-17 19:20 +0100
      Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-11-17 19:50 +0100
    Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-11-17 20:30 +0100
  Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-11-17 18:30 +0100

csiph-web