diff options
author | kib <kib@FreeBSD.org> | 2009-12-31 18:52:58 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-12-31 18:52:58 +0000 |
commit | fe41ad464e0a52df7e9713310a8ae2bd8a2d4699 (patch) | |
tree | fd222c9d9cdc33acaa5f3a227826689d627c984a /sys/kern/sched_4bsd.c | |
parent | 71291348da8fb112f156fd6f7e0b0e3d44f1f485 (diff) | |
download | FreeBSD-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.c | 2 |
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; } |