linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] sched/membarrier, selftests: Introduce MEMBARRIER_CMD_GET_REGISTRATIONS
@ 2022-12-07 16:43 Michal Clapinski
  2022-12-07 16:43 ` [PATCH 1/2] sched/membarrier: " Michal Clapinski
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Michal Clapinski @ 2022-12-07 16:43 UTC (permalink / raw)
  To: Mathieu Desnoyers, Paul E. McKenney
  Cc: Ingo Molnar, Peter Zijlstra, Andrei Vagin, Shuah Khan,
	linux-kernel, linux-kselftest, Michal Clapinski

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

-- 
2.39.0.rc0.267.gcb52ba06e7-goog


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

end of thread, other threads:[~2023-01-07 10:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-07 16:43 [PATCH 0/2] sched/membarrier, selftests: Introduce MEMBARRIER_CMD_GET_REGISTRATIONS Michal Clapinski
2022-12-07 16:43 ` [PATCH 1/2] sched/membarrier: " Michal Clapinski
2022-12-07 17:07   ` Mathieu Desnoyers
2022-12-07 18:04     ` Michał Cłapiński
2022-12-20 17:51       ` Michał Cłapiński
2022-12-22 15:23         ` Mathieu Desnoyers
2023-01-07 10:52   ` [tip: sched/core] " tip-bot2 for Michal Clapinski
2022-12-07 16:43 ` [PATCH 2/2] selftests/membarrier: Test MEMBARRIER_CMD_GET_REGISTRATIONS Michal Clapinski
2023-01-07 10:52   ` [tip: sched/core] " tip-bot2 for Michal Clapinski
2022-12-22 15:28 ` [PATCH 0/2] sched/membarrier, selftests: Introduce MEMBARRIER_CMD_GET_REGISTRATIONS Mathieu Desnoyers
2022-12-23  1:05   ` Paul E. McKenney

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