Skip to content

sched/membarrier, selftests: Introduce MEMBARRIER_CMD_GET_REGISTRATIONS

Michal Clapinski linux-kselftest lkml 1 version Applied

Status from this message: The following commit has been merged into the sched/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2sched/membarrier: Introduce MEMBARRIER_CMD_GET_REGISTRATIONSinclude/uapi/linux/membarrier.h kernel/sched/membarrier.c+42 -14 replies
2/2selftests/membarrier: Test MEMBARRIER_CMD_GET_REGISTRATIONStools/testing/selftests/membarrier/membarrier_test_impl.h tools/testing/selftests/membarrier/membarrier_test_multi_thread.c tools/testing/selftests/membarrier/membarrier_test_single_thread.c+39 -20 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMathieu DesnoyersPaul E. McKenney
SeriesA-b A-b
1/2
2/2

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 0/2] sched/membarrier, selftests: Introduce MEMBARRIER_CMD_GET_REGISTRATIONS

This change provides a method to query previously issued registrations. It's needed for CRIU (checkpoint/restore in userspace). Before this change we had to issue private membarrier commands during checkpoint - if they succeeded, they must have been registered. Unfortunately global membarrier succeeds even on unregistered processes, so there was no way to tell if MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED had been issued or not.

CRIU is run after the process has been frozen with ptrace, so we don't have to worry too much about the result of running this command in parallel with registration commands.

Michal Clapinski (2):
sched/membarrier: Introduce MEMBARRIER_CMD_GET_REGISTRATIONS selftests/membarrier: Test MEMBARRIER_CMD_GET_REGISTRATIONS

 include/uapi/linux/membarrier.h               |  4 ++
 kernel/sched/membarrier.c                     | 39 ++++++++++++++++++-
 .../membarrier/membarrier_test_impl.h         | 33 ++++++++++++++++
 .../membarrier/membarrier_test_multi_thread.c |  2 +-
 .../membarrier_test_single_thread.c           |  6 ++-
 5 files changed, 81 insertions(+), 3 deletions(-)
Signature · 1 line
2.39.0.rc0.267.gcb52ba06e7-goog