linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL urgent-membarrier] membarrier commits for 4.14
@ 2017-10-18 19:59 Paul E. McKenney
  2017-10-19 17:30 ` Mathieu Desnoyers
  0 siblings, 1 reply; 4+ messages in thread
From: Paul E. McKenney @ 2017-10-18 19:59 UTC (permalink / raw)
  To: torvalds
  Cc: mingo, mathieu.desnoyers, peterz, boqun.feng, ahh, maged.michael,
	gromer, avi, benh, paulus, mpe, davejwatson, stern, will.deacon,
	luto, viro, npiggin, linux-arch, linux-kernel

Hello, Linus,

This urgent pull request contains five commits that fix a problem
that arose when designing requested extensions to sys_membarrier()
to allow JITs to efficiently flush old code from instruction caches.
Several potential algorithms are much less painful if the user register
intent to use this functionality early on, for example, before the process
spawns the second thread.  Registering at this time removes the need to
interrupt each and every thread in that process at the first expedited
sys_membarrier() system call.

However, if we let the current function out, then user programs might be
written without registration, which would make it more difficult to add
required registration after the fact.  Hence the late-in-merge-window
pull request.

The last two commits remove unused code from architectures not supporting
sys_membarrier() and fix a problem that arises when tasks are created
with CLONE_VM but !CLONE_THREAD on powerpc.

These have been subject to 0day test robot and -next testing and
are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git membarrier.2017.10.09a

for you to fetch changes up to f7399e01ccd0850786bdedbee2fd351651ce99f8:

  Fix: membarrier: Handle CLONE_VM + !CLONE_THREAD correctly on powerpc (2017-10-09 14:24:49 -0700)

----------------------------------------------------------------
Mathieu Desnoyers (5):
      membarrier: Provide register expedited private command
      membarrier: selftest: Test private expedited cmd
      membarrier: Document scheduler barrier requirements
      membarrier: Remove unused code for architectures without membarrier hooks
      Fix: membarrier: Handle CLONE_VM + !CLONE_THREAD correctly on powerpc

 MAINTAINERS                                        |   2 +
 arch/powerpc/Kconfig                               |   1 +
 arch/powerpc/include/asm/membarrier.h              |  26 +++++
 arch/powerpc/kernel/Makefile                       |   2 +
 arch/powerpc/kernel/membarrier.c                   |  36 +++++++
 arch/powerpc/mm/mmu_context.c                      |   7 ++
 arch/x86/mm/tlb.c                                  |   5 +
 fs/exec.c                                          |   1 +
 include/linux/mm_types.h                           |   3 +
 include/linux/sched/mm.h                           |  37 +++++++
 include/uapi/linux/membarrier.h                    |  23 +++--
 init/Kconfig                                       |   3 +
 kernel/sched/core.c                                |  47 +++++----
 kernel/sched/membarrier.c                          |  35 ++++++-
 .../testing/selftests/membarrier/membarrier_test.c | 109 ++++++++++++++++++---
 15 files changed, 290 insertions(+), 47 deletions(-)
 create mode 100644 arch/powerpc/include/asm/membarrier.h
 create mode 100644 arch/powerpc/kernel/membarrier.c

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL urgent-membarrier] membarrier commits for 4.14
  2017-10-18 19:59 [GIT PULL urgent-membarrier] membarrier commits for 4.14 Paul E. McKenney
@ 2017-10-19 17:30 ` Mathieu Desnoyers
  2017-10-19 17:30   ` Mathieu Desnoyers
  2017-10-19 20:24   ` Linus Torvalds
  0 siblings, 2 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2017-10-19 17:30 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Ingo Molnar, Peter Zijlstra, Paul E. McKenney, Boqun Feng,
	Andrew Hunter, maged michael, gromer, Avi Kivity,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Dave Watson, Alan Stern, Will Deacon, Andy Lutomirski,
	Alexander Viro, Nicholas Piggin, linux-arch, linux-kernel

----- On Oct 18, 2017, at 3:59 PM, Paul E. McKenney paulmck@linux.vnet.ibm.com wrote:

> Hello, Linus,

Hi Linus,

