Skip to content

rtdm: get spinlocks to lock the scheduler

Gilles Chanteperdrix xenomai 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest1 patch 1 replyIn review
  2. v11 patch 2 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1rtdm: get spinlocks to lock the schedulerinclude/rtdm/rtdm_driver.h ksrc/nucleus/pod.c ksrc/nucleus/sched-rt.c +1 more+27 -171 reply

Reviews trailers per patch

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

Read the v3 thread

Cover letter [Xenomai] [PATCH 0/1 v3] rtdm: get spinlocks to lock the scheduler

Hi,

here is the latest attempt to avoid entering __xnpod_schedule when xnpod_unlock_sched is called without a needed rescheduling.

This one is much simpler. We do not try to prevent entering __xnpod_schedule when xnpod_schedule is called with the scheduler
locked: it may be racy when the current thread wants to suspend with the scheduler locked, and would avoid sending the reschedule IPIs to other cpus if the other cpus scheduler state was changed. Instead, if xnpod_schedule is called with the scheduler locked, but not to suspend the current thread, exit early keeping the resched bit set. This avoids having to set the resched bit in xnpod_unlock_sched and thus entering __xnpod_schedule every time.

As with the previous patch, no attempt is made to lock the scheduler for the implementation of xnlock* services, as they are called at a time during the early init where xnpod_current_thread() is NULL.

Regards.

Signature · 1 line
                                                                Gilles.