summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_ule.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-12-31 18:52:58 +0000
committerkib <kib@FreeBSD.org>2009-12-31 18:52:58 +0000
commitfe41ad464e0a52df7e9713310a8ae2bd8a2d4699 (patch)
treefd222c9d9cdc33acaa5f3a227826689d627c984a /sys/kern/sched_ule.c
parent71291348da8fb112f156fd6f7e0b0e3d44f1f485 (diff)
downloadFreeBSD-src-fe41ad464e0a52df7e9713310a8ae2bd8a2d4699.zip
FreeBSD-src-fe41ad464e0a52df7e9713310a8ae2bd8a2d4699.tar.gz
Allow swap out of the kernel stack for the thread with priority greater
or equial then PSOCK, not less or equial. Higher priority has lesser numerical value. Existing test does not allow for swapout of the thread waiting for advisory lock, for exiting child or sleeping for timeout. On the other hand, high-priority waiters of VFS/VM events can be swapped out. Tested by: pho Reviewed by: jhb MFC after: 1 week
Diffstat (limited to 'sys/kern/sched_ule.c')
-rw-r--r--sys/kern/sched_ule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 1a977a8..43c9a86 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -1909,7 +1909,7 @@ sched_sleep(struct thread *td, int prio)
THREAD_LOCK_ASSERT(td, MA_OWNED);
td->td_slptick = ticks;
- if (TD_IS_SUSPENDED(td) || prio <= PSOCK)
+ if (TD_IS_SUSPENDED(td) || prio >= PSOCK)
td->td_flags |= TDF_CANSWAP;
if (static_boost == 1 && prio)
sched_prio(td, prio);
OpenPOWER on IntegriCloud