From owner-p4-projects@FreeBSD.ORG Mon Sep 13 18:27:06 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3F23416A4D0; Mon, 13 Sep 2004 18:27:06 +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 198CA16A4CE for ; Mon, 13 Sep 2004 18:27:06 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E917543D1D for ; Mon, 13 Sep 2004 18:27:05 +0000 (GMT) (envelope-from jhb@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 i8DIR5wl079666 for ; Mon, 13 Sep 2004 18:27:05 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i8DIR51w079663 for perforce@freebsd.org; Mon, 13 Sep 2004 18:27:05 GMT (envelope-from jhb@freebsd.org) Date: Mon, 13 Sep 2004 18:27:05 GMT Message-Id: <200409131827.i8DIR51w079663@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 61432 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: Mon, 13 Sep 2004 18:27:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=61432 Change 61432 by jhb@jhb_slimer on 2004/09/13 18:26:18 IFC @61430. Affected files ... .. //depot/projects/smpng/sys/alpha/conf/GENERIC#42 integrate .. //depot/projects/smpng/sys/amd64/amd64/pmap.c#33 integrate .. //depot/projects/smpng/sys/amd64/include/pmap.h#14 integrate .. //depot/projects/smpng/sys/conf/NOTES#80 integrate .. //depot/projects/smpng/sys/contrib/pf/net/pf.c#9 integrate .. //depot/projects/smpng/sys/dev/aac/aac.c#43 integrate .. //depot/projects/smpng/sys/dev/bktr/msp34xx.c#4 integrate .. //depot/projects/smpng/sys/dev/esp/esp_sbus.c#4 integrate .. //depot/projects/smpng/sys/dev/sound/isa/sb16.c#17 integrate .. //depot/projects/smpng/sys/dev/vge/if_vge.c#2 integrate .. //depot/projects/smpng/sys/fs/specfs/spec_vnops.c#36 integrate .. //depot/projects/smpng/sys/geom/bde/g_bde_crypt.c#15 integrate .. //depot/projects/smpng/sys/geom/bde/g_bde_lock.c#10 integrate .. //depot/projects/smpng/sys/geom/geom_kern.c#18 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum.c#7 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum.h#4 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum_drive.c#6 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum_plex.c#5 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum_rm.c#3 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum_state.c#3 integrate .. //depot/projects/smpng/sys/geom/vinum/geom_vinum_subr.c#6 integrate .. //depot/projects/smpng/sys/i386/i386/pmap.c#71 integrate .. //depot/projects/smpng/sys/i386/include/pmap.h#23 integrate .. //depot/projects/smpng/sys/ia64/conf/GENERIC#42 integrate .. //depot/projects/smpng/sys/ia64/conf/SKI#19 integrate .. //depot/projects/smpng/sys/kern/kern_conf.c#30 integrate .. //depot/projects/smpng/sys/kern/sched_4bsd.c#38 integrate .. //depot/projects/smpng/sys/kern/sched_ule.c#42 integrate .. //depot/projects/smpng/sys/kern/vfs_bio.c#66 integrate .. //depot/projects/smpng/sys/kern/vnode_if.src#17 integrate .. //depot/projects/smpng/sys/netgraph/ng_eiface.c#14 integrate .. //depot/projects/smpng/sys/netinet/ip_fastfwd.c#10 integrate .. //depot/projects/smpng/sys/netinet/ip_fw_pfil.c#3 integrate .. //depot/projects/smpng/sys/netinet/ip_output.c#65 integrate .. //depot/projects/smpng/sys/sys/conf.h#30 integrate .. //depot/projects/smpng/sys/sys/proc.h#126 integrate .. //depot/projects/smpng/sys/sys/rman.h#9 integrate .. //depot/projects/smpng/sys/sys/sched.h#16 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_alloc.c#29 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_snapshot.c#39 integrate .. //depot/projects/smpng/sys/vm/vm_fault.c#41 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/conf/GENERIC#42 (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/smpng/sys/amd64/amd64/pmap.c#33 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.497 2004/09/08 18:58:28 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.498 2004/09/12 20:20:40 alc Exp $"); /* * Manages physical address maps. @@ -1784,14 +1784,15 @@ va_next = eva; for (; sva != va_next; sva += PAGE_SIZE) { - pt_entry_t pbits; + pt_entry_t obits, pbits; pt_entry_t *pte; vm_page_t m; pte = pmap_pte(pmap, sva); if (pte == NULL) continue; - pbits = *pte; +retry: + obits = pbits = *pte; if (pbits & PG_MANAGED) { m = NULL; if (pbits & PG_A) { @@ -1805,14 +1806,14 @@ m = PHYS_TO_VM_PAGE(pbits & PG_FRAME); vm_page_dirty(m); - pbits &= ~PG_M; } } - pbits &= ~PG_RW; + pbits &= ~(PG_RW | PG_M); - if (pbits != *pte) { - pte_store(pte, pbits); + if (pbits != obits) { + if (!atomic_cmpset_long(pte, obits, pbits)) + goto retry; anychanged = 1; } } ==== //depot/projects/smpng/sys/amd64/include/pmap.h#14 (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/smpng/sys/conf/NOTES#80 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1276 2004/09/08 08:42:36 ru Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1277 2004/09/12 12:13:29 ceri Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -201,7 +201,7 @@ # allows interrupt threads to run sooner rather than waiting. # WARNING! Only tested on alpha, amd64, and i386. # FULL_PREEMPTION instructs the kernel to preempt non-realtime kernel -# threads. It sole use is to expose race conditions and other +# threads. Its sole use is to expose race conditions and other # bugs during development. Enabling this option will reduce # performance and increase the frequency of kernel panics by # design. If you aren't sure that you need it then you don't. ==== //depot/projects/smpng/sys/contrib/pf/net/pf.c#9 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.18 2004/08/12 13:59:44 mlaier Exp $ */ +/* $FreeBSD: src/sys/contrib/pf/net/pf.c,v 1.19 2004/09/11 11:18:25 mlaier Exp $ */ /* $OpenBSD: pf.c,v 1.433.2.2 2004/07/17 03:22:34 brad Exp $ */ /* add $OpenBSD: pf.c,v 1.448 2004/05/11 07:34:11 dhartmei Exp $ */ @@ -5619,9 +5619,8 @@ } else { ip = mtod(m, struct ip *); sum = in_pseudo(ip->ip_src.s_addr, - ip->ip_dst.s_addr, - htonl(m->m_pkthdr.csum_data + - IPPROTO_TCP + ntohs(ip->ip_len))); + ip->ip_dst.s_addr, htonl((u_short)len + + m->m_pkthdr.csum_data + IPPROTO_TCP)); } sum ^= 0xffff; ++hw_assist; ==== //depot/projects/smpng/sys/dev/aac/aac.c#43 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/aac/aac.c,v 1.101 2004/08/13 01:44:09 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/aac/aac.c,v 1.102 2004/09/12 03:19:32 scottl Exp $"); /* * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters. @@ -2339,26 +2339,26 @@ aac_release_sync_fib(sc); return; } - info = (struct aac_adapter_info *)&fib->data[0]; - - device_printf(sc->aac_dev, "%s %dMHz, %dMB cache memory, %s\n", - aac_describe_code(aac_cpu_variant, info->CpuVariant), - info->ClockSpeed, info->BufferMem / (1024 * 1024), - aac_describe_code(aac_battery_platform, - info->batteryPlatform)); /* save the kernel revision structure for later use */ + info = (struct aac_adapter_info *)&fib->data[0]; sc->aac_revision = info->KernelRevision; - device_printf(sc->aac_dev, "Kernel %d.%d-%d, Build %d, S/N %6X\n", - info->KernelRevision.external.comp.major, - info->KernelRevision.external.comp.minor, - info->KernelRevision.external.comp.dash, - info->KernelRevision.buildNumber, - (u_int32_t)(info->SerialNumber & 0xffffff)); + + if (bootverbose) { + device_printf(sc->aac_dev, "%s %dMHz, %dMB cache memory, %s\n", + aac_describe_code(aac_cpu_variant, info->CpuVariant), + info->ClockSpeed, info->BufferMem / (1024 * 1024), + aac_describe_code(aac_battery_platform, + info->batteryPlatform)); - aac_release_sync_fib(sc); + device_printf(sc->aac_dev, + "Kernel %d.%d-%d, Build %d, S/N %6X\n", + info->KernelRevision.external.comp.major, + info->KernelRevision.external.comp.minor, + info->KernelRevision.external.comp.dash, + info->KernelRevision.buildNumber, + (u_int32_t)(info->SerialNumber & 0xffffff)); - if (1 || bootverbose) { device_printf(sc->aac_dev, "Supported Options=%b\n", sc->supported_options, "\20" @@ -2376,6 +2376,7 @@ "\14ALARM" "\15NONDASD"); } + aac_release_sync_fib(sc); } /* ==== //depot/projects/smpng/sys/dev/bktr/msp34xx.c#4 (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/smpng/sys/dev/esp/esp_sbus.c#4 (text+ko) ==== @@ -65,7 +65,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/esp/esp_sbus.c,v 1.6 2004/08/12 17:41:29 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/esp/esp_sbus.c,v 1.7 2004/09/13 15:15:38 scottl Exp $"); #include #include @@ -193,8 +193,12 @@ node = ofw_bus_get_node(dev); if (OF_getprop(node, "initiator-id", &sc->sc_id, sizeof(sc->sc_id)) == -1) - sc->sc_id = 7;; - sc->sc_freq = sbus_get_clockfreq(dev); + sc->sc_id = 7; + if (OF_getprop(node, "clock-frequency", &sc->sc_freq, + sizeof(sc->sc_freq)) == -1) { + printf("failed to query OFW for clock-frequency\n"); + sc->sc_freq = sbus_get_clockfreq(dev); + } #ifdef ESP_SBUS_DEBUG device_printf(dev, "espattach_sbus: sc_id %d, freq %d\n", ==== //depot/projects/smpng/sys/dev/sound/isa/sb16.c#17 (text+ko) ==== @@ -38,7 +38,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/isa/sb16.c,v 1.87 2004/07/16 03:59:54 tanimura Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/isa/sb16.c,v 1.88 2004/09/12 18:19:42 truckman Exp $"); #define SB16_BUFFSIZE 4096 #define PLAIN_SB16(x) ((((x)->bd_flags) & (BD_F_SB16|BD_F_SB16X)) == BD_F_SB16) @@ -209,7 +209,7 @@ #if 0 printf("sb_cmd2: %x, %x\n", cmd, val); #endif - sb_lock(sb); + sb_lockassert(sb); r = 0; if (sb_dspwr(sb, cmd)) { if (sb_dspwr(sb, val & 0xff)) { @@ -218,7 +218,6 @@ } } } - sb_unlock(sb); return r; } @@ -243,12 +242,11 @@ { int val; - sb_lock(sb); + sb_lockassert(sb); sb_wr(sb, SB_MIX_ADDR, (u_char) (port & 0xff)); /* Select register */ DELAY(10); val = sb_rd(sb, SB_MIX_DATA); DELAY(10); - sb_unlock(sb); return val; } ==== //depot/projects/smpng/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.3 2004/09/11 22:13:25 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); @@ -1548,7 +1547,6 @@ * This is done in case the transmitter has gone idle. */ if (sc->vge_ldata.vge_tx_free != VGE_TX_DESC_CNT) { - CSR_WRITE_2(sc, VGE_TXQCSRS, VGE_TXQCSR_WAK0); CSR_WRITE_1(sc, VGE_CRS1, VGE_CR1_TIMER0_ENABLE); } ==== //depot/projects/smpng/sys/fs/specfs/spec_vnops.c#36 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 - * $FreeBSD: src/sys/fs/specfs/spec_vnops.c,v 1.226 2004/08/08 13:23:05 phk Exp $ + * $FreeBSD: src/sys/fs/specfs/spec_vnops.c,v 1.227 2004/09/13 06:50:41 phk Exp $ */ #include @@ -54,7 +54,6 @@ static int spec_advlock(struct vop_advlock_args *); static int spec_close(struct vop_close_args *); -static int spec_freeblks(struct vop_freeblks_args *); static int spec_fsync(struct vop_fsync_args *); static int spec_getpages(struct vop_getpages_args *); static int spec_ioctl(struct vop_ioctl_args *); @@ -74,7 +73,6 @@ { &vop_bmap_desc, (vop_t *) vop_panic }, { &vop_close_desc, (vop_t *) spec_close }, { &vop_create_desc, (vop_t *) vop_panic }, - { &vop_freeblks_desc, (vop_t *) spec_freeblks }, { &vop_fsync_desc, (vop_t *) spec_fsync }, { &vop_getpages_desc, (vop_t *) spec_getpages }, { &vop_getwritemount_desc, (vop_t *) vop_stdgetwritemount }, @@ -462,10 +460,8 @@ struct cdevsw *dsw; struct thread *td = curthread; - KASSERT(bp->b_iocmd == BIO_READ || - bp->b_iocmd == BIO_WRITE || - bp->b_iocmd == BIO_DELETE, - ("Wrong b_iocmd buf=%p cmd=%d", bp, bp->b_iocmd)); + KASSERT(bp->b_iocmd == BIO_READ || bp->b_iocmd == BIO_WRITE, + ("Wrong b_iocmd buf=%p cmd=%d", bp, bp->b_iocmd)); /* * Slow down disk requests for niced processes. @@ -529,33 +525,6 @@ return spec_xstrategy(ap->a_vp, ap->a_bp); } -static int -spec_freeblks(ap) - struct vop_freeblks_args /* { - struct vnode *a_vp; - daddr_t a_addr; - daddr_t a_length; - } */ *ap; -{ - struct buf *bp; - - /* - * XXX: This assumes that strategy does the deed right away. - * XXX: this may not be TRTTD. - */ - if ((ap->a_vp->v_rdev->si_flags & SI_CANDELETE) == 0) - return (0); - bp = geteblk(ap->a_length); - bp->b_iocmd = BIO_DELETE; - bp->b_dev = ap->a_vp->v_rdev; - bp->b_blkno = ap->a_addr; - bp->b_offset = dbtob(ap->a_addr); - bp->b_iooffset = bp->b_offset; - bp->b_bcount = ap->a_length; - BUF_KERNPROC(bp); - DEV_STRATEGY(bp); - return (0); -} /* * Device close routine ==== //depot/projects/smpng/sys/geom/bde/g_bde_crypt.c#15 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/geom/bde/g_bde_crypt.c,v 1.19 2004/01/23 11:47:06 phk Exp $ + * $FreeBSD: src/sys/geom/bde/g_bde_crypt.c,v 1.20 2004/09/11 17:58:53 phk Exp $ * * This source file contains the functions responsible for the crypto, keying * and mapping operations on the I/O requests. @@ -311,7 +311,7 @@ /* Compensate for lock sectors */ for (u = 0; u < G_BDE_MAXKEYS; u++) { /* Find the start of this lock sector */ - ko = kp->lsector[u] & ~(kp->sectorsize - 1); + ko = kp->lsector[u] & ~((uint64_t)kp->sectorsize - 1); if (wp->kso >= ko) wp->kso += kp->sectorsize; ==== //depot/projects/smpng/sys/geom/bde/g_bde_lock.c#10 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/geom/bde/g_bde_lock.c,v 1.12 2003/10/07 09:28:07 phk Exp $ + * $FreeBSD: src/sys/geom/bde/g_bde_lock.c,v 1.13 2004/09/11 17:57:51 phk Exp $ * * This souce file contains routines which operates on the lock sectors, both * for the kernel and the userland program gbde(1). @@ -428,10 +428,9 @@ return (ENOENT); /* If we have an unsorted lock-sequence, refuse */ - if (gl->lsector[0] > gl->lsector[1] || - gl->lsector[1] > gl->lsector[2] || - gl->lsector[2] > gl->lsector[3]) - return (EINVAL); + for (i = 0; i < G_BDE_MAXKEYS - 1; i++) + if (gl->lsector[i] >= gl->lsector[i + 1]) + return (EINVAL); /* Finally, find out which key was used by matching the byte offset */ for (i = 0; i < G_BDE_MAXKEYS; i++) ==== //depot/projects/smpng/sys/geom/geom_kern.c#18 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/geom_kern.c,v 1.34 2004/02/10 10:54:19 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/geom_kern.c,v 1.35 2004/09/13 14:58:27 pjd Exp $"); #include #include @@ -220,6 +220,7 @@ 0, 0, sysctl_kern_geom_conftxt, "", "Dump the GEOM config in txt"); +TUNABLE_INT("kern.geom.debugflags", &g_debugflags); SYSCTL_INT(_kern_geom, OID_AUTO, debugflags, CTLFLAG_RW, &g_debugflags, 0, ""); ==== //depot/projects/smpng/sys/geom/vinum/geom_vinum.c#7 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum.c,v 1.10 2004/08/27 21:32:18 le Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum.c,v 1.11 2004/09/13 17:27:58 le Exp $"); #include #include @@ -186,7 +186,7 @@ g_topology_unlock(); /* Check if the provided slice is a valid vinum drive. */ - vhdr = g_read_data(cp, GV_HDR_OFFSET, GV_HDR_LEN, &error); + vhdr = g_read_data(cp, GV_HDR_OFFSET, pp->sectorsize, &error); if (vhdr == NULL || error != 0) { g_topology_lock(); g_access(cp, -1, 0, 0); ==== //depot/projects/smpng/sys/geom/vinum/geom_vinum.h#4 (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/geom/vinum/geom_vinum.h,v 1.3 2004/08/27 21:32:18 le Exp $ + * $FreeBSD: src/sys/geom/vinum/geom_vinum.h,v 1.4 2004/09/13 17:44:47 le Exp $ */ #ifndef _GEOM_VINUM_H_ @@ -68,7 +68,7 @@ void gv_format_config(struct gv_softc *, struct sbuf *, int, char *); int gv_is_striped(struct gv_plex *); int gv_is_open(struct g_geom *); -void gv_kill_thread(struct gv_plex *); +void gv_kill_plex_thread(struct gv_plex *); int gv_object_type(struct gv_softc *, char *); void gv_parse_config(struct gv_softc *, u_char *, int); const char *gv_roughlength(off_t, int); ==== //depot/projects/smpng/sys/geom/vinum/geom_vinum_drive.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_drive.c,v 1.11 2004/08/27 21:32:18 le Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_drive.c,v 1.13 2004/09/13 17:33:52 le Exp $"); #include #include @@ -318,7 +318,8 @@ s->provider = NULL; s->consumer = NULL; } - gv_set_drive_state(d, GV_DRIVE_DOWN, GV_SETSTATE_FORCE); + gv_set_drive_state(d, GV_DRIVE_DOWN, + GV_SETSTATE_FORCE | GV_SETSTATE_CONFIG); } gp->softc = NULL; g_wither_geom(gp, error); @@ -372,7 +373,7 @@ /* Now check if the provided slice is a valid vinum drive. */ do { - vhdr = g_read_data(cp, GV_HDR_OFFSET, GV_HDR_LEN, &error); + vhdr = g_read_data(cp, GV_HDR_OFFSET, pp->sectorsize, &error); if (vhdr == NULL || error != 0) break; if (vhdr->magic != GV_MAGIC) { ==== //depot/projects/smpng/sys/geom/vinum/geom_vinum_plex.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_plex.c,v 1.8 2004/08/10 20:51:48 le Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_plex.c,v 1.9 2004/09/13 17:44:47 le Exp $"); #include #include @@ -67,7 +67,7 @@ p = gp->softc; if (p != NULL) { - gv_kill_thread(p); + gv_kill_plex_thread(p); p->geom = NULL; p->provider = NULL; p->consumer = NULL; @@ -468,7 +468,7 @@ * If this is a RAID5 plex, check if its worker thread is still active * and signal it to self destruct. */ - gv_kill_thread(p); + gv_kill_plex_thread(p); /* g_free(sc); */ g_wither_geom(gp, ENXIO); return (0); ==== //depot/projects/smpng/sys/geom/vinum/geom_vinum_rm.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_rm.c,v 1.2 2004/08/22 17:07:55 le Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_rm.c,v 1.3 2004/09/13 17:44:47 le Exp $"); #include #include @@ -228,7 +228,7 @@ p->vol_sc = NULL; } - gv_kill_thread(p); + gv_kill_plex_thread(p); g_free(p); if (gp != NULL) { ==== //depot/projects/smpng/sys/geom/vinum/geom_vinum_state.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_state.c,v 1.3 2004/08/19 12:03:27 le Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_state.c,v 1.4 2004/09/13 17:33:52 le Exp $"); #include #include @@ -63,6 +63,10 @@ gv_update_sd_state(s); } + /* Save the config back to disk. */ + if (flags & GV_SETSTATE_CONFIG) + gv_save_config_all(d->vinumconf); + return (1); } ==== //depot/projects/smpng/sys/geom/vinum/geom_vinum_subr.c#6 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_subr.c,v 1.7 2004/08/22 13:34:24 le Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_subr.c,v 1.8 2004/09/13 17:44:47 le Exp $"); #include #include @@ -817,7 +817,7 @@ } void -gv_kill_thread(struct gv_plex *p) +gv_kill_plex_thread(struct gv_plex *p) { if ((p->org == GV_PLEX_RAID5) && (p->flags & GV_PLEX_THREAD_ACTIVE)) { p->flags |= GV_PLEX_THREAD_DIE; ==== //depot/projects/smpng/sys/i386/i386/pmap.c#71 (text+ko) ==== @@ -73,7 +73,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.501 2004/09/08 18:58:29 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.504 2004/09/12 20:20:40 alc Exp $"); /* * Manages physical address maps. @@ -1814,7 +1814,7 @@ sched_pin(); PMAP_LOCK(pmap); for (; sva < eva; sva = pdnxt) { - unsigned pdirindex; + unsigned obits, pbits, pdirindex; pdnxt = (sva + NBPDR) & ~PDRMASK; @@ -1842,13 +1842,18 @@ pdnxt = eva; for (; sva != pdnxt; sva += PAGE_SIZE) { - pt_entry_t pbits; pt_entry_t *pte; vm_page_t m; if ((pte = pmap_pte_quick(pmap, sva)) == NULL) continue; - pbits = *pte; +retry: + /* + * Regardless of whether a pte is 32 or 64 bits in + * size, PG_RW, PG_A, and PG_M are among the least + * significant 32 bits. + */ + obits = pbits = *(u_int *)pte; if (pbits & PG_MANAGED) { m = NULL; if (pbits & PG_A) { @@ -1861,14 +1866,15 @@ if (m == NULL) m = PHYS_TO_VM_PAGE(pbits); vm_page_dirty(m); - pbits &= ~PG_M; } } - pbits &= ~PG_RW; + pbits &= ~(PG_RW | PG_M); - if (pbits != *pte) { - pte_store(pte, pbits); + if (pbits != obits) { + if (!atomic_cmpset_int((u_int *)pte, obits, + pbits)) + goto retry; anychanged = 1; } } ==== //depot/projects/smpng/sys/i386/include/pmap.h#23 (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/kern_conf.c,v 1.156 2004/08/30 01:10:20 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_conf.c,v 1.157 2004/09/13 07:29:44 phk Exp $"); #include #include @@ -293,7 +293,6 @@ si->__si_namebuf[0] = '\0'; si->si_name = si->__si_namebuf; LIST_INIT(&si->si_children); - TAILQ_INIT(&si->si_snapshots); return (si); } ==== //depot/projects/smpng/sys/kern/sched_4bsd.c#38 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.61 2004/09/10 21:04:38 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; /* nested count of 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; @@ -764,7 +763,6 @@ if ((p->p_flag & P_NOLOAD) == 0) sched_tdcnt--; - /* * We are volunteering to switch out so we get to nominate * a successor for the rest of our quantum ==== //depot/projects/smpng/sys/kern/sched_ule.c#42 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.126 2004/09/10 21:04:38 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; int ke_slice; struct runq *ke_runq; u_char ke_cpu; /* CPU that we have affinity for. */ ==== //depot/projects/smpng/sys/kern/vfs_bio.c#66 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_bio.c,v 1.444 2004/07/25 21:24:21 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_bio.c,v 1.445 2004/09/13 06:50:41 phk Exp $"); #include #include @@ -1234,8 +1234,7 @@ bp->b_ioflags &= ~BIO_ERROR; bdirty(bp); } else if ((bp->b_flags & (B_NOCACHE | B_INVAL)) || - (bp->b_ioflags & BIO_ERROR) || - bp->b_iocmd == BIO_DELETE || (bp->b_bufsize <= 0)) { + (bp->b_ioflags & BIO_ERROR) || (bp->b_bufsize <= 0)) { /* * Either a failed I/O or we were asked to free or not * cache the buffer. @@ -3130,12 +3129,6 @@ bp->b_flags |= B_DONE; runningbufwakeup(bp); - if (bp->b_iocmd == BIO_DELETE) { - brelse(bp); - splx(s); - return; - } - if (bp->b_iocmd == BIO_WRITE) { vwakeup(bp); } ==== //depot/projects/smpng/sys/kern/vnode_if.src#17 (text+ko) ==== @@ -27,7 +27,7 @@ # SUCH DAMAGE. # # @(#)vnode_if.src 8.12 (Berkeley) 5/14/95 -# $FreeBSD: src/sys/kern/vnode_if.src,v 1.67 2004/04/05 21:03:37 imp Exp $ +# $FreeBSD: src/sys/kern/vnode_if.src,v 1.68 2004/09/13 06:50:42 phk Exp $ # # @@ -478,20 +478,6 @@ }; # -#% freeblks vp - - - -# -# This call is used by the filesystem to release blocks back to -# device-driver. This is useful if the driver has a lengthy -# erase handling or similar. -# - -vop_freeblks { - IN struct vnode *vp; - IN daddr_t addr; - IN daddr_t length; -}; - -# #% getacl vp L L L # vop_getacl { ==== //depot/projects/smpng/sys/netgraph/ng_eiface.c#14 (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/smpng/sys/netinet/ip_fastfwd.c#10 (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/netinet/ip_fastfwd.c,v 1.19 2004/08/27 15:32:28 andre Exp $ + * $FreeBSD: src/sys/netinet/ip_fastfwd.c,v 1.20 2004/09/13 17:01:53 andre Exp $ */ /* @@ -465,14 +465,12 @@ if (in_localip(dest) || m->m_flags & M_FASTFWD_OURS) { #endif /* IPFIREWALL_FORWARD */ forwardlocal: - /* for ip_input */ - m->m_flags |= M_FASTFWD_OURS; - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); - /* - * Return packet for processing by ip_input() + * Return packet for processing by ip_input(). + * Keep host byte order as expected at ip_input's + * "ours"-label. */ + m->m_flags |= M_FASTFWD_OURS; if (ro.ro_rt) >>> TRUNCATED FOR MAIL (1000 lines) <<<