Date: Mon, 19 Jul 2004 22:18:02 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 57726 for review Message-ID: <200407192218.i6JMI28R067842@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=57726 Change 57726 by rwatson@rwatson_paprika on 2004/07/19 22:17:54 Integrate netperf_socket from FreeBSD CVS: Lots of VM locking. Adaptive mutexes now default. More kernel debugger cleanup. Preemption stability work around, as well as preemption cleanup. The usual array of quicks, device IDs, etc. Linux emulation raw socket cleanups. Quicksort in libkern. pf update and cleanup. More ACPI. Less /dev/random fandango. Sounds driver renaming. USB bug fixes. Cleanups of sched API to take threads not processes, etc. Cleanup of soreceive() control mbufs. Race fixup in unp_connect(). Start of netatalk style cleanup. ng_ppp locking hack removed due to ng_ppp qsort hack being removed. Mac_biba, mac_mls single/effective rename. M_SKIP_FIREWALL. SUSER_RUID. vm_contigmalloc() cleanup/replacement. Affected files ... .. //depot/projects/netperf_socket/sys/alpha/alpha/interrupt.c#6 integrate .. //depot/projects/netperf_socket/sys/alpha/alpha/pmap.c#13 integrate .. //depot/projects/netperf_socket/sys/alpha/conf/GENERIC#5 integrate .. //depot/projects/netperf_socket/sys/alpha/include/pmap.h#8 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/intr_machdep.c#5 integrate .. //depot/projects/netperf_socket/sys/amd64/conf/GENERIC#10 integrate .. //depot/projects/netperf_socket/sys/amd64/include/float.h#5 integrate .. //depot/projects/netperf_socket/sys/arm/arm/db_trace.c#3 integrate .. //depot/projects/netperf_socket/sys/arm/include/float.h#2 integrate .. //depot/projects/netperf_socket/sys/boot/forth/loader.conf#9 integrate .. //depot/projects/netperf_socket/sys/cam/scsi/scsi_da.c#5 integrate .. //depot/projects/netperf_socket/sys/compat/ia32/ia32_sysvec.c#4 integrate .. //depot/projects/netperf_socket/sys/compat/linux/linux_socket.c#4 integrate .. //depot/projects/netperf_socket/sys/conf/NOTES#29 integrate .. //depot/projects/netperf_socket/sys/conf/files#41 integrate .. //depot/projects/netperf_socket/sys/conf/options#21 integrate .. //depot/projects/netperf_socket/sys/contrib/pf/net/pf.c#10 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_acad.c#9 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_cmbat.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_video.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/ata/ata-chipset.c#11 integrate .. //depot/projects/netperf_socket/sys/dev/fdc/fdc.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/fdc/fdc_isa.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/firewire/fwohci_pci.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/firewire/fwohcireg.h#4 integrate .. //depot/projects/netperf_socket/sys/dev/random/randomdev.c#11 integrate .. //depot/projects/netperf_socket/sys/dev/random/randomdev_soft.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/sound/isa/ad1816.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/isa/es1888.c#2 integrate .. //depot/projects/netperf_socket/sys/dev/sound/isa/ess.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/isa/gusc.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/sound/isa/mss.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/isa/sb16.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/sound/isa/sb8.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/isa/sbc.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/als4000.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/au88x0.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/aureal.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/cmi.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/cs4281.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/csa.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/csapcm.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/ds1.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/emu10k1.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/es137x.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/fm801.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/ich.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/maestro.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/maestro3.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/neomagic.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/solo.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/t4dwave.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/via8233.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/via82c686.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/vibes.c#4 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pcm/sound.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pcm/sound.h#8 integrate .. //depot/projects/netperf_socket/sys/dev/sound/usb/uaudio_pcm.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/usb/ehci.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/usb/if_axe.c#8 integrate .. //depot/projects/netperf_socket/sys/dev/usb/uhci.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/usb/usbdevs#19 integrate .. //depot/projects/netperf_socket/sys/dev/usb/usbdi.c#3 integrate .. //depot/projects/netperf_socket/sys/geom/concat/g_concat.c#10 integrate .. //depot/projects/netperf_socket/sys/geom/nop/g_nop.c#3 integrate .. //depot/projects/netperf_socket/sys/geom/nop/g_nop.h#2 integrate .. //depot/projects/netperf_socket/sys/geom/stripe/g_stripe.h#3 integrate .. //depot/projects/netperf_socket/sys/i386/conf/GENERIC#9 integrate .. //depot/projects/netperf_socket/sys/i386/i386/intr_machdep.c#5 integrate .. //depot/projects/netperf_socket/sys/i386/i386/machdep.c#11 integrate .. //depot/projects/netperf_socket/sys/i386/i386/pmap.c#19 integrate .. //depot/projects/netperf_socket/sys/i386/include/float.h#5 integrate .. //depot/projects/netperf_socket/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c#3 integrate .. //depot/projects/netperf_socket/sys/ia64/ia64/pmap.c#13 integrate .. //depot/projects/netperf_socket/sys/ia64/include/float.h#4 integrate .. //depot/projects/netperf_socket/sys/ia64/include/pmap.h#6 integrate .. //depot/projects/netperf_socket/sys/isa/psm.c#7 integrate .. //depot/projects/netperf_socket/sys/kern/bus_if.m#2 integrate .. //depot/projects/netperf_socket/sys/kern/imgact_elf.c#9 integrate .. //depot/projects/netperf_socket/sys/kern/kern_exit.c#16 integrate .. //depot/projects/netperf_socket/sys/kern/kern_fork.c#13 integrate .. //depot/projects/netperf_socket/sys/kern/kern_kse.c#6 integrate .. //depot/projects/netperf_socket/sys/kern/kern_malloc.c#6 integrate .. //depot/projects/netperf_socket/sys/kern/kern_mutex.c#6 integrate .. //depot/projects/netperf_socket/sys/kern/kern_prot.c#7 integrate .. //depot/projects/netperf_socket/sys/kern/kern_shutdown.c#9 integrate .. //depot/projects/netperf_socket/sys/kern/kern_sig.c#15 integrate .. //depot/projects/netperf_socket/sys/kern/kern_switch.c#5 integrate .. //depot/projects/netperf_socket/sys/kern/kern_synch.c#12 integrate .. //depot/projects/netperf_socket/sys/kern/kern_thr.c#10 integrate .. //depot/projects/netperf_socket/sys/kern/kern_thread.c#19 integrate .. //depot/projects/netperf_socket/sys/kern/sched_4bsd.c#9 integrate .. //depot/projects/netperf_socket/sys/kern/sched_ule.c#14 integrate .. //depot/projects/netperf_socket/sys/kern/subr_bus.c#12 integrate .. //depot/projects/netperf_socket/sys/kern/subr_prof.c#7 integrate .. //depot/projects/netperf_socket/sys/kern/subr_trap.c#7 integrate .. //depot/projects/netperf_socket/sys/kern/sys_process.c#9 integrate .. //depot/projects/netperf_socket/sys/kern/uipc_socket.c#34 integrate .. //depot/projects/netperf_socket/sys/kern/uipc_syscalls.c#24 integrate .. //depot/projects/netperf_socket/sys/kern/uipc_usrreq.c#20 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_bio.c#8 integrate .. //depot/projects/netperf_socket/sys/libkern/qsort.c#3 integrate .. //depot/projects/netperf_socket/sys/libkern/qsort_r.c#1 branch .. //depot/projects/netperf_socket/sys/modules/fdc/Makefile#6 integrate .. //depot/projects/netperf_socket/sys/modules/sound/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/modules/sound/pcm/Makefile#2 delete .. //depot/projects/netperf_socket/sys/modules/sound/sound/Makefile#2 integrate .. //depot/projects/netperf_socket/sys/net/if.c#13 integrate .. //depot/projects/netperf_socket/sys/net/netisr.c#2 integrate .. //depot/projects/netperf_socket/sys/netatalk/at_control.c#7 integrate .. //depot/projects/netperf_socket/sys/netatm/uni/unisig_subr.c#2 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_base.c#9 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_ppp.c#5 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_fw2.c#10 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_icmp.c#9 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_syncache.c#10 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_usrreq.c#11 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_var.h#9 integrate .. //depot/projects/netperf_socket/sys/pc98/conf/GENERIC#9 integrate .. //depot/projects/netperf_socket/sys/pc98/conf/GENERIC.hints#5 integrate .. //depot/projects/netperf_socket/sys/pc98/i386/machdep.c#9 integrate .. //depot/projects/netperf_socket/sys/pc98/pc98/fd.c#12 integrate .. //depot/projects/netperf_socket/sys/pc98/pc98/fdc_cbus.c#4 integrate .. //depot/projects/netperf_socket/sys/pc98/pc98/fdcvar.h#3 integrate .. //depot/projects/netperf_socket/sys/powerpc/conf/GENERIC#5 integrate .. //depot/projects/netperf_socket/sys/powerpc/conf/GENERIC.hints#1 branch .. //depot/projects/netperf_socket/sys/powerpc/include/float.h#5 integrate .. //depot/projects/netperf_socket/sys/powerpc/include/ucontext.h#3 integrate .. //depot/projects/netperf_socket/sys/powerpc/powerpc/elf_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/rpc/rpcclnt.c#6 integrate .. //depot/projects/netperf_socket/sys/security/mac_biba/mac_biba.c#5 integrate .. //depot/projects/netperf_socket/sys/security/mac_biba/mac_biba.h#3 integrate .. //depot/projects/netperf_socket/sys/security/mac_mls/mac_mls.c#5 integrate .. //depot/projects/netperf_socket/sys/security/mac_mls/mac_mls.h#3 integrate .. //depot/projects/netperf_socket/sys/sparc64/conf/GENERIC#7 integrate .. //depot/projects/netperf_socket/sys/sys/bus.h#5 integrate .. //depot/projects/netperf_socket/sys/sys/libkern.h#4 integrate .. //depot/projects/netperf_socket/sys/sys/malloc.h#3 integrate .. //depot/projects/netperf_socket/sys/sys/mbuf.h#14 integrate .. //depot/projects/netperf_socket/sys/sys/mount.h#11 integrate .. //depot/projects/netperf_socket/sys/sys/proc.h#18 integrate .. //depot/projects/netperf_socket/sys/sys/resourcevar.h#5 integrate .. //depot/projects/netperf_socket/sys/sys/sched.h#5 integrate .. //depot/projects/netperf_socket/sys/sys/socket.h#8 integrate .. //depot/projects/netperf_socket/sys/sys/syscallsubr.h#2 integrate .. //depot/projects/netperf_socket/sys/sys/systm.h#7 integrate .. //depot/projects/netperf_socket/sys/vm/uma_core.c#9 integrate .. //depot/projects/netperf_socket/sys/vm/vm_contig.c#8 integrate .. //depot/projects/netperf_socket/sys/vm/vm_page.c#11 integrate .. //depot/projects/netperf_socket/sys/vm/vm_page.h#7 integrate .. //depot/projects/netperf_socket/sys/vm/vm_pageout.c#10 integrate Differences ... ==== //depot/projects/netperf_socket/sys/alpha/alpha/interrupt.c#6 (text+ko) ==== @@ -33,7 +33,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ /* __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.23 1998/02/24 07:38:01 thorpej Exp $");*/ -__FBSDID("$FreeBSD: src/sys/alpha/alpha/interrupt.c,v 1.80 2004/07/10 22:35:05 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/interrupt.c,v 1.81 2004/07/19 16:37:47 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -435,6 +435,8 @@ if ((ih->ih_flags & IH_FAST) != 0) { critical_enter(); ih->ih_handler(ih->ih_argument); + /* XXX */ + td->td_pflags &= ~TDP_OWEPREEMPT; critical_exit(); return; } ==== //depot/projects/netperf_socket/sys/alpha/alpha/pmap.c#13 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.158 2004/07/15 18:00:41 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.162 2004/07/19 18:12:04 alc Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -335,7 +335,6 @@ static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va); -static int pmap_release_free_page(pmap_t pmap, vm_page_t p); static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex); static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t); #ifdef SMP @@ -551,8 +550,6 @@ cputype = hwrpb->rpb_type; return (cputype == ST_DEC_21000 || ST_DEC_4100); - - return 0; } /* @@ -753,8 +750,8 @@ return (pa); PMAP_LOCK(pmap); pte = pmap_lev3pte(pmap, va); - if (pte != NULL) - pa = alpha_ptob(ALPHA_PTE_TO_PFN(*pte)); + if (pte != NULL && pmap_pte_v(pte)) + pa = pmap_pte_pa(pte); PMAP_UNLOCK(pmap); return (pa); } @@ -769,18 +766,22 @@ vm_page_t pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) { - vm_paddr_t pa; + pt_entry_t *pte; vm_page_t m; m = NULL; - mtx_lock(&Giant); - if ((pa = pmap_extract(pmap, va)) != 0) { - m = PHYS_TO_VM_PAGE(pa); - vm_page_lock_queues(); + if (pmap == NULL) + return (m); + vm_page_lock_queues(); + PMAP_LOCK(pmap); + pte = pmap_lev3pte(pmap, va); + if (pte != NULL && pmap_pte_v(pte) && + (*pte & pte_prot(pmap, prot)) == pte_prot(pmap, prot)) { + m = PHYS_TO_VM_PAGE(pmap_pte_pa(pte)); vm_page_hold(m); - vm_page_unlock_queues(); } - mtx_unlock(&Giant); + vm_page_unlock_queues(); + PMAP_UNLOCK(pmap); return (m); } @@ -1022,25 +1023,16 @@ PMAP_LOCK_INIT(pmap); /* - * allocate object for the ptes - */ - if (pmap->pm_pteobj == NULL) - pmap->pm_pteobj = vm_object_allocate(OBJT_DEFAULT, NUSERLEV3MAPS + NUSERLEV2MAPS + 1); - - /* * allocate the page directory page */ - VM_OBJECT_LOCK(pmap->pm_pteobj); - lev1pg = vm_page_grab(pmap->pm_pteobj, NUSERLEV3MAPS + NUSERLEV2MAPS, - VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED | VM_ALLOC_ZERO); + while ((lev1pg = vm_page_alloc(NULL, NUSERLEV3MAPS + NUSERLEV2MAPS, VM_ALLOC_NOOBJ | + VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) + VM_WAIT; - vm_page_lock_queues(); - vm_page_flag_clear(lev1pg, PG_BUSY); - lev1pg->valid = VM_PAGE_BITS_ALL; - vm_page_unlock_queues(); - VM_OBJECT_UNLOCK(pmap->pm_pteobj); + pmap->pm_lev1 = (pt_entry_t*) ALPHA_PHYS_TO_K0SEG(VM_PAGE_TO_PHYS(lev1pg)); - pmap->pm_lev1 = (pt_entry_t*) ALPHA_PHYS_TO_K0SEG(VM_PAGE_TO_PHYS(lev1pg)); + if ((lev1pg->flags & PG_ZERO) == 0) + bzero(pmap->pm_lev1, PAGE_SIZE); /* install self-referential address mapping entry (not PG_ASM) */ pmap->pm_lev1[PTLEV1I] = pmap_phys_to_pte(VM_PAGE_TO_PHYS(lev1pg)) @@ -1060,74 +1052,6 @@ bcopy(PTlev1 + K1SEGLEV1I, pmap->pm_lev1 + K1SEGLEV1I, nklev2 * PTESIZE); } -static int -pmap_release_free_page(pmap_t pmap, vm_page_t p) -{ - pt_entry_t* pte; - pt_entry_t* l2map; - - if (p->pindex >= NUSERLEV3MAPS + NUSERLEV2MAPS) - /* level 1 page table */ - pte = &pmap->pm_lev1[PTLEV1I]; - else if (p->pindex >= NUSERLEV3MAPS) - /* level 2 page table */ - pte = &pmap->pm_lev1[p->pindex - NUSERLEV3MAPS]; - else { - /* level 3 page table */ - pte = &pmap->pm_lev1[p->pindex >> ALPHA_PTSHIFT]; - l2map = (pt_entry_t*) ALPHA_PHYS_TO_K0SEG(pmap_pte_pa(pte)); - pte = &l2map[p->pindex & ((1 << ALPHA_PTSHIFT) - 1)]; - } - - /* - * This code optimizes the case of freeing non-busy - * page-table pages. Those pages are zero now, and - * might as well be placed directly into the zero queue. - */ - vm_page_lock_queues(); - if (vm_page_sleep_if_busy(p, FALSE, "pmaprl")) - return 0; - - vm_page_busy(p); - - /* - * Remove the page table page from the processes address space. - */ - *pte = 0; - pmap->pm_stats.resident_count--; - -#ifdef PMAP_DEBUG - if (p->hold_count) { - panic("pmap_release: freeing held page table page"); - } -#endif - /* - * Level1 pages need to have the kernel - * stuff cleared, so they can go into the zero queue also. - */ - if (p->pindex == NUSERLEV3MAPS + NUSERLEV2MAPS) - bzero(pmap->pm_lev1 + K1SEGLEV1I, nklev2 * PTESIZE); - - if (pmap->pm_ptphint == p) - pmap->pm_ptphint = NULL; - -#ifdef PMAP_DEBUG - { - u_long *lp = (u_long*) ALPHA_PHYS_TO_K0SEG(VM_PAGE_TO_PHYS(p)); - u_long *ep = (u_long*) ((char*) lp + PAGE_SIZE); - for (; lp < ep; lp++) - if (*lp != 0) - panic("pmap_release_free_page: page not zero"); - } -#endif - - p->wire_count--; - atomic_subtract_int(&cnt.v_wire_count, 1); - vm_page_free_zero(p); - vm_page_unlock_queues(); - return 1; -} - /* * this routine is called if the page table page is not * mapped correctly. @@ -1140,15 +1064,22 @@ pt_entry_t* pte; vm_offset_t ptepa; vm_page_t m; - int is_object_locked; /* * Find or fabricate a new pagetable page */ - if (!(is_object_locked = VM_OBJECT_LOCKED(pmap->pm_pteobj))) - VM_OBJECT_LOCK(pmap->pm_pteobj); - m = vm_page_grab(pmap->pm_pteobj, ptepindex, - VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY); + if ((m = vm_page_alloc(NULL, ptepindex, VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) { + VM_WAIT; + + /* + * Indicate the need to retry. While waiting, the page table + * page may have been allocated. + */ + return (NULL); + } + if ((m->flags & PG_ZERO) == 0) + pmap_zero_page(m); KASSERT(m->queue == PQ_NONE, ("_pmap_allocpte: %p->queue != PQ_NONE", m)); @@ -1174,9 +1105,15 @@ int l1index = ptepindex >> ALPHA_PTSHIFT; pt_entry_t* l1pte = &pmap->pm_lev1[l1index]; pt_entry_t* l2map; - if (!pmap_pte_v(l1pte)) - _pmap_allocpte(pmap, NUSERLEV3MAPS + l1index); - else { + if (!pmap_pte_v(l1pte)) { + if (_pmap_allocpte(pmap, NUSERLEV3MAPS + l1index) == NULL) { + vm_page_lock_queues(); + vm_page_unhold(m); + vm_page_free(m); + vm_page_unlock_queues(); + return (NULL); + } + } else { vm_page_t l2page; l2page = PHYS_TO_VM_PAGE(pmap_pte_pa(l1pte)); @@ -1193,13 +1130,6 @@ */ pmap->pm_ptphint = m; - vm_page_lock_queues(); - m->valid = VM_PAGE_BITS_ALL; - vm_page_wakeup(m); - vm_page_unlock_queues(); - if (!is_object_locked) - VM_OBJECT_UNLOCK(pmap->pm_pteobj); - return m; } @@ -1214,7 +1144,7 @@ * Calculate pagetable page index */ ptepindex = va >> (PAGE_SHIFT + ALPHA_PTSHIFT); - +retry: /* * Get the level2 entry */ @@ -1237,12 +1167,16 @@ pmap->pm_ptphint = m; } m->hold_count++; - return m; + } else { + /* + * Here if the pte page isn't mapped, or if it has been + * deallocated. + */ + m = _pmap_allocpte(pmap, ptepindex); + if (m == NULL) + goto retry; } - /* - * Here if the pte page isn't mapped, or if it has been deallocated. - */ - return _pmap_allocpte(pmap, ptepindex); + return (m); } @@ -1258,52 +1192,35 @@ void pmap_release(pmap_t pmap) { - vm_page_t p,n,lev1pg; - vm_object_t object = pmap->pm_pteobj; - int curgeneration; + vm_page_t lev1pg; + + KASSERT(pmap->pm_stats.resident_count == 0, + ("pmap_release: pmap resident count %ld != 0", + pmap->pm_stats.resident_count)); -#if defined(DIAGNOSTIC) - if (object->ref_count != 1) - panic("pmap_release: pteobj reference count != 1"); -#endif - - lev1pg = NULL; -retry: - curgeneration = object->generation; - for (p = TAILQ_FIRST(&object->memq); p != NULL; p = n) { - n = TAILQ_NEXT(p, listq); - if (p->pindex >= NUSERLEV3MAPS) { - continue; - } - while (1) { - if (!pmap_release_free_page(pmap, p) && - (object->generation != curgeneration)) - goto retry; - } - } - for (p = TAILQ_FIRST(&object->memq); p != NULL; p = n) { - n = TAILQ_NEXT(p, listq); - if (p->pindex < NUSERLEV3MAPS) { - /* can this happen? maybe panic */ - goto retry; - } - if (p->pindex >= NUSERLEV3MAPS + NUSERLEV2MAPS) { - lev1pg = p; - continue; - } - while (1) { - if (!pmap_release_free_page(pmap, p) && - (object->generation != curgeneration)) - goto retry; - } - } + lev1pg = PHYS_TO_VM_PAGE(pmap_pte_pa(&pmap->pm_lev1[PTLEV1I])); + KASSERT(lev1pg->pindex == NUSERLEV3MAPS + NUSERLEV2MAPS, + ("pmap_release: PTLEV1I page has unexpected pindex %ld", + lev1pg->pindex)); - if (lev1pg && !pmap_release_free_page(pmap, lev1pg)) - goto retry; mtx_lock_spin(&allpmaps_lock); LIST_REMOVE(pmap, pm_list); mtx_unlock_spin(&allpmaps_lock); + + /* + * Level1 pages need to have the kernel + * stuff cleared, so they can go into the zero queue also. + */ + bzero(pmap->pm_lev1 + K1SEGLEV1I, nklev2 * PTESIZE); + pmap->pm_lev1[PTLEV1I] = 0; + PMAP_LOCK_DESTROY(pmap); + + vm_page_lock_queues(); + lev1pg->wire_count--; + atomic_subtract_int(&cnt.v_wire_count, 1); + vm_page_free_zero(lev1pg); + vm_page_unlock_queues(); } /* @@ -1441,9 +1358,7 @@ { pv_entry_t pv; int rtval; - int s; - s = splvm(); if (m->md.pv_list_count < pmap->pm_stats.resident_count) { TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (pmap == pv->pv_pmap && va == pv->pv_va) @@ -1468,7 +1383,6 @@ free_pv_entry(pv); } - splx(s); return rtval; } @@ -1479,11 +1393,8 @@ static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t mpte, vm_page_t m) { - - int s; pv_entry_t pv; - s = splvm(); pv = get_pv_entry(); pv->pv_va = va; pv->pv_pmap = pmap; @@ -1494,7 +1405,6 @@ TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); m->md.pv_list_count++; vm_page_unlock_queues(); - splx(s); } /* @@ -1524,8 +1434,6 @@ } else { return pmap_unuse_pt(pmap, va, NULL); } - - return 0; } /* @@ -1550,8 +1458,6 @@ */ (void) pmap_remove_pte(pmap, ptq, va); pmap_invalidate_page(pmap, va); - - return; } /* @@ -1624,7 +1530,6 @@ { register pv_entry_t pv; pt_entry_t *pte, tpte; - int s; #if defined(PMAP_DIAGNOSTIC) /* @@ -1636,7 +1541,6 @@ } #endif - s = splvm(); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { PMAP_LOCK(pv->pv_pmap); pte = pmap_lev3pte(pv->pv_pmap, pv->pv_va); @@ -1673,8 +1577,6 @@ } vm_page_flag_clear(m, PG_WRITEABLE); - - splx(s); } /* @@ -1947,6 +1849,7 @@ if (mpte && (mpte->pindex == ptepindex)) { mpte->hold_count++; } else { + retry: /* * Get the level 2 entry */ @@ -1967,6 +1870,8 @@ mpte->hold_count++; } else { mpte = _pmap_allocpte(pmap, ptepindex); + if (mpte == NULL) + goto retry; } } } else { @@ -2164,26 +2069,21 @@ { pv_entry_t pv; int loops = 0; - int s; if (!pmap_initialized || (m->flags & PG_FICTITIOUS)) return FALSE; - s = splvm(); - /* * Not found, check current mappings returning immediately if found. */ TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (pv->pv_pmap == pmap) { - splx(s); return TRUE; } loops++; if (loops >= 16) break; } - splx(s); return (FALSE); } @@ -2226,7 +2126,7 @@ #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY pte = vtopte(pv->pv_va); #else - pte = pmap_pte_quick(pv->pv_pmap, pv->pv_va); + pte = pmap_pte_quick(pmap, pv->pv_va); #endif if (!pmap_pte_v(pte)) panic("pmap_remove_pages: page on pm_pvlist has no pte\n"); @@ -2244,22 +2144,21 @@ m = PHYS_TO_VM_PAGE(pmap_pte_pa(&tpte)); - pv->pv_pmap->pm_stats.resident_count--; + pmap->pm_stats.resident_count--; if ((tpte & PG_FOW) == 0) if (pmap_track_modified(pv->pv_va)) vm_page_dirty(m); npv = TAILQ_NEXT(pv, pv_plist); - TAILQ_REMOVE(&pv->pv_pmap->pm_pvlist, pv, pv_plist); + TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); m->md.pv_list_count--; TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - if (TAILQ_FIRST(&m->md.pv_list) == NULL) { + if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); - } - pmap_unuse_pt(pv->pv_pmap, pv->pv_va, pv->pv_ptem); + pmap_unuse_pt(pmap, pv->pv_va, pv->pv_ptem); free_pv_entry(pv); } pmap_invalidate_all(pmap); @@ -2276,14 +2175,12 @@ pv_entry_t pv; pt_entry_t *pte; int changed; - int s; if (!pmap_initialized || (m->flags & PG_FICTITIOUS) || (!setem && bit == (PG_UWE|PG_KWE) && (m->flags & PG_WRITEABLE) == 0)) return; - s = splvm(); changed = 0; /* @@ -2326,7 +2223,6 @@ } if (!setem && bit == (PG_UWE|PG_KWE)) vm_page_flag_clear(m, PG_WRITEABLE); - splx(s); } /* ==== //depot/projects/netperf_socket/sys/alpha/conf/GENERIC#5 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.171 2004/07/11 03:03:48 marcel Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.172 2004/07/18 09:03:11 maxim Exp $ machine alpha cpu EV4 @@ -170,7 +170,7 @@ device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') -# Pseudo devices - the number indicates how many units to allocated. +# Pseudo devices. device random # Entropy device device loop # Network loopback device ether # Ethernet support ==== //depot/projects/netperf_socket/sys/alpha/include/pmap.h#8 (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 * from: i386 pmap.h,v 1.54 1997/11/20 19:30:35 bde Exp - * $FreeBSD: src/sys/alpha/include/pmap.h,v 1.32 2004/07/05 16:59:56 alc Exp $ + * $FreeBSD: src/sys/alpha/include/pmap.h,v 1.33 2004/07/19 18:12:04 alc Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -169,7 +169,6 @@ struct pmap { struct mtx pm_mtx; pt_entry_t *pm_lev1; /* KVA of lev0map */ - vm_object_t pm_pteobj; /* Container for pte's */ TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */ u_int32_t pm_active; /* active cpus */ struct { ==== //depot/projects/netperf_socket/sys/amd64/amd64/intr_machdep.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.7 2004/07/02 20:21:41 jhb Exp $ + * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.8 2004/07/19 16:37:47 jhb Exp $ */ /* @@ -204,6 +204,8 @@ } isrc->is_pic->pic_eoi_source(isrc); error = 0; + /* XXX */ + td->td_pflags &= ~TDP_OWEPREEMPT; critical_exit(); } else { /* ==== //depot/projects/netperf_socket/sys/amd64/conf/GENERIC#10 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.412 2004/07/11 03:09:53 marcel Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.415 2004/07/18 15:59:03 scottl Exp $ machine amd64 cpu HAMMER @@ -28,7 +28,6 @@ makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler -options ADAPTIVE_MUTEXES # mutexes first spin lock, then sleep options INET # InterNETworking options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem @@ -80,10 +79,6 @@ device isa device pci - -# Sound (no modules) -device pcm - # Floppy drives device fdc @@ -229,7 +224,7 @@ device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. #device wl # Older non 802.11 Wavelan wireless NIC. -# Pseudo devices - the number indicates how many units to allocate. +# Pseudo devices. device random # Entropy device device loop # Network loopback device ether # Ethernet support ==== //depot/projects/netperf_socket/sys/amd64/include/float.h#5 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)float.h 7.1 (Berkeley) 5/8/90 - * $FreeBSD: src/sys/amd64/include/float.h,v 1.13 2004/07/08 01:32:25 peter Exp $ + * $FreeBSD: src/sys/amd64/include/float.h,v 1.14 2004/07/19 08:17:24 das Exp $ */ #ifndef _MACHINE_FLOAT_H_ @@ -35,8 +35,12 @@ #include <sys/cdefs.h> +__BEGIN_DECLS +extern int __flt_rounds(void); +__END_DECLS + #define FLT_RADIX 2 /* b */ -#define FLT_ROUNDS 1 /* FP addition rounds to nearest */ +#define FLT_ROUNDS __flt_rounds() #if __ISO_C_VISIBLE >= 1999 #define FLT_EVAL_METHOD (-1) /* i387 semantics are...interesting */ #define DECIMAL_DIG 21 /* max precision in decimal digits */ ==== //depot/projects/netperf_socket/sys/arm/arm/db_trace.c#3 (text+ko) ==== @@ -30,8 +30,9 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/db_trace.c,v 1.2 2004/07/12 21:25:01 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/db_trace.c,v 1.3 2004/07/19 12:26:44 cognet Exp $"); #include <sys/param.h> +#include <sys/systm.h> #include <sys/proc.h> @@ -103,7 +104,7 @@ boolean_t trace_thread = FALSE; int scp_offset; - if (kdb_frame == NULL) + if (kdb_frame == NULL && !have_addr) return; while ((c = *cp++) != 0) { if (c == 'u') @@ -152,11 +153,7 @@ * In theory, the SCP isn't guaranteed to be in the function * that generated the stack frame. We hope for the best. */ -#ifdef __PROG26 - scp = frame[FR_SCP] & R15_PC; -#else scp = frame[FR_SCP]; -#endif db_printsym(scp, DB_STGY_PROC); db_printf("\n\t"); @@ -248,12 +245,18 @@ int db_trace_thread(struct thread *thr, int count) { + uint32_t addr; - db_stack_trace_cmd((db_expr_t)__builtin_frame_address(0), 1, -1, NULL); + if (thr == curthread) + addr = (uint32_t)__builtin_frame_address(0); + else + addr = thr->td_pcb->un_32.pcb32_r11; + db_stack_trace_cmd(addr, 1, -1, NULL); return (0); } void db_trace_self(void) { + db_trace_thread(curthread, -1); } ==== //depot/projects/netperf_socket/sys/arm/include/float.h#2 (text+ko) ==== @@ -31,15 +31,15 @@ * SUCH DAMAGE. * * from: @(#)float.h 7.1 (Berkeley) 5/8/90 - * $FreeBSD: src/sys/arm/include/float.h,v 1.1 2004/05/14 11:46:44 cognet Exp $ + * $FreeBSD: src/sys/arm/include/float.h,v 1.3 2004/07/19 08:24:04 das Exp $ */ #ifndef _MACHINE_FLOAT_H_ #define _MACHINE_FLOAT_H_ 1 #define FLT_RADIX 2 /* b */ -#define FLT_ROUNDS 1 /* FP addition rounds to nearest */ -#define FLT_EVAL_METHOD (-1) /* i387 semantics are...interesting */ +#define FLT_ROUNDS (-1) /* indeterminate */ +#define FLT_EVAL_METHOD (-1) /* XXX */ #define DECIMAL_DIG 21 /* max precision in decimal digits */ #define FLT_MANT_DIG 24 /* p */ ==== //depot/projects/netperf_socket/sys/boot/forth/loader.conf#9 (text+ko) ==== @@ -6,7 +6,7 @@ # # All arguments must be in double quotes. # -# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.82 2004/07/08 22:35:34 brian Exp $ +# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.83 2004/07/16 07:24:20 tanimura Exp $ ############################################################## ### Basic configuration options ############################ @@ -255,7 +255,7 @@ ### Sound modules ########################################## ############################################################## -snd_pcm_load="NO" # Digital sound subsystem +sound_load="NO" # Digital sound subsystem snd_ad1816_load="NO" # ad1816 snd_cmi_load="NO" # cmi snd_csa_load="NO" # csa ==== //depot/projects/netperf_socket/sys/cam/scsi/scsi_da.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.168 2004/05/02 19:24:23 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.169 2004/07/18 05:39:14 sanpei Exp $"); #ifdef _KERNEL #include "opt_hw_wdog.h" @@ -294,6 +294,14 @@ {T_DIRECT, SIP_MEDIA_REMOVABLE, "NEUROS", "dig. audio comp.", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, + { + /* + * SEAGRAND NP-900 MP3 Player + * PR: kern/64563 + */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "SEAGRAND", "NP-900*", "*"}, + /*quirks*/ DA_Q_NO_SYNC_CACHE|DA_Q_NO_PREVENT + }, }; static disk_strategy_t dastrategy; ==== //depot/projects/netperf_socket/sys/compat/ia32/ia32_sysvec.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/ia32/ia32_sysvec.c,v 1.17 2004/03/21 01:22:24 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ia32/ia32_sysvec.c,v 1.18 2004/07/16 20:53:00 obrien Exp $"); #include "opt_compat.h" @@ -150,7 +150,7 @@ NULL, "/usr/libexec/ld-elf.so.1", >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407192218.i6JMI28R067842>