Skip to content

Resolve kernel thread shutdown race, simplify host PID handling

Jan Kiszka xenomai 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3cobalt/thread: Keep host task PID in xnthread struct as wellinclude/cobalt/kernel/thread.h kernel/cobalt/dovetail/sched.c kernel/cobalt/thread.c+9 -110 replies
2/3cobalt/thread: Simplify wait_for_rcu_grace_periodkernel/cobalt/thread.c+6 -220 replies
3/3cobalt: Eliminate xnthread_host_pid wrapperinclude/cobalt/kernel/thread.h kernel/cobalt/debug.c kernel/cobalt/dovetail/kevents.c +13 more+29 -360 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Resolve kernel thread shutdown race, simplify host PID handling

Triggered by Richard's analysis of a race we have between (RTDM) kernel xnthreads terminating and xnthread_join waiting for them, this reworks how we retrieve the PID of an xnthread host part, resolving that race (hopefully) and simplifying/optimizing the code along that.

Patch 1 is a stable backport candidate.

Jan

Jan Kiszka (3):
cobalt/thread: Keep host task PID in xnthread struct as well cobalt/thread: Simplify wait_for_rcu_grace_period
cobalt: Eliminate xnthread_host_pid wrapper

 include/cobalt/kernel/thread.h    |  4 +--
 kernel/cobalt/debug.c             |  2 +-
 kernel/cobalt/dovetail/kevents.c  |  4 +--
 kernel/cobalt/dovetail/sched.c    |  2 ++
 kernel/cobalt/posix/event.c       |  2 +-
 kernel/cobalt/posix/process.c     |  5 ++--
 kernel/cobalt/posix/sem.c         |  2 +-
 kernel/cobalt/posix/thread.c      |  2 +-
 kernel/cobalt/posix/timer.c       |  2 +-
 kernel/cobalt/sched-quota.c       |  2 +-
 kernel/cobalt/sched-rt.c          |  2 +-
 kernel/cobalt/sched-sporadic.c    |  2 +-
 kernel/cobalt/sched-tp.c          |  2 +-
 kernel/cobalt/sched-weak.c        |  2 +-
 kernel/cobalt/sched.c             |  4 +--
 kernel/cobalt/thread.c            | 48 +++++++------------------------
 kernel/cobalt/trace/cobalt-core.h | 18 ++++++------
 17 files changed, 40 insertions(+), 65 deletions(-)
Signature · 1 line
2.51.0