diff options
author | jhb <jhb@FreeBSD.org> | 2011-01-06 22:26:00 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2011-01-06 22:26:00 +0000 |
commit | 59c5693c6f3965052f235480bc07a20e6533d88e (patch) | |
tree | 1fab72aaac9980eb651239359d71f9a9e0c71c84 /sys/kern/init_main.c | |
parent | 69d18cbe4f034ea7a15bb41a81bb2c3540f77d00 (diff) | |
download | FreeBSD-src-59c5693c6f3965052f235480bc07a20e6533d88e.zip FreeBSD-src-59c5693c6f3965052f235480bc07a20e6533d88e.tar.gz |
- Properly initialize the base priority (td_base_pri) of thread0 to PVM
to match the desired priority in td_priority. Otherwise the first time
thread0 used a borrowed priority it would drop down to PUSER instead of
PVM.
- Explicitly initialize the starting priority of new kprocs to PVM to
avoid inheriting some random priority from thread0.
MFC after: 2 weeks
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 80a0907..f472c82 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -462,7 +462,7 @@ proc0_init(void *dummy __unused) td->td_base_user_pri = PUSER; td->td_lend_user_pri = PRI_MAX; td->td_priority = PVM; - td->td_base_pri = PUSER; + td->td_base_pri = PVM; td->td_oncpu = 0; td->td_flags = TDF_INMEM|TDP_KTHREAD; td->td_cpuset = cpuset_thread0(); |