From owner-p4-projects@FreeBSD.ORG Thu May 15 05:59:51 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 042121065674; Thu, 15 May 2008 05:59:51 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1C20106566C for ; Thu, 15 May 2008 05:59:50 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9272F8FC13 for ; Thu, 15 May 2008 05:59:50 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4F5xo1r007774 for ; Thu, 15 May 2008 05:59:50 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4F5xoLV007771 for perforce@freebsd.org; Thu, 15 May 2008 05:59:50 GMT (envelope-from julian@freebsd.org) Date: Thu, 15 May 2008 05:59:50 GMT Message-Id: <200805150559.m4F5xoLV007771@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Cc: Subject: PERFORCE change 141630 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2008 05:59:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=141630 Change 141630 by julian@julian_trafmon1 on 2008/05/15 05:59:19 revert the sched_ule.c diffs for now Affected files ... .. //depot/projects/vimage/src/sys/kern/kern_vimage.c#58 edit .. //depot/projects/vimage/src/sys/kern/sched_ule.c#22 edit Differences ... ==== //depot/projects/vimage/src/sys/kern/kern_vimage.c#58 (text+ko) ==== @@ -909,8 +909,8 @@ panic("going nowhere without my vnet modules!"); } -SYSINIT(vimage, SI_SUB_VIMAGE, SI_ORDER_FIRST, vi_init, NULL) -SYSINIT(vimage_done, SI_SUB_VIMAGE_DONE, SI_ORDER_FIRST, vi_init_done, NULL) +SYSINIT(vimage, SI_SUB_VIMAGE, SI_ORDER_FIRST, vi_init, NULL); +SYSINIT(vimage_done, SI_SUB_VIMAGE_DONE, SI_ORDER_FIRST, vi_init_done, NULL); #ifdef VI_PREALLOC_SIZE void * ==== //depot/projects/vimage/src/sys/kern/sched_ule.c#22 (text+ko) ==== @@ -40,7 +40,6 @@ #include "opt_hwpmc_hooks.h" #include "opt_sched.h" -#include "opt_vimage.h" #include #include @@ -61,7 +60,6 @@ #include #include #include -#include #ifdef KTRACE #include #include @@ -267,13 +265,8 @@ /* Operations on per processor queues */ static struct thread *tdq_choose(struct tdq *); static void tdq_setup(struct tdq *); -#ifndef VIMAGE static void tdq_load_add(struct tdq *, struct thread *); static void tdq_load_rem(struct tdq *, struct thread *); -#else -static void tdq_load_add(struct tdq *, struct thread *, struct vprocg *); -static void tdq_load_rem(struct tdq *, struct thread *, struct vprocg *); -#endif static __inline void tdq_runq_add(struct tdq *, struct thread *, int); static __inline void tdq_runq_rem(struct tdq *, struct thread *); static inline int sched_shouldpreempt(int, int, int); @@ -476,11 +469,7 @@ * for this thread to the referenced thread queue. */ static void -#ifndef VIMAGE tdq_load_add(struct tdq *tdq, struct thread *td) -#else -tdq_load_add(struct tdq *tdq, struct thread *td, struct vprocg *vprocg) -#endif { TDQ_LOCK_ASSERT(tdq, MA_OWNED); @@ -497,11 +486,7 @@ * exiting. */ static void -#ifndef VIMAGE tdq_load_rem(struct tdq *tdq, struct thread *td) -#else -tdq_load_rem(struct tdq *tdq, struct thread *td , struct vprocg *vprocg) -#endif { THREAD_LOCK_ASSERT(td, MA_OWNED); @@ -1291,11 +1276,7 @@ /* Add thread0's load since it's running. */ TDQ_LOCK(tdq); thread0.td_lock = TDQ_LOCKPTR(TDQ_SELF()); -#ifndef VIMAGE tdq_load_add(tdq, &thread0); -#else - tdq_load_add(tdq, &thread0, TD_TO_VPROCG(&thread0)); -#endif tdq->tdq_lowpri = thread0.td_priority; TDQ_UNLOCK(tdq); } @@ -1823,11 +1804,7 @@ /* This thread must be going to sleep. */ TDQ_LOCK(tdq); mtx = thread_block_switch(td); -#ifndef VIMAGE tdq_load_rem(tdq, td); -#else - tdq_load_rem(tdq, td, TD_TO_VPROCG(td)); -#endif } /* * We enter here with the thread blocked and assigned to the @@ -2272,11 +2249,7 @@ if (td->td_priority < tdq->tdq_lowpri) tdq->tdq_lowpri = td->td_priority; tdq_runq_add(tdq, td, flags); -#ifndef VIMAGE tdq_load_add(tdq, td); -#else - tdq_load_add(tdq, td, TD_TO_VPROCG(td)); -#endif } /* @@ -2345,11 +2318,7 @@ KASSERT(TD_ON_RUNQ(td), ("sched_rem: thread not on run queue")); tdq_runq_rem(tdq, td); -#ifndef VIMAGE tdq_load_rem(tdq, td); -#else - tdq_load_rem(tdq, td, TD_TO_VPROCG(td)); -#endif TD_SET_CAN_RUN(td); if (td->td_priority == tdq->tdq_lowpri) tdq_setlowpri(tdq, NULL); @@ -2474,11 +2443,7 @@ * Return the total system load. */ int -#ifdef VIMAGE -sched_load(struct vprocg *vprocg) -#else sched_load(void) -#endif { #ifdef SMP int total; @@ -2486,39 +2451,12 @@ total = 0; for (i = 0; i <= mp_maxid; i++) -#ifndef VIMAGE total += TDQ_CPU(i)->tdq_sysload; + return (total); #else - total += V_tdq_sysload[i]; /* XXX JRE */ -#endif - return (total); -#else /* !SMP */ -#ifndef VIMAGE return (TDQ_SELF()->tdq_sysload); -#else - return (V_tdq_sysload[0]); -#endif -#endif /* SMP */ -} - -#ifdef VIMAGE -void -sched_load_reassign(struct vprocg *old, struct vprocg *new) -{ -#ifdef SMP - int tdg_id; - - critical_enter(); - tdg_id = TDG_ID(tdq_cpu[curcpu].tdq_group); - old->_tdq_sysload[tdg_id]--; - new->_tdq_sysload[tdg_id]++; - critical_exit(); -#else - old->_tdq_sysload[0]--; - new->_tdq_sysload[0]++; #endif } -#endif int sched_sizeof_proc(void) @@ -2601,11 +2539,7 @@ spinlock_exit(); } else { MPASS(td->td_lock == TDQ_LOCKPTR(tdq)); -#ifndef VIMAGE tdq_load_rem(tdq, td); -#else - tdq_load_rem(tdq, td, TD_TO_VPROCG(td)); -#endif lock_profile_release_lock(&TDQ_LOCKPTR(tdq)->lock_object); } KASSERT(curthread->td_md.md_spinlock_count == 1, ("invalid count"));