linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for 4.16 00/11] membarrier updates for 4.16
@ 2018-01-29 20:20 Mathieu Desnoyers
  2018-01-29 20:20 ` [PATCH for 4.16 v2 01/11] membarrier: selftest: Test private expedited cmd Mathieu Desnoyers
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Mathieu Desnoyers @ 2018-01-29 20:20 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Thomas Gleixner
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA, Andy Lutomirski,
	Paul E . McKenney, Boqun Feng, Andrew Hunter, Maged Michael,
	Avi Kivity, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, Dave Watson, H . Peter Anvin, Andrea Parri,
	Russell King, Greg Hackmann, Will Deacon, David Sehr,
	Linus Torvalds, x86-DgEjT+Ai2ygdnm+yROfE0A,
	Mathieu Desnoyers <mathieu.desnoy>

Hi Ingo, Peter, Thomas,

Here is the updated membarrier patch series following Acked-by from
Peter.

It would be appreciated of those can go through the scheduler tree for
the 4.16 merge window.

Highlights:

"powerpc: membarrier: Skip memory barrier in switch_mm()" takes care of
a TODO that was left in the private expedited implementation when merged
in 4.14: an extra memory barrier was added on context switch on powerpc.
Ensure that the barrier is only performed when scheduling between
different processes, only for threads belonging to processes that have
registered their intent to use the private expedited command.

"membarrier: provide GLOBAL_EXPEDITED command" adds new commands to
membarrier for registration and use of membarrier across processes
communicating through shared memory mappings. The non-expedited command
has proven to be really too slow (taking 10ms and more to complete) for
real-world use. The expedited version completes in a matter of
microseconds. This patch renames the pre-existing MEMBARRIER_CMD_SHARED
to MEMBARRIER_CMD_GLOBAL for consistency, keeping the old enum label
as an alias for backward compatibility.

"membarrier: Provide core serializing command" provides core
serialization for JIT reclaim. We received positive feedback from
Android developers that the proposed ABI fits their use-case.
Only x86 32/64 and arm 64 implement this command so far. This is
opt-in per architecture.

The other patches add selftests and documentation.

Thanks,

Mathieu


Mathieu Desnoyers (11):
  membarrier: selftest: Test private expedited cmd (v2)
  powerpc: membarrier: Skip memory barrier in switch_mm() (v7)
  membarrier: Document scheduler barrier requirements (v5)
  membarrier: provide GLOBAL_EXPEDITED command (v3)
  membarrier: selftest: Test global expedited cmd (v2)
  Introduce sync_core_before_usermode (v2)
  x86: Implement sync_core_before_usermode (v3)
  membarrier: Provide core serializing command (v3)
  membarrier: x86: Provide core serializing command (v4)
  membarrier: arm64: Provide core serializing command
  membarrier: selftest: Test private expedited sync core cmd

 MAINTAINERS                                        |   1 +
 arch/arm64/Kconfig                                 |   1 +
 arch/arm64/kernel/entry.S                          |   4 +
 arch/powerpc/Kconfig                               |   1 +
 arch/powerpc/include/asm/membarrier.h              |  27 +++
 arch/powerpc/mm/mmu_context.c                      |   7 +
 arch/x86/Kconfig                                   |   2 +
 arch/x86/entry/entry_32.S                          |   5 +
 arch/x86/entry/entry_64.S                          |   4 +
 arch/x86/include/asm/sync_core.h                   |  28 +++
 arch/x86/mm/tlb.c                                  |   6 +
 include/linux/sched/mm.h                           |  40 +++-
 include/linux/sync_core.h                          |  21 ++
 include/uapi/linux/membarrier.h                    |  74 ++++++-
 init/Kconfig                                       |   9 +
 kernel/sched/core.c                                |  57 +++--
 kernel/sched/membarrier.c                          | 177 +++++++++++++--
 .../testing/selftests/membarrier/membarrier_test.c | 237 +++++++++++++++++++--
 18 files changed, 633 insertions(+), 68 deletions(-)
 create mode 100644 arch/powerpc/include/asm/membarrier.h
 create mode 100644 arch/x86/include/asm/sync_core.h
 create mode 100644 include/linux/sync_core.h

-- 
2.11.0

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

end of thread, other threads:[~2021-06-22  0:30 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-29 20:20 [PATCH for 4.16 00/11] membarrier updates for 4.16 Mathieu Desnoyers
2018-01-29 20:20 ` [PATCH for 4.16 v2 01/11] membarrier: selftest: Test private expedited cmd Mathieu Desnoyers
2018-01-29 20:20 ` [PATCH for 4.16 v7 02/11] powerpc: membarrier: Skip memory barrier in switch_mm() Mathieu Desnoyers
2018-02-05 20:22   ` Ingo Molnar
     [not found]     ` <20180205202242.6ilyjh35byycf3ez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-05 20:32       ` Mathieu Desnoyers
2021-06-18 17:13   ` Christophe Leroy
2021-06-18 17:26     ` Mathieu Desnoyers
2021-06-19  9:35       ` Christophe Leroy
2021-06-19 15:02         ` Segher Boessenkool
2021-06-21 14:11           ` Christophe Leroy
2021-06-22  0:15             ` Segher Boessenkool
2018-01-29 20:20 ` [PATCH for 4.16 v5 03/11] membarrier: Document scheduler barrier requirements Mathieu Desnoyers
2018-01-29 20:20 ` [PATCH for 4.16 v2 05/11] membarrier: selftest: Test global expedited cmd Mathieu Desnoyers
2018-01-29 20:20 ` [PATCH for 4.16 v2 06/11] Introduce sync_core_before_usermode Mathieu Desnoyers
2018-01-29 20:20 ` [PATCH for 4.16 v3 07/11] x86: Implement sync_core_before_usermode Mathieu Desnoyers
2018-01-29 20:20 ` [PATCH for 4.16 v4 09/11] membarrier: x86: Provide core serializing command Mathieu Desnoyers
2018-01-29 20:20 ` [PATCH for 4.16 10/11] membarrier: arm64: " Mathieu Desnoyers
     [not found] ` <20180129202020.8515-1-mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2018-01-29 20:20   ` [PATCH for 4.16 v3 04/11] membarrier: provide GLOBAL_EXPEDITED command Mathieu Desnoyers
2018-01-29 20:20   ` [PATCH for 4.16 v3 08/11] membarrier: Provide core serializing command Mathieu Desnoyers
2018-01-29 20:20   ` [PATCH for 4.16 11/11] membarrier: selftest: Test private expedited sync core cmd Mathieu Desnoyers
2018-02-05 21:21   ` [PATCH for 4.16 00/11] membarrier updates for 4.16 Ingo Molnar

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