Set the scheduling class of the zeroidle thread to PRI_IDLE.

Reviewed by:	jhb
Approved by:	grehan (mentor)
MFC after:	1 week
This commit is contained in:
Suleiman Souhlal 2005-02-04 06:18:31 +00:00
parent 339a7e7fbb
commit 81ae703462
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141247

View File

@ -171,6 +171,7 @@ static void
pagezero_start(void __unused *arg)
{
int error;
struct thread *td;
error = kthread_create(vm_pagezero, NULL, &pagezero_proc, RFSTOPPED, 0,
"pagezero");
@ -183,8 +184,10 @@ pagezero_start(void __unused *arg)
pagezero_proc->p_flag |= P_NOLOAD;
PROC_UNLOCK(pagezero_proc);
mtx_lock_spin(&sched_lock);
sched_prio(FIRST_THREAD_IN_PROC(pagezero_proc), PRI_MAX_IDLE);
setrunqueue(FIRST_THREAD_IN_PROC(pagezero_proc), SRQ_BORING);
td = FIRST_THREAD_IN_PROC(pagezero_proc);
sched_class(td->td_ksegrp, PRI_IDLE);
sched_prio(td, PRI_MAX_IDLE);
setrunqueue(td, SRQ_BORING);
mtx_unlock_spin(&sched_lock);
}
SYSINIT(pagezero, SI_SUB_KTHREAD_VM, SI_ORDER_ANY, pagezero_start, NULL)