Skip to content

Updates to sys_membarrier for v4.14 to add registration

Paul E. McKenney linux-arch linuxppc-dev lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3membarrier: Provide register expedited private commandMAINTAINERS arch/powerpc/Kconfig arch/powerpc/include/asm/membarrier.h +12 more+199 -2116 replies
2/3membarrier: selftest: Test private expedited cmdtools/testing/selftests/membarrier/membarrier_test.c+94 -150 replies
3/3membarrier: Document scheduler barrier requirementsarch/x86/mm/tlb.c include/linux/sched/mm.h kernel/sched/core.c+36 -110 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchShuah KhanGreg Kroah-Hartman
1/3
2/3A-b A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH tip/core/rcu 0/3] Updates to sys_membarrier for v4.14 to add registration

Hello!

This post-merge-window series fixes 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 request. (Ingo, pull request on its way as well.)

1. Provide register expedited private command.

2. Test private expedited cmd.

3. Document scheduler barrier requirements.

All courtesy of Mathieu Desnoyers.

Thanx, Paul

------------------------------------------------------------------------

 MAINTAINERS                                          |    2 
 arch/powerpc/Kconfig                                 |    1 
 arch/powerpc/include/asm/membarrier.h                |   43 +++++++
 arch/powerpc/include/asm/thread_info.h               |    3 
 arch/powerpc/kernel/Makefile                         |    2 
 arch/powerpc/kernel/membarrier.c                     |   45 +++++++
 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                             |   55 +++++++++
 include/uapi/linux/membarrier.h                      |   23 ++--
 init/Kconfig                                         |    3 
 kernel/fork.c                                        |    2 
 kernel/sched/core.c                                  |   47 ++++----
 kernel/sched/membarrier.c                            |   25 +++-
 tools/testing/selftests/membarrier/membarrier_test.c |  109 ++++++++++++++++---
 17 files changed, 329 insertions(+), 47 deletions(-)