aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-07-21 17:12:07 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-07-21 17:12:07 -0400
commitcd7dbaa46c74c85ff16046541da71e933bf571f8 (patch)
tree87aa02eddd08702bd5fbd8ab541f70437a6b704c
parent56689a3fedbfd87ecd0e56a136472f4652f46610 (diff)
Make sure priority-boosting is in effect
... before virtual spinning starts. This avoids a virtually spinning job from being preempted by a newly released job just before a global request is issued.
-rw-r--r--litmus/sched_pfp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/litmus/sched_pfp.c b/litmus/sched_pfp.c
index 227efe20d3da..2b755ecab76e 100644
--- a/litmus/sched_pfp.c
+++ b/litmus/sched_pfp.c
@@ -650,6 +650,11 @@ int pfp_mpcp_lock(struct litmus_lock* l)
650 650
651 preempt_disable(); 651 preempt_disable();
652 652
653 /* Priority-boost ourself *before* we suspend so that
654 * our priority is boosted when we resume. Use the priority
655 * ceiling for the local partition. */
656 boost_priority(t, sem->prio_ceiling[get_partition(t)]);
657
653 if (sem->vspin) 658 if (sem->vspin)
654 mpcp_vspin_enter(); 659 mpcp_vspin_enter();
655 660
@@ -657,11 +662,6 @@ int pfp_mpcp_lock(struct litmus_lock* l)
657 662
658 preempt_enable_no_resched(); 663 preempt_enable_no_resched();
659 664
660 /* Priority-boost ourself *before* we suspend so that
661 * our priority is boosted when we resume. Use the priority
662 * ceiling for the local partition. */
663 boost_priority(t, sem->prio_ceiling[get_partition(t)]);
664
665 if (sem->owner) { 665 if (sem->owner) {
666 /* resource is not free => must suspend and wait */ 666 /* resource is not free => must suspend and wait */
667 667