[LITMUS^RT] fix synchronous release support
Björn Brandenburg
bbb at mpi-sws.org
Sat Jun 8 22:09:29 CEST 2013
Hi everyone,
the liblitmus test suite was failing the preemption test under PSN-EDF on recent kernels. I've finally tracked this down to a bug introduced in a recent commit, which caused the synchronous release code to break. Since this is a fairly significant bug, I've already pushed the patch to staging. Please have a look.
https://github.com/LITMUS-RT/litmus-rt/commit/39d902832855cbd2baf45ac8943879be3ad8ca5a
Thanks,
Björn
commit 39d902832855cbd2baf45ac8943879be3ad8ca5a
Author: Bjoern Brandenburg <bbb at mpi-sws.org>
Date: Sat Jun 8 21:56:13 2013 +0200
Fix synchronous task system release support
...and also finally fix the requeue() race (hopefully).
Commit 4ffefb822b9d65d4efbedb60e3c9a0e76895cc5b broke the synchronous
task system release code. The problem is that release_at() clears the
tsk_rt(t)->completed flag. The patch thus only made the race window
smaller, but didn't close it entirely. Further, it broke the
synchronous task set release, which relies on schedule() being called
with completed == 1.
This patch fixes both problems by introducing a new flag dont_requeue,
which indicates unambiguously that a task should not be requeued by
other processors. This flag is cleared only when the job completion is
being processed, which always happens while holding the appropriate
scheduler locks, which closes the race window.
include/litmus/budget.h | 3 ++-
include/litmus/rt_param.h | 4 ++++
litmus/jobs.c | 1 +
litmus/sync.c | 16 ++++++++++------
4 files changed, 17 insertions(+), 7 deletions(-)
More information about the litmus-dev
mailing list