From 3925aa719b8e59badfa78ef447303d4b966c7e21 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 1 Nov 2008 23:31:19 +0000 Subject: [PATCH] The priority mask used to compartmentalize the comparison to determine whether a preemption is needed was covering the entire process priority space instead of just one bucket. Reported-by: "Simon 'corecode' Schubert" --- sys/kern/usched_bsd4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/usched_bsd4.c b/sys/kern/usched_bsd4.c index 706c35c785..c986e17055 100644 --- a/sys/kern/usched_bsd4.c +++ b/sys/kern/usched_bsd4.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/kern/usched_bsd4.c,v 1.25 2008/09/09 04:06:13 dillon Exp $ + * $DragonFly: src/sys/kern/usched_bsd4.c,v 1.26 2008/11/01 23:31:19 dillon Exp $ */ #include @@ -504,7 +504,7 @@ bsd4_setrunqueue(struct lwp *lp) * its target cpu, reschedule on that cpu. */ { - if ((dd->upri & ~PRIMASK) > (lp->lwp_priority & ~PRIMASK)) { + if ((dd->upri & ~PPQMASK) > (lp->lwp_priority & ~PPQMASK)) { dd->upri = lp->lwp_priority; spin_unlock_wr(&bsd4_spin); #ifdef SMP -- 2.11.4.GIT