From owner-p4-projects@FreeBSD.ORG Sat Sep 11 10:59:54 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AF1E716A4D0; Sat, 11 Sep 2004 10:59:53 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A3B216A4CF for ; Sat, 11 Sep 2004 10:59:53 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B9DD43D2F for ; Sat, 11 Sep 2004 10:59:53 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i8BAxrrH091997 for ; Sat, 11 Sep 2004 10:59:53 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i8BAxqmP091994 for perforce@freebsd.org; Sat, 11 Sep 2004 10:59:52 GMT (envelope-from julian@freebsd.org) Date: Sat, 11 Sep 2004 10:59:52 GMT Message-Id: <200409111059.i8BAxqmP091994@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 Subject: PERFORCE change 61349 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2004 10:59:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=61349 Change 61349 by julian@julian_ref on 2004/09/11 10:59:22 IFC@61347 Affected files ... .. //depot/projects/nsched/sys/alpha/conf/GENERIC#9 integrate .. //depot/projects/nsched/sys/amd64/include/pmap.h#11 integrate .. //depot/projects/nsched/sys/dev/bktr/msp34xx.c#2 integrate .. //depot/projects/nsched/sys/dev/vge/if_vge.c#2 integrate .. //depot/projects/nsched/sys/i386/i386/pmap.c#21 integrate .. //depot/projects/nsched/sys/i386/include/pmap.h#7 integrate .. //depot/projects/nsched/sys/kern/sched_4bsd.c#47 integrate .. //depot/projects/nsched/sys/kern/sched_ule.c#30 integrate .. //depot/projects/nsched/sys/netgraph/ng_eiface.c#7 integrate .. //depot/projects/nsched/sys/sys/conf.h#8 integrate .. //depot/projects/nsched/sys/sys/proc.h#29 integrate .. //depot/projects/nsched/sys/sys/rman.h#4 integrate .. //depot/projects/nsched/sys/sys/sched.h#19 integrate Differences ... ==== //depot/projects/nsched/sys/alpha/conf/GENERIC#9 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.178 2004/09/07 22:37:43 scottl Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.179 2004/09/11 07:26:50 alc Exp $ machine alpha cpu EV4 @@ -163,6 +163,7 @@ device miibus # MII bus support device dc # DEC/Intel 21143 and workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) +device nge # NatSemi DP83820 gigabit ethernet device pcn # AMD Am79C97x PCI 10/100 NICs device rl # RealTek 8129/8139 device sf # Adaptec AIC-6915 (``Starfire'') ==== //depot/projects/nsched/sys/amd64/include/pmap.h#11 (text+ko) ==== @@ -39,7 +39,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.122 2004/07/20 02:40:56 alc Exp $ + * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.123 2004/09/11 01:31:26 scottl Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -97,8 +97,9 @@ ((unsigned long)(l2) << PDRSHIFT) | \ ((unsigned long)(l1) << PAGE_SHIFT)) +/* Initial number of kernel page tables */ #ifndef NKPT -#define NKPT 120 /* initial number of kernel page tables */ +#define NKPT 240 /* Enough for 16GB (2MB page tables) */ #endif #define NKPML4E 1 /* number of kernel PML4 slots */ ==== //depot/projects/nsched/sys/dev/bktr/msp34xx.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/bktr/msp34xx.c,v 1.3 2003/12/12 21:18:04 rwatson Exp $ + * $FreeBSD: src/sys/dev/bktr/msp34xx.c,v 1.4 2004/09/11 04:32:55 dwhite Exp $ */ /* @@ -85,6 +85,10 @@ #include #include +#ifdef BKTR_USE_FREEBSD_SMBUS +#include /* required by bktr_reg.h */ +#endif + #include /* required by bktr_reg.h */ #include ==== //depot/projects/nsched/sys/dev/vge/if_vge.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/vge/if_vge.c,v 1.1 2004/09/10 20:57:45 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/vge/if_vge.c,v 1.2 2004/09/11 01:07:39 wpaul Exp $"); /* * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver. @@ -1158,7 +1158,6 @@ if (sc->vge_parent_tag) bus_dma_tag_destroy(sc->vge_parent_tag); - VGE_UNLOCK(sc); mtx_destroy(&sc->vge_mtx); return (0); ==== //depot/projects/nsched/sys/i386/i386/pmap.c#21 (text+ko) ==== @@ -73,7 +73,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.502 2004/09/10 22:28:33 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.503 2004/09/11 10:07:21 scottl Exp $"); /* * Manages physical address maps. @@ -807,7 +807,7 @@ if (pmap_is_current(pmap)) return (vtopte(va)); mtx_assert(&vm_page_queue_mtx, MA_OWNED); - KASSERT(sched_ispinned(), ("curthread not pinned")); + KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); newpf = *pde & PG_FRAME; if ((*PMAP1 & PG_FRAME) != newpf) { *PMAP1 = newpf | PG_RW | PG_V | PG_A | PG_M; @@ -1622,7 +1622,7 @@ pt_entry_t *pte; mtx_assert(&vm_page_queue_mtx, MA_OWNED); - KASSERT(sched_ispinned(), ("curthread not pinned")); + KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); PMAP_LOCK_ASSERT(pmap, MA_OWNED); if ((pte = pmap_pte_quick(pmap, va)) == NULL || *pte == 0) return; ==== //depot/projects/nsched/sys/i386/include/pmap.h#7 (text+ko) ==== @@ -38,7 +38,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/i386/include/pmap.h,v 1.112 2004/06/29 15:57:05 peter Exp $ + * $FreeBSD: src/sys/i386/include/pmap.h,v 1.113 2004/09/11 01:31:26 scottl Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -96,11 +96,12 @@ */ #define VADDR(pdi, pti) ((vm_offset_t)(((pdi)< -__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.62 2004/09/10 22:28:32 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.63 2004/09/11 10:07:22 scottl Exp $"); #define kse td_sched @@ -87,7 +87,6 @@ } ke_state; /* (j) KSE status. */ int ke_cpticks; /* (j) Ticks of cpu time. */ struct runq *ke_runq; /* runq the kse is currently on */ - int ke_pinned; /* (k) nested count, pinned to a cpu */ }; #define ke_proc ke_thread->td_proc @@ -125,7 +124,7 @@ * cpus. */ #define KSE_CAN_MIGRATE(ke) \ - ((ke)->ke_pinned == 0 && ((ke)->ke_flags & KEF_BOUND) == 0) + ((ke)->ke_thread->td_pinned == 0 && ((ke)->ke_flags & KEF_BOUND) == 0) static struct kse kse0; static struct kg_sched kg_sched0; @@ -1172,26 +1171,5 @@ return (0); } - -void -sched_pin(void) -{ - curthread->td_sched->ke_pinned++; -} - - void -sched_unpin(void) -{ - curthread->td_sched->ke_pinned--; -} - -#ifdef INVARIANTS -int -sched_ispinned(void) -{ - return (curthread->td_sched->ke_pinned); -} -#endif - #define KERN_SWITCH_INCLUDE 1 #include "kern/kern_switch.c" ==== //depot/projects/nsched/sys/kern/sched_ule.c#30 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.128 2004/09/11 00:11:09 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.129 2004/09/11 10:07:22 scottl Exp $"); #include @@ -112,7 +112,6 @@ KES_ONRUNQ } ke_state; /* (j) thread sched specific status. */ int ke_slptime; - int ke_pinned; /* (k) nested coult.. pinned to a cpu */ int ke_slice; struct runq *ke_runq; u_char ke_cpu; /* CPU that we have affinity for. */ @@ -344,10 +343,10 @@ */ #ifdef __i386__ #define KSE_CAN_MIGRATE(ke, class) \ - ((ke)->ke_pinned == 0 && ((ke)->ke_flags & KEF_BOUND) == 0) + ((ke)->ke_thread->td_pinned == 0 && ((ke)->ke_flags & KEF_BOUND) == 0) #else /* !__i386__ */ #define KSE_CAN_MIGRATE(ke, class) \ - ((class) != PRI_ITHD && (ke)->ke_pinned == 0 && \ + ((class) != PRI_ITHD && (ke)->ke_thread->td_pinned == 0 && \ ((ke)->ke_flags & KEF_BOUND) == 0) #endif /* !__i386__ */ #endif @@ -1902,26 +1901,5 @@ { return (sizeof(struct thread) + sizeof(struct td_sched)); } - -void -sched_pin(void) -{ - curthread->td_sched->ke_pinned++; -} - - void -sched_unpin(void) -{ - curthread->td_sched->ke_pinned--; -} - -#ifdef INVARIANTS -int -sched_ispinned(void) -{ - return (curthread->td_sched->ke_pinned); -} -#endif - #define KERN_SWITCH_INCLUDE 1 #include "kern/kern_switch.c" ==== //depot/projects/nsched/sys/netgraph/ng_eiface.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/netgraph/ng_eiface.c,v 1.17 2004/07/14 20:26:29 rwatson Exp $ + * $FreeBSD: src/sys/netgraph/ng_eiface.c,v 1.18 2004/09/11 08:59:06 glebius Exp $ */ @@ -594,7 +594,6 @@ struct mbuf *m; NGI_GET_M(item, m); - /* Meta-data ends its life here... */ NG_FREE_ITEM(item); if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) { ==== //depot/projects/nsched/sys/sys/conf.h#8 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)conf.h 8.5 (Berkeley) 1/9/95 - * $FreeBSD: src/sys/sys/conf.h,v 1.191 2004/09/10 20:49:30 phk Exp $ + * $FreeBSD: src/sys/sys/conf.h,v 1.192 2004/09/11 07:09:48 phk Exp $ */ #ifndef _SYS_CONF_H_ @@ -84,6 +84,7 @@ gid_t si_gid; mode_t si_mode; u_long si_usecount; + u_long si_threadcount; union { struct { struct tty *__sit_tty; ==== //depot/projects/nsched/sys/sys/proc.h#29 (text+ko) ==== @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * @(#)proc.h 8.15 (Berkeley) 5/19/95 - * $FreeBSD: src/sys/sys/proc.h,v 1.400 2004/09/10 22:28:33 julian Exp $ + * $FreeBSD: src/sys/sys/proc.h,v 1.401 2004/09/11 10:07:22 scottl Exp $ */ #ifndef _SYS_PROC_H_ @@ -268,6 +268,7 @@ LIST_HEAD(, turnstile) td_contested; /* (q) Contested locks. */ struct lock_list_entry *td_sleeplocks; /* (k) Held sleep locks. */ int td_intr_nesting_level; /* (k) Interrupt recursion. */ + int td_pinned; /* (k) Temporary cpu pin count. */ struct kse_thr_mailbox *td_mailbox; /* (*) Userland mailbox address. */ struct ucred *td_ucred; /* (k) Reference to credentials. */ struct thread *td_standin; /* (*) Use this for an upcall. */ ==== //depot/projects/nsched/sys/sys/rman.h#4 (text+ko) ==== @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/rman.h,v 1.22 2004/07/01 16:20:58 imp Exp $ + * $FreeBSD: src/sys/sys/rman.h,v 1.23 2004/09/11 04:28:46 imp Exp $ */ #ifndef _SYS_RMAN_H_ @@ -107,6 +107,8 @@ bus_space_handle_t r_bushandle; /* bus_space handle */ struct device *r_dev; /* device which has allocated this resource */ struct rman *r_rm; /* resource manager from whence this came */ + void *r_spare1; /* Spare pointer 1 */ + void *r_spare2; /* Spare pointer 2 */ int r_rid; /* optional rid for this resource. */ }; #else ==== //depot/projects/nsched/sys/sys/sched.h#19 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/sched.h,v 1.18 2004/09/10 22:28:33 julian Exp $ + * $FreeBSD: src/sys/sys/sched.h,v 1.20 2004/09/11 10:07:22 scottl Exp $ */ #ifndef _SYS_SCHED_H_ @@ -82,14 +82,9 @@ * hold a thread on a particular CPU. */ void sched_bind(struct thread *td, int cpu); +static __inline void sched_pin(void); void sched_unbind(struct thread *td); - -/* these only work for curthread */ -void sched_pin(void); -void sched_unpin(void); -#ifdef INVARIANTS -int sched_ispinned(void); -#endif +static __inline void sched_unpin(void); /* * These procedures tell the process data structure allocation code how @@ -99,6 +94,18 @@ int sched_sizeof_proc(void); int sched_sizeof_thread(void); +static __inline void +sched_pin(void) +{ + curthread->td_pinned++; +} + +static __inline void +sched_unpin(void) +{ + curthread->td_pinned--; +} + /* temporarily here */ void schedinit(void); void sched_destroyproc(struct proc *p);