diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2011-03-31 10:47:01 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2011-03-31 10:47:01 -0400 |
commit | 0f6a8e02773f8c23b5b6a3dbfa044e50c9d7d811 (patch) | |
tree | ae9ee07707eaeefc6f7c3cc09d74e40e8c3a1eef /litmus/sched_psn_edf.c | |
parent | c05eaa8091d2cadc20363d44a85ee454262f4bc2 (diff) |
Improve FMLP queue management.wip-fmlp-dequeue
The next owner of a FMLP-protected resource is dequeued from
the FMLP FIFO queue by unlock() (when the resource is freed by
the previous owner) instead of performing the dequeue by the next
owner immediately after it has been woken up.
This simplifies the code a little bit and also reduces potential
spinlock contention.
Diffstat (limited to 'litmus/sched_psn_edf.c')
-rw-r--r-- | litmus/sched_psn_edf.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/litmus/sched_psn_edf.c b/litmus/sched_psn_edf.c index abb06fa53e3a..71c02409efa2 100644 --- a/litmus/sched_psn_edf.c +++ b/litmus/sched_psn_edf.c | |||
@@ -442,10 +442,6 @@ int psnedf_fmlp_lock(struct litmus_lock* l) | |||
442 | * ->owner. We can thus check it without acquiring the spin | 442 | * ->owner. We can thus check it without acquiring the spin |
443 | * lock. */ | 443 | * lock. */ |
444 | BUG_ON(sem->owner != t); | 444 | BUG_ON(sem->owner != t); |
445 | |||
446 | /* FIXME: could we punt the dequeuing to the previous job, | ||
447 | * which is holding the spinlock anyway? */ | ||
448 | remove_wait_queue(&sem->wait, &wait); | ||
449 | } else { | 445 | } else { |
450 | /* it's ours now */ | 446 | /* it's ours now */ |
451 | sem->owner = t; | 447 | sem->owner = t; |
@@ -478,7 +474,7 @@ int psnedf_fmlp_unlock(struct litmus_lock* l) | |||
478 | unboost_priority(t); | 474 | unboost_priority(t); |
479 | 475 | ||
480 | /* check if there are jobs waiting for this resource */ | 476 | /* check if there are jobs waiting for this resource */ |
481 | next = waitqueue_first(&sem->wait); | 477 | next = __waitqueue_remove_first(&sem->wait); |
482 | if (next) { | 478 | if (next) { |
483 | /* boost next job */ | 479 | /* boost next job */ |
484 | boost_priority(next); | 480 | boost_priority(next); |