diff options
author | davidxu <davidxu@FreeBSD.org> | 2005-08-03 01:23:45 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2005-08-03 01:23:45 +0000 |
commit | 69017b27e9c7eff3ef680bc13b84263d1bc75e92 (patch) | |
tree | 8e35a172cd118787060f8ebb8bac0c9231ccb305 /sys | |
parent | c0c21f6ca7154b0b731af2fc4e975405e5dd130c (diff) | |
download | FreeBSD-src-69017b27e9c7eff3ef680bc13b84263d1bc75e92.zip FreeBSD-src-69017b27e9c7eff3ef680bc13b84263d1bc75e92.tar.gz |
In adjustrunqueue(), add code to handle thread migrating case for
ULE scheduler. In original code, local run queue of threaded ksegrp
is corrupted if adjustrunqueue() is called while thread is migrating.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_switch.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index 498d98c..b5c8130 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -312,7 +312,12 @@ adjustrunqueue( struct thread *td, int newpri) /* It is a threaded process */ kg = td->td_ksegrp; - if (ke->ke_state == KES_ONRUNQ) { + if (ke->ke_state == KES_ONRUNQ +#ifdef SCHED_ULE + || ((ke->ke_flags & KEF_ASSIGNED) != 0 && + (ke->ke_flags & KEF_REMOVED) == 0) +#endif + ) { if (kg->kg_last_assigned == td) { kg->kg_last_assigned = TAILQ_PREV(td, threadqueue, td_runq); |