summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_4bsd.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_4bsd.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_4bsd.c')
-rw-r--r--sys/kern/sched_4bsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index e13cffc..c0019a9 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -913,7 +913,7 @@ sched_sleep(struct thread *td, int pri)
td->td_sched->ts_slptime = 0;
if (pri)
sched_prio(td, pri);
- if (TD_IS_SUSPENDED(td) || pri <= PSOCK)
+ if (TD_IS_SUSPENDED(td) || pri >= PSOCK)
td->td_flags |= TDF_CANSWAP;
}
OpenPOWER on IntegriCloud