From 81ae7034623581ca8f231765f61fecd90f00344e Mon Sep 17 00:00:00 2001 From: Suleiman Souhlal Date: Fri, 4 Feb 2005 06:18:31 +0000 Subject: [PATCH] Set the scheduling class of the zeroidle thread to PRI_IDLE. Reviewed by: jhb Approved by: grehan (mentor) MFC after: 1 week --- sys/vm/vm_zeroidle.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_zeroidle.c b/sys/vm/vm_zeroidle.c index 94d689d60912..28728433ccf5 100644 --- a/sys/vm/vm_zeroidle.c +++ b/sys/vm/vm_zeroidle.c @@ -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)