Time did fly since I submitted this series near the beginning of
the 4.14 rc cycle. Now that we are closer to the end of the cycle,
a more surgical approach would be more appropriate.

I have prepared the minimal patch that needs to be applied to
modify the user-space visible ABI before the end of the 4.14
cycle.

I will send that patch to you directly, hoping you can apply
it before the end of the 4.14 cycle.

Thanks,

Mathieu

> 
> This urgent pull request contains five commits that fix a problem
> that arose when designing requested extensions to sys_membarrier()
> to allow JITs to efficiently flush old code from instruction caches.
> Several potential algorithms are much less painful if the user register
> intent to use this functionality early on, for example, before the process
> spawns the second thread.  Registering at this time removes the need to
> interrupt each and every thread in that process at the first expedited
> sys_membarrier() system call.
> 
> However, if we let the current function out, then user programs might be
> written without registration, which would make it more difficult to add
> required registration after the fact.  Hence the late-in-merge-window
> pull request.
> 
> The last two commits remove unused code from architectures not supporting
> sys_membarrier() and fix a problem that arises when tasks are created
> with CLONE_VM but !CLONE_THREAD on powerpc.
> 
> These have been subject to 0day test robot and -next testing and
> are available in the git repository at:
> 
>  git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
>  membarrier.2017.10.09a
> 
> for you to fetch changes up to f7399e01ccd0850786bdedbee2fd351651ce99f8:
> 
>  Fix: membarrier: Handle CLONE_VM + !CLONE_THREAD correctly on powerpc
>  (2017-10-09 14:24:49 -0700)
> 
> ----------------------------------------------------------------
> Mathieu Desnoyers (5):
>      membarrier: Provide register expedited private command
>      membarrier: selftest: Test private expedited cmd
>      membarrier: Document scheduler barrier requirements
>      membarrier: Remove unused code for architectures without membarrier hooks
>      Fix: membarrier: Handle CLONE_VM + !CLONE_THREAD correctly on powerpc
> 
> MAINTAINERS                                        |   2 +
> arch/powerpc/Kconfig                               |   1 +
> arch/powerpc/include/asm/membarrier.h              |  26 +++++
> arch/powerpc/kernel/Makefile                       |   2 +
> arch/powerpc/kernel/membarrier.c                   |  36 +++++++
> arch/powerpc/mm/mmu_context.c                      |   7 ++
> arch/x86/mm/tlb.c                                  |   5 +
> fs/exec.c                                          |   1 +
> include/linux/mm_types.h                           |   3 +
> include/linux/sched/mm.h                           |  37 +++++++
> include/uapi/linux/membarrier.h                    |  23 +++--
> init/Kconfig                                       |   3 +
> kernel/sched/core.c                                |  47 +++++----
> kernel/sched/membarrier.c                          |  35 ++++++-
> .../testing/selftests/membarrier/membarrier_test.c | 109 ++++++++++++++++++---
> 15 files changed, 290 insertions(+), 47 deletions(-)
> create mode 100644 arch/powerpc/include/asm/membarrier.h
>  create mode 100644 arch/powerpc/kernel/membarrier.c

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL urgent-membarrier] membarrier commits for 4.14
  2017-10-19 17:30 ` Mathieu Desnoyers
@ 2017-10-19 17:30   ` Mathieu Desnoyers
  2017-10-19 20:24   ` Linus Torvalds
  1 sibling, 0 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2017-10-19 17:30 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Ingo Molnar, Peter Zijlstra, Paul E. McKenney, Boqun Feng,
	Andrew Hunter, maged michael, gromer, Avi Kivity,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Dave Watson, Alan Stern, Will Deacon, Andy Lutomirski,
	Alexander Viro, Nicholas Piggin, linux-arch, linux-kernel

----- On Oct 18, 2017, at 3:59 PM, Paul E. McKenney paulmck@linux.vnet.ibm.com wrote:

> Hello, Linus,

Hi Linus,

Time did fly since I submitted this series near the beginning of
the 4.14 rc cycle. Now that we are closer to the end of the cycle,
a more surgical approach would be more appropriate.

I have prepared the minimal patch that needs to be applied to
modify the user-space visible ABI before the end of the 4.14
cycle.

I will send that patch to you directly, hoping you can apply
it before the end of the 4.14 cycle.

Thanks,

Mathieu

> 
> This urgent pull request contains five commits that fix a problem
> that arose when designing requested extensions to sys_membarrier()
> to allow JITs to efficiently flush old code from instruction caches.
> Several potential algorithms are much less painful if the user register
> intent to use this functionality early on, for example, before the process
> spawns the second thread.  Registering at this time removes the need to
> interrupt each and every thread in that process at the first expedited
> sys_membarrier() system call.
> 
> However, if we let the current function out, then user programs might be
> written without registration, which would make it more difficult to add
> required registration after the fact.  Hence the late-in-merge-window
> pull request.
> 
> The last two commits remove unused code from architectures not supporting
> sys_membarrier() and fix a problem that arises when tasks are created
> with CLONE_VM but !CLONE_THREAD on powerpc.
> 
> These have been subject to 0day test robot and -next testing and
> are available in the git repository at:
> 
>  git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
>  membarrier.2017.10.09a
> 
> for you to fetch changes up to f7399e01ccd0850786bdedbee2fd351651ce99f8:
> 
>  Fix: membarrier: Handle CLONE_VM + !CLONE_THREAD correctly on powerpc
>  (2017-10-09 14:24:49 -0700)
> 
> ----------------------------------------------------------------
> Mathieu Desnoyers (5):
>      membarrier: Provide register expedited private command
>      membarrier: selftest: Test private expedited cmd
>      membarrier: Document scheduler barrier requirements
>      membarrier: Remove unused code for architectures without membarrier hooks
>      Fix: membarrier: Handle CLONE_VM + !CLONE_THREAD correctly on powerpc
> 
> MAINTAINERS                                        |   2 +
> arch/powerpc/Kconfig                               |   1 +
> arch/powerpc/include/asm/membarrier.h              |  26 +++++
> arch/powerpc/kernel/Makefile                       |   2 +
> arch/powerpc/kernel/membarrier.c                   |  36 +++++++
> arch/powerpc/mm/mmu_context.c                      |   7 ++
> arch/x86/mm/tlb.c                                  |   5 +
> fs/exec.c                                          |   1 +
> include/linux/mm_types.h                           |   3 +
> include/linux/sched/mm.h                           |  37 +++++++
> include/uapi/linux/membarrier.h                    |  23 +++--
> init/Kconfig                                       |   3 +
> kernel/sched/core.c                                |  47 +++++----
> kernel/sched/membarrier.c                          |  35 ++++++-
> .../testing/selftests/membarrier/membarrier_test.c | 109 ++++++++++++++++++---
> 15 files changed, 290 insertions(+), 47 deletions(-)
> create mode 100644 arch/powerpc/include/asm/membarrier.h
>  create mode 100644 arch/powerpc/kernel/membarrier.c

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL urgent-membarrier] membarrier commits for 4.14
  2017-10-19 17:30 ` Mathieu Desnoyers
  2017-10-19 17:30   ` Mathieu Desnoyers
@ 2017-10-19 20:24   ` Linus Torvalds
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2017-10-19 20:24 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Ingo Molnar, Peter Zijlstra, Paul E. McKenney, Boqun Feng,
	Andrew Hunter, maged michael, gromer, Avi Kivity,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Dave Watson, Alan Stern, Will Deacon, Andy Lutomirski,
	Alexander Viro, Nicholas Piggin, linux-arch, linux-kernel

On Thu, Oct 19, 2017 at 1:30 PM, Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
>
> I have prepared the minimal patch that needs to be applied to
> modify the user-space visible ABI before the end of the 4.14
> cycle.
>
> I will send that patch to you directly, hoping you can apply
> it before the end of the 4.14 cycle.

Thanks, that sounds much better than the big pull request at this stage.

                Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-19 20:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 19:59 [GIT PULL urgent-membarrier] membarrier commits for 4.14 Paul E. McKenney
2017-10-19 17:30 ` Mathieu Desnoyers
2017-10-19 17:30   ` Mathieu Desnoyers
2017-10-19 20:24   ` Linus Torvalds

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