CVS commit: src/share/man/man8
Module Name:src Committed By: njoly Date: Fri Dec 2 08:50:18 UTC 2011 Modified Files: src/share/man/man8: MAKEDEV.8 Log Message: Regen to catch up recent changes (x68k/pow and iscsi). To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/share/man/man8/MAKEDEV.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man8/MAKEDEV.8 diff -u src/share/man/man8/MAKEDEV.8:1.41 src/share/man/man8/MAKEDEV.8:1.42 --- src/share/man/man8/MAKEDEV.8:1.41 Sat Sep 24 08:39:39 2011 +++ src/share/man/man8/MAKEDEV.8 Fri Dec 2 08:50:18 2011 @@ -6,7 +6,7 @@ .\ *** DO NOT EDIT - any changes will be lost!!! .\ *** -- .\ -.\ $NetBSD: MAKEDEV.8,v 1.41 2011/09/24 08:39:39 njoly Exp $ +.\ $NetBSD: MAKEDEV.8,v 1.42 2011/12/02 08:50:18 njoly Exp $ .\ .\ Copyright (c) 2001, 2003, 2007, 2008 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -35,7 +35,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd September 6, 2011 +.Dd December 2, 2011 .Dt MAKEDEV 8 .Os .Sh NAME @@ -799,8 +799,7 @@ PCI bus access devices, see . It Ar pf PF packet filter . It Ar pow# -Power management device (x68k), see -.Xr \x68k/pow 4 +Power management device (x68k) . It Ar putter Pass-to-Userspace Transporter . It Ar px# @@ -875,6 +874,11 @@ wscons event multiplexor, see . It Ar xenevt Xen event interface . El +.It iSCSI communication devices +. Bl -tag -width 0123456789 -compact +. It Ar iscsi# +ISCSI driver and /sbin/iscsid communication +. El .El .Sh ENVIRONMENT The following environment variables affect the execution of
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: skrll Date: Fri Dec 2 09:06:49 UTC 2011 Modified Files: src/libexec/ld.elf_so: reloc.c rtld.h Log Message: Restore backwards compatibility by removing unnecessary addition of dlvsym to Obj_Entry. Add some comments. To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/libexec/ld.elf_so/reloc.c cvs rdiff -u -r1.106 -r1.107 src/libexec/ld.elf_so/rtld.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/reloc.c diff -u src/libexec/ld.elf_so/reloc.c:1.104 src/libexec/ld.elf_so/reloc.c:1.105 --- src/libexec/ld.elf_so/reloc.c:1.104 Sat Jun 25 05:45:12 2011 +++ src/libexec/ld.elf_so/reloc.c Fri Dec 2 09:06:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: reloc.c,v 1.104 2011/06/25 05:45:12 nonaka Exp $ */ +/* $NetBSD: reloc.c,v 1.105 2011/12/02 09:06:49 skrll Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -39,7 +39,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: reloc.c,v 1.104 2011/06/25 05:45:12 nonaka Exp $); +__RCSID($NetBSD: reloc.c,v 1.105 2011/12/02 09:06:49 skrll Exp $); #endif /* not lint */ #include err.h @@ -210,10 +210,13 @@ _rtld_relocate_objects(Obj_Entry *first, obj-magic = RTLD_MAGIC; obj-version = RTLD_VERSION; - /* Fill in the dynamic linker entry points. */ + /* + * Fill in the backwards compatibility dynamic linker entry points. + * + * DO NOT ADD TO THIS LIST + */ obj-dlopen = dlopen; obj-dlsym = dlsym; - obj-dlvsym = dlvsym; obj-dlerror = dlerror; obj-dlclose = dlclose; obj-dladdr = dladdr; Index: src/libexec/ld.elf_so/rtld.h diff -u src/libexec/ld.elf_so/rtld.h:1.106 src/libexec/ld.elf_so/rtld.h:1.107 --- src/libexec/ld.elf_so/rtld.h:1.106 Sat Jun 25 05:45:12 2011 +++ src/libexec/ld.elf_so/rtld.h Fri Dec 2 09:06:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.106 2011/06/25 05:45:12 nonaka Exp $ */ +/* $NetBSD: rtld.h,v 1.107 2011/12/02 09:06:49 skrll Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -191,10 +191,14 @@ typedef struct Struct_Obj_Entry { void(*init)(void); /* Initialization function to call */ void(*fini)(void); /* Termination function to call */ - /* Entry points for dlopen() and friends. */ + /* + * BACKWARDS COMPAT Entry points for dlopen() and friends. + * + * DO NOT MOVE OR ADD TO THE LIST + * + */ void *(*dlopen)(const char *, int); void *(*dlsym)(void *, const char *); - void *(*dlvsym)(void *, const char *, const char *); char *(*dlerror)(void); int (*dlclose)(void *); int (*dladdr)(const void *, Dl_info *);
CVS commit: src
Module Name:src Committed By: skrll Date: Fri Dec 2 09:44:48 UTC 2011 Modified Files: src/external/gpl3/gcc/dist/gcc: ChangeLog src/external/gpl3/gcc/dist/gcc/config/pa: pa.c pa.h src/tools/gcc: Makefile Log Message: Pull across the fix for target/50691 ok'ed by mrg@ To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/ChangeLog cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/gcc/config/pa/pa.c \ src/external/gpl3/gcc/dist/gcc/config/pa/pa.h cvs rdiff -u -r1.46 -r1.47 src/tools/gcc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/ChangeLog diff -u src/external/gpl3/gcc/dist/gcc/ChangeLog:1.1.1.1 src/external/gpl3/gcc/dist/gcc/ChangeLog:1.2 --- src/external/gpl3/gcc/dist/gcc/ChangeLog:1.1.1.1 Tue Jun 21 01:19:58 2011 +++ src/external/gpl3/gcc/dist/gcc/ChangeLog Fri Dec 2 09:44:48 2011 @@ -1,3 +1,10 @@ +2011-10-29 John David Anglin dave.ang...@nrc-cnrc.gc.ca + + PR target/50691 + * config/pa/pa.c (emit_move_sequence): Legitimize TLS symbol references. + * config/pa/pa.h (LEGITIMATE_CONSTANT_P): Return false for + TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC symbol references. + 2011-04-28 Release Manager * GCC 4.5.3 released. Index: src/external/gpl3/gcc/dist/gcc/config/pa/pa.c diff -u src/external/gpl3/gcc/dist/gcc/config/pa/pa.c:1.2 src/external/gpl3/gcc/dist/gcc/config/pa/pa.c:1.3 --- src/external/gpl3/gcc/dist/gcc/config/pa/pa.c:1.2 Tue Jun 21 02:41:37 2011 +++ src/external/gpl3/gcc/dist/gcc/config/pa/pa.c Fri Dec 2 09:44:48 2011 @@ -1686,6 +1686,11 @@ emit_move_sequence (rtx *operands, enum /* Handle the most common case: storing into a register. */ else if (register_operand (operand0, mode)) { + /* Legitimize TLS symbol references. This happens for references + that aren't a legitimate constant. */ + if (PA_SYMBOL_REF_TLS_P (operand1)) + operand1 = legitimize_tls_address (operand1); + if (register_operand (operand1, mode) || (GET_CODE (operand1) == CONST_INT cint_ok_for_move (INTVAL (operand1))) Index: src/external/gpl3/gcc/dist/gcc/config/pa/pa.h diff -u src/external/gpl3/gcc/dist/gcc/config/pa/pa.h:1.2 src/external/gpl3/gcc/dist/gcc/config/pa/pa.h:1.3 --- src/external/gpl3/gcc/dist/gcc/config/pa/pa.h:1.2 Tue Jun 21 02:41:37 2011 +++ src/external/gpl3/gcc/dist/gcc/config/pa/pa.h Fri Dec 2 09:44:48 2011 @@ -891,6 +891,9 @@ extern int may_call_alloca; (NEW_HP_ASSEMBLER \ || TARGET_GAS \ || GET_CODE (X) != LABEL_REF)\ +(!PA_SYMBOL_REF_TLS_P (X) \ + || (SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_GLOBAL_DYNAMIC \ + SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_LOCAL_DYNAMIC)) \ (!TARGET_64BIT \ || GET_CODE (X) != CONST_DOUBLE)\ (!TARGET_64BIT \ Index: src/tools/gcc/Makefile diff -u src/tools/gcc/Makefile:1.46 src/tools/gcc/Makefile:1.47 --- src/tools/gcc/Makefile:1.46 Mon Sep 26 21:16:14 2011 +++ src/tools/gcc/Makefile Fri Dec 2 09:44:48 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.46 2011/09/26 21:16:14 christos Exp $ +# $NetBSD: Makefile,v 1.47 2011/12/02 09:44:48 skrll Exp $ .include bsd.own.mk @@ -37,7 +37,7 @@ COMMON_CONFIGURE_ARGS= --target=${MACHIN --enable-long-long \ --enable-threads \ --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html \ - --with-pkgversion=NetBSD nb1 20110620 \ + --with-pkgversion=NetBSD nb2 20111202 \ ${VAX_CONFIGURE_ARGS} \ --enable-__cxa_atexit .if defined(GCC_CONFIG_ARCH.${MACHINE_ARCH})
CVS commit: [matt-nb5-mips64] src/gnu
Module Name:src Committed By: matt Date: Fri Dec 2 10:08:44 UTC 2011 Modified Files: src/gnu/dist/binutils [matt-nb5-mips64]: config.sub src/gnu/dist/binutils/bfd [matt-nb5-mips64]: aoutx.h archures.c bfd-in2.h config.bfd cpu-mips.c elfxx-mips.c src/gnu/dist/binutils/binutils [matt-nb5-mips64]: readelf.c src/gnu/dist/binutils/gas [matt-nb5-mips64]: configure configure.tgt src/gnu/dist/binutils/gas/config [matt-nb5-mips64]: tc-mips.c src/gnu/dist/binutils/gas/doc [matt-nb5-mips64]: c-mips.texi src/gnu/dist/binutils/include/elf [matt-nb5-mips64]: mips.h src/gnu/dist/binutils/include/opcode [matt-nb5-mips64]: mips.h src/gnu/dist/binutils/ld [matt-nb5-mips64]: configure.tgt src/gnu/dist/binutils/opcodes [matt-nb5-mips64]: mips-dis.c mips-opc.c src/gnu/lib/libbfd/arch/alpha [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/arm [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/armeb [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/hppa [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/i386 [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/m68000 [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/m68k [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/mips64eb [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/mips64el [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/mipseb [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/mipsel [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/powerpc [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/powerpc64 [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/sh3eb [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/sh3el [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/sparc [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/sparc64 [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/vax [matt-nb5-mips64]: bfd.h src/gnu/lib/libbfd/arch/x86_64 [matt-nb5-mips64]: bfd.h Log Message: Merge support for NetLogic XLP processors. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.32.1 src/gnu/dist/binutils/config.sub cvs rdiff -u -r1.1.1.3.32.1 -r1.1.1.3.32.2 src/gnu/dist/binutils/bfd/aoutx.h \ src/gnu/dist/binutils/bfd/archures.c src/gnu/dist/binutils/bfd/bfd-in2.h \ src/gnu/dist/binutils/bfd/cpu-mips.c cvs rdiff -u -r1.14.24.3 -r1.14.24.4 src/gnu/dist/binutils/bfd/config.bfd cvs rdiff -u -r1.1.1.3.32.2 -r1.1.1.3.32.3 \ src/gnu/dist/binutils/bfd/elfxx-mips.c cvs rdiff -u -r1.2.32.1 -r1.2.32.2 src/gnu/dist/binutils/binutils/readelf.c cvs rdiff -u -r1.5 -r1.5.32.1 src/gnu/dist/binutils/gas/configure cvs rdiff -u -r1.2 -r1.2.32.1 src/gnu/dist/binutils/gas/configure.tgt cvs rdiff -u -r1.6.32.1 -r1.6.32.2 src/gnu/dist/binutils/gas/config/tc-mips.c cvs rdiff -u -r1.1.1.3.32.1 -r1.1.1.3.32.2 \ src/gnu/dist/binutils/gas/doc/c-mips.texi cvs rdiff -u -r1.1.1.3.32.1 -r1.1.1.3.32.2 \ src/gnu/dist/binutils/include/elf/mips.h cvs rdiff -u -r1.1.1.3.32.1 -r1.1.1.3.32.2 \ src/gnu/dist/binutils/include/opcode/mips.h cvs rdiff -u -r1.8.30.2 -r1.8.30.3 src/gnu/dist/binutils/ld/configure.tgt cvs rdiff -u -r1.1.1.3.32.1 -r1.1.1.3.32.2 \ src/gnu/dist/binutils/opcodes/mips-dis.c cvs rdiff -u -r1.1.1.3.32.4 -r1.1.1.3.32.5 \ src/gnu/dist/binutils/opcodes/mips-opc.c cvs rdiff -u -r1.6.32.1 -r1.6.32.2 src/gnu/lib/libbfd/arch/alpha/bfd.h cvs rdiff -u -r1.7.32.1 -r1.7.32.2 src/gnu/lib/libbfd/arch/arm/bfd.h cvs rdiff -u -r1.6.32.1 -r1.6.32.2 src/gnu/lib/libbfd/arch/armeb/bfd.h cvs rdiff -u -r1.5.32.1 -r1.5.32.2 src/gnu/lib/libbfd/arch/hppa/bfd.h cvs rdiff -u -r1.10.32.1 -r1.10.32.2 src/gnu/lib/libbfd/arch/i386/bfd.h cvs rdiff -u -r1.6.32.1 -r1.6.32.2 src/gnu/lib/libbfd/arch/m68000/bfd.h cvs rdiff -u -r1.7.32.1 -r1.7.32.2 src/gnu/lib/libbfd/arch/m68k/bfd.h cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/gnu/lib/libbfd/arch/mips64eb/bfd.h cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/gnu/lib/libbfd/arch/mips64el/bfd.h cvs rdiff -u -r1.7.32.1 -r1.7.32.2 src/gnu/lib/libbfd/arch/mipseb/bfd.h cvs rdiff -u -r1.7.32.1 -r1.7.32.2 src/gnu/lib/libbfd/arch/mipsel/bfd.h cvs rdiff -u -r1.8.32.1 -r1.8.32.2 src/gnu/lib/libbfd/arch/powerpc/bfd.h cvs rdiff -u -r1.1.32.1 -r1.1.32.2 src/gnu/lib/libbfd/arch/powerpc64/bfd.h cvs rdiff -u -r1.7.24.1 -r1.7.24.2 src/gnu/lib/libbfd/arch/sh3eb/bfd.h cvs rdiff -u -r1.7.24.1 -r1.7.24.2 src/gnu/lib/libbfd/arch/sh3el/bfd.h cvs rdiff -u -r1.8.32.1 -r1.8.32.2 src/gnu/lib/libbfd/arch/sparc/bfd.h cvs rdiff -u -r1.8.32.1 -r1.8.32.2 src/gnu/lib/libbfd/arch/sparc64/bfd.h cvs rdiff -u -r1.7.32.1 -r1.7.32.2 src/gnu/lib/libbfd/arch/vax/bfd.h cvs rdiff -u -r1.5.32.1 -r1.5.32.2 src/gnu/lib/libbfd/arch/x86_64/bfd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/binutils/config.sub diff -u src/gnu/dist/binutils/config.sub:1.4
CVS commit: src/sys/dev
Module Name:src Committed By: mrg Date: Fri Dec 2 10:42:51 UTC 2011 Modified Files: src/sys/dev: TODO.audiomp Log Message: update uaudio status To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/TODO.audiomp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/TODO.audiomp diff -u src/sys/dev/TODO.audiomp:1.10 src/sys/dev/TODO.audiomp:1.11 --- src/sys/dev/TODO.audiomp:1.10 Sat Nov 26 17:16:56 2011 +++ src/sys/dev/TODO.audiomp Fri Dec 2 10:42:50 2011 @@ -55,5 +55,5 @@ dev/pci/yds.c done dev/sbus/cs4231_sbus.c done port-sparc, port-sparc64 dev/sbus/dbri.c done port-sparc dev/tc/bba.c done -dev/usb/uaudio.c done port-amd64 +dev/usb/uaudio.c done port-amd64, hangs/crashes if mixerctl -a runs in a loop while playing dev/usb/umidi.c done midi1 @ umidi plays out midi0 @ pcppi, and then crashes at close
CVS commit: src/sys/dev
Module Name:src Committed By: mrg Date: Fri Dec 2 11:09:53 UTC 2011 Modified Files: src/sys/dev: TODO.audiomp Log Message: note that dreamcast/aica works, and that auixp does not. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/TODO.audiomp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/TODO.audiomp diff -u src/sys/dev/TODO.audiomp:1.11 src/sys/dev/TODO.audiomp:1.12 --- src/sys/dev/TODO.audiomp:1.11 Fri Dec 2 10:42:50 2011 +++ src/sys/dev/TODO.audiomp Fri Dec 2 11:09:52 2011 @@ -5,7 +5,7 @@ arch/amiga/dev/repulse.c done arch/amiga/dev/toccata.c done arch/arm/iomd/vidcaudio.c done port-acorn32 arch/arm/xscale/pxa2x0_ac97.c done -arch/dreamcast/dev/g2/aica.c done +arch/dreamcast/dev/g2/aica.c done port-dreamcast arch/hp700/gsc/harmony.c done port-hp700 arch/hpcmips/vr/vraiu.c done arch/macppc/dev/awacs.c done port-macppc @@ -34,7 +34,7 @@ dev/isapnp/mpu_isapnp.c done dev/pad/pad.c done dev/pci/auacer.c done dev/pci/auich.c done port-amd64 -dev/pci/auixp.c done +dev/pci/auixp.c done fails ac97.c:1937 KASSERT(mutex_owned(as-lock)); dev/pci/autri.c done port-sparc64 dev/pci/auvia.c done dev/pci/azalia.c done port-i386
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 2 12:29:36 UTC 2011 Modified Files: src/sys/kern: sched_4bsd.c Log Message: update a comment To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/kern/sched_4bsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sched_4bsd.c diff -u src/sys/kern/sched_4bsd.c:1.27 src/sys/kern/sched_4bsd.c:1.28 --- src/sys/kern/sched_4bsd.c:1.27 Wed Jul 27 14:35:34 2011 +++ src/sys/kern/sched_4bsd.c Fri Dec 2 12:29:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sched_4bsd.c,v 1.27 2011/07/27 14:35:34 uebayasi Exp $ */ +/* $NetBSD: sched_4bsd.c,v 1.28 2011/12/02 12:29:35 yamt Exp $ */ /*- * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sched_4bsd.c,v 1.27 2011/07/27 14:35:34 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: sched_4bsd.c,v 1.28 2011/12/02 12:29:35 yamt Exp $); #include opt_ddb.h #include opt_lockdebug.h @@ -374,18 +374,17 @@ resetpriority(struct lwp *l) } /* - * We adjust the priority of the current process. The priority of a process + * We adjust the priority of the current LWP. The priority of a LWP * gets worse as it accumulates CPU time. The CPU usage estimator (l_estcpu) - * is increased here. The formula for computing priorities (in kern_synch.c) - * will compute a different value each time l_estcpu increases. This can - * cause a switch, but unless the priority crosses a PPQ boundary the actual - * queue will not change. The CPU usage estimator ramps up quite quickly - * when the process is running (linearly), and decays away exponentially, at - * a rate which is proportionally slower when the system is busy. The basic - * principle is that the system will 90% forget that the process used a lot - * of CPU time in 5 * loadav seconds. This causes the system to favor - * processes which haven't run much recently, and to round-robin among other - * processes. + * is increased here. The formula for computing priorities will compute a + * different value each time l_estcpu increases. This can cause a switch, + * but unless the priority crosses a PPQ boundary the actual queue will not + * change. The CPU usage estimator ramps up quite quickly when the process + * is running (linearly), and decays away exponentially, at a rate which is + * proportionally slower when the system is busy. The basic principle is + * that the system will 90% forget that the process used a lot of CPU time + * in 5 * loadav seconds. This causes the system to favor processes which + * haven't run much recently, and to round-robin among other processes. */ void
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 2 12:30:14 UTC 2011 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: fix an indent an unwarp a short line. To generate a diff of this commit: cvs rdiff -u -r1.441 -r1.442 src/sys/kern/vfs_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.441 src/sys/kern/vfs_syscalls.c:1.442 --- src/sys/kern/vfs_syscalls.c:1.441 Fri Nov 18 21:17:45 2011 +++ src/sys/kern/vfs_syscalls.c Fri Dec 2 12:30:14 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.441 2011/11/18 21:17:45 christos Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.442 2011/12/02 12:30:14 yamt Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.441 2011/11/18 21:17:45 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.442 2011/12/02 12:30:14 yamt Exp $); #ifdef _KERNEL_OPT #include opt_fileassoc.h @@ -3569,10 +3569,9 @@ do_sys_rename(const char *from, const ch error = -1; else if (fromnd.ni_dvp == tdvp fromnd.ni_cnd.cn_namelen == tond.ni_cnd.cn_namelen - !memcmp(fromnd.ni_cnd.cn_nameptr, - tond.ni_cnd.cn_nameptr, + !memcmp(fromnd.ni_cnd.cn_nameptr, tond.ni_cnd.cn_nameptr, fromnd.ni_cnd.cn_namelen)) - error = -1; + error = -1; } /* * Prevent cross-mount operation.
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 2 12:31:03 UTC 2011 Modified Files: src/sys/kern: kern_runq.c Log Message: comments To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/kern/kern_runq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_runq.c diff -u src/sys/kern/kern_runq.c:1.32 src/sys/kern/kern_runq.c:1.33 --- src/sys/kern/kern_runq.c:1.32 Sun Aug 7 21:13:05 2011 +++ src/sys/kern/kern_runq.c Fri Dec 2 12:31:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_runq.c,v 1.32 2011/08/07 21:13:05 rmind Exp $ */ +/* $NetBSD: kern_runq.c,v 1.33 2011/12/02 12:31:03 yamt Exp $ */ /* * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius rmind at NetBSD org @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_runq.c,v 1.32 2011/08/07 21:13:05 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_runq.c,v 1.33 2011/12/02 12:31:03 yamt Exp $); #include sys/param.h #include sys/kernel.h @@ -638,6 +638,10 @@ no_migration: #else +/* + * stubs for !MULTIPROCESSOR + */ + struct cpu_info * sched_takecpu(struct lwp *l) { @@ -760,6 +764,10 @@ sched_nextlwp(void) return l; } +/* + * sched_curcpu_runnable_p: return if curcpu() should exit the idle loop. + */ + bool sched_curcpu_runnable_p(void) {
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 2 12:31:53 UTC 2011 Modified Files: src/sys/kern: kern_turnstile.c Log Message: move priority inheritance code to separate functions To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/kern/kern_turnstile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_turnstile.c diff -u src/sys/kern/kern_turnstile.c:1.30 src/sys/kern/kern_turnstile.c:1.31 --- src/sys/kern/kern_turnstile.c:1.30 Wed Jul 27 14:35:34 2011 +++ src/sys/kern/kern_turnstile.c Fri Dec 2 12:31:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_turnstile.c,v 1.30 2011/07/27 14:35:34 uebayasi Exp $ */ +/* $NetBSD: kern_turnstile.c,v 1.31 2011/12/02 12:31:53 yamt Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2009 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_turnstile.c,v 1.30 2011/07/27 14:35:34 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_turnstile.c,v 1.31 2011/12/02 12:31:53 yamt Exp $); #include sys/param.h #include sys/lockdebug.h @@ -195,87 +195,31 @@ turnstile_exit(wchan_t obj) } /* - * turnstile_block: + * turnstile_lendpri: + * + * Lend our priority to lwps on the blocking chain. + * * - * Enter an object into the turnstile chain and prepare the current - * LWP for sleep. */ -void -turnstile_block(turnstile_t *ts, int q, wchan_t obj, syncobj_t *sobj) -{ - lwp_t *l; - lwp_t *cur; /* cached curlwp */ - lwp_t *owner; - turnstile_t *ots; - tschain_t *tc; - sleepq_t *sq; - pri_t prio, obase; - - tc = turnstile_tab[TS_HASH(obj)]; - l = cur = curlwp; - KASSERT(q == TS_READER_Q || q == TS_WRITER_Q); - KASSERT(mutex_owned(tc-tc_mutex)); - KASSERT(l != NULL l-l_ts != NULL); - - if (ts == NULL) { - /* - * We are the first thread to wait for this object; - * lend our turnstile to it. - */ - ts = l-l_ts; - KASSERT(TS_ALL_WAITERS(ts) == 0); - KASSERT(TAILQ_EMPTY(ts-ts_sleepq[TS_READER_Q]) - TAILQ_EMPTY(ts-ts_sleepq[TS_WRITER_Q])); - ts-ts_obj = obj; - ts-ts_inheritor = NULL; - LIST_INSERT_HEAD(tc-tc_chain, ts, ts_chain); - } else { - /* - * Object already has a turnstile. Put our turnstile - * onto the free list, and reference the existing - * turnstile instead. - */ - ots = l-l_ts; - KASSERT(ots-ts_free == NULL); - ots-ts_free = ts-ts_free; - ts-ts_free = ots; - l-l_ts = ts; - - KASSERT(ts-ts_obj == obj); - KASSERT(TS_ALL_WAITERS(ts) != 0); - KASSERT(!TAILQ_EMPTY(ts-ts_sleepq[TS_READER_Q]) || - !TAILQ_EMPTY(ts-ts_sleepq[TS_WRITER_Q])); - } - - sq = ts-ts_sleepq[q]; - ts-ts_waiters[q]++; - sleepq_enter(sq, l, tc-tc_mutex); - LOCKDEBUG_BARRIER(tc-tc_mutex, 1); - l-l_kpriority = true; - obase = l-l_kpribase; - if (obase PRI_KTHREAD) - l-l_kpribase = PRI_KTHREAD; - sleepq_enqueue(sq, obj, tstile, sobj); - - /* - * Disable preemption across this entire block, as we may drop - * scheduler locks (allowing preemption), and would prefer not - * to be interrupted while in a state of flux. - */ - KPREEMPT_DISABLE(l); +static void +turnstile_lendpri(lwp_t *cur) +{ + lwp_t * l = cur; + pri_t prio; /* - * Lend our priority to lwps on the blocking chain. - * * NOTE: if you get a panic in this code block, it is likely that * a lock has been destroyed or corrupted while still in use. Try * compiling a kernel with LOCKDEBUG to pinpoint the problem. */ + + LOCKDEBUG_BARRIER(l-l_mutex, 1); + KASSERT(l == curlwp); prio = lwp_eprio(l); - KASSERT(cur == l); - KASSERT(tc-tc_mutex == cur-l_mutex); for (;;) { + lwp_t *owner; + turnstile_t *ts; bool dolock; if (l-l_wchan == NULL) @@ -337,10 +281,135 @@ turnstile_block(turnstile_t *ts, int q, lwp_lock(cur); } LOCKDEBUG_BARRIER(cur-l_mutex, 1); +} + +/* + * turnstile_unlendpri: undo turnstile_lendpri + */ + +static void +turnstile_unlendpri(turnstile_t *ts) +{ + lwp_t * const l = curlwp; + turnstile_t *iter; + turnstile_t *next; + turnstile_t *prev = NULL; + pri_t prio; + bool dolock; + + KASSERT(ts-ts_inheritor != NULL); + ts-ts_inheritor = NULL; + dolock = l-l_mutex == l-l_cpu-ci_schedstate.spc_lwplock; + if (dolock) { + lwp_lock(l); + } + + /* + * the following loop does two things. + * + * - remove ts from the list. + * + * - from the rest of the list, find the highest priority. + */ + + prio = -1; + KASSERT(!SLIST_EMPTY(l-l_pi_lenders)); + for (iter = SLIST_FIRST(l-l_pi_lenders); + iter != NULL; iter = next) { + KASSERT(lwp_eprio(l) = ts-ts_eprio); + next = SLIST_NEXT(iter, ts_pichain); + if (iter == ts) { + if (prev == NULL) { +SLIST_REMOVE_HEAD(l-l_pi_lenders, +ts_pichain); + } else { +SLIST_REMOVE_AFTER(prev, ts_pichain); + } + } else if (prio iter-ts_eprio) { + prio = iter-ts_eprio; + } + prev = iter; + } + + lwp_lendpri(l, prio); + if (dolock) { + lwp_unlock(l); + } +} + +/* + * turnstile_block: + * + * Enter an
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 2 12:32:38 UTC 2011 Modified Files: src/sys/kern: vfs_subr.c Log Message: assertions To generate a diff of this commit: cvs rdiff -u -r1.425 -r1.426 src/sys/kern/vfs_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_subr.c diff -u src/sys/kern/vfs_subr.c:1.425 src/sys/kern/vfs_subr.c:1.426 --- src/sys/kern/vfs_subr.c:1.425 Thu Sep 1 09:04:08 2011 +++ src/sys/kern/vfs_subr.c Fri Dec 2 12:32:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_subr.c,v 1.425 2011/09/01 09:04:08 christos Exp $ */ +/* $NetBSD: vfs_subr.c,v 1.426 2011/12/02 12:32:38 yamt Exp $ */ /*- * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.425 2011/09/01 09:04:08 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.426 2011/12/02 12:32:38 yamt Exp $); #include opt_ddb.h #include opt_compat_netbsd.h @@ -166,6 +166,7 @@ vinvalbuf(struct vnode *vp, int flags, k mutex_enter(bufcache_lock); restart: for (bp = LIST_FIRST(vp-v_dirtyblkhd); bp; bp = nbp) { + KASSERT(bp-b_vp == vp); nbp = LIST_NEXT(bp, b_vnbufs); error = bbusy(bp, catch, slptimeo, NULL); if (error != 0) { @@ -178,6 +179,7 @@ restart: } for (bp = LIST_FIRST(vp-v_cleanblkhd); bp; bp = nbp) { + KASSERT(bp-b_vp == vp); nbp = LIST_NEXT(bp, b_vnbufs); error = bbusy(bp, catch, slptimeo, NULL); if (error != 0) { @@ -236,6 +238,7 @@ vtruncbuf(struct vnode *vp, daddr_t lbn, mutex_enter(bufcache_lock); restart: for (bp = LIST_FIRST(vp-v_dirtyblkhd); bp; bp = nbp) { + KASSERT(bp-b_vp == vp); nbp = LIST_NEXT(bp, b_vnbufs); if (bp-b_lblkno lbn) continue; @@ -250,6 +253,7 @@ restart: } for (bp = LIST_FIRST(vp-v_cleanblkhd); bp; bp = nbp) { + KASSERT(bp-b_vp == vp); nbp = LIST_NEXT(bp, b_vnbufs); if (bp-b_lblkno lbn) continue; @@ -285,6 +289,7 @@ vflushbuf(struct vnode *vp, int sync) loop: mutex_enter(bufcache_lock); for (bp = LIST_FIRST(vp-v_dirtyblkhd); bp; bp = nbp) { + KASSERT(bp-b_vp == vp); nbp = LIST_NEXT(bp, b_vnbufs); if ((bp-b_cflags BC_BUSY)) continue;
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Fri Dec 2 12:38:59 UTC 2011 Modified Files: src/sys/kern: vfs_wapbl.c Log Message: - move disk cache flushing code into a separate function. - more verbose output if vfs.wapbl.verbose_commit = 2. namely, time taken for each DIOCCACHESYNC calls. wapbl_flush: 1322826000.785245900 this transaction = 546304 bytes wapbl_cache_sync: 1: dev 0x0 0.017572724 wapbl_cache_sync: 2: dev 0x0 0.007199825 wapbl_flush: 1322826011.860771302 this transaction = 431104 bytes wapbl_cache_sync: 1: dev 0x0 0.019469753 wapbl_cache_sync: 2: dev 0x0 0.009473410 wapbl_flush: 1322829266.489154342 this transaction = 187904 bytes wapbl_cache_sync: 1: dev 0x4 0.022270180 wapbl_cache_sync: 2: dev 0x4 0.030749402 - fix a comment. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/kern/vfs_wapbl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_wapbl.c diff -u src/sys/kern/vfs_wapbl.c:1.47 src/sys/kern/vfs_wapbl.c:1.48 --- src/sys/kern/vfs_wapbl.c:1.47 Thu Sep 1 09:03:43 2011 +++ src/sys/kern/vfs_wapbl.c Fri Dec 2 12:38:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_wapbl.c,v 1.47 2011/09/01 09:03:43 christos Exp $ */ +/* $NetBSD: vfs_wapbl.c,v 1.48 2011/12/02 12:38:59 yamt Exp $ */ /*- * Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #define WAPBL_INTERNAL #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.47 2011/09/01 09:03:43 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_wapbl.c,v 1.48 2011/12/02 12:38:59 yamt Exp $); #include sys/param.h #include sys/bitops.h @@ -1903,11 +1903,49 @@ wapbl_transaction_len(struct wapbl *wl) } /* + * wapbl_cache_sync: issue DIOCCACHESYNC + */ +static int +wapbl_cache_sync(struct wapbl *wl, const char *msg) +{ + const bool verbose = wapbl_verbose_commit = 2; + struct bintime start_time; + int force = 1; + int error; + + if (!wapbl_flush_disk_cache) { + return 0; + } + if (verbose) { + bintime(start_time); + } + error = VOP_IOCTL(wl-wl_devvp, DIOCCACHESYNC, force, + FWRITE, FSCRED); + if (error) { + WAPBL_PRINTF(WAPBL_PRINT_ERROR, + (wapbl_cache_sync: DIOCCACHESYNC on dev 0x%x + returned %d\n, wl-wl_devvp-v_rdev, error)); + } + if (verbose) { + struct bintime d; + struct timespec ts; + + bintime(d); + bintime_sub(d, start_time); + bintime2timespec(d, ts); + printf(wapbl_cache_sync: %s: dev 0x%jx %ju.%09lu\n, + msg, (uintmax_t)wl-wl_devvp-v_rdev, + (uintmax_t)ts.tv_sec, ts.tv_nsec); + } + return error; +} + +/* * Perform commit operation * * Note that generation number incrementation needs to * be protected against racing with other invocations - * of wapbl_commit. This is ok since this routine + * of wapbl_write_commit. This is ok since this routine * is only invoked from wapbl_flush */ static int @@ -1916,19 +1954,10 @@ wapbl_write_commit(struct wapbl *wl, off struct wapbl_wc_header *wc = wl-wl_wc_header; struct timespec ts; int error; - int force = 1; daddr_t pbn; - if (wapbl_flush_disk_cache) { - /* XXX Calc checksum here, instead we do this for now */ - error = VOP_IOCTL(wl-wl_devvp, DIOCCACHESYNC, force, - FWRITE, FSCRED); - if (error) { - WAPBL_PRINTF(WAPBL_PRINT_ERROR, - (wapbl_write_commit: DIOCCACHESYNC on dev 0x%x - returned %d\n, wl-wl_devvp-v_rdev, error)); - } - } + /* XXX Calc checksum here, instead we do this for now */ + wapbl_cache_sync(wl, 1); wc-wc_head = head; wc-wc_tail = tail; @@ -1955,15 +1984,7 @@ wapbl_write_commit(struct wapbl *wl, off if (error) return error; - if (wapbl_flush_disk_cache) { - error = VOP_IOCTL(wl-wl_devvp, DIOCCACHESYNC, force, - FWRITE, FSCRED); - if (error) { - WAPBL_PRINTF(WAPBL_PRINT_ERROR, - (wapbl_write_commit: DIOCCACHESYNC on dev 0x%x - returned %d\n, wl-wl_devvp-v_rdev, error)); - } - } + wapbl_cache_sync(wl, 2); /* * If the generation number was zero, write it out a second time.
CVS commit: src/sys/dev
Module Name:src Committed By: reinoud Date: Fri Dec 2 13:36:18 UTC 2011 Modified Files: src/sys/dev: TODO.audiomp Log Message: Update status on auixp on i386 To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/TODO.audiomp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/TODO.audiomp diff -u src/sys/dev/TODO.audiomp:1.12 src/sys/dev/TODO.audiomp:1.13 --- src/sys/dev/TODO.audiomp:1.12 Fri Dec 2 11:09:52 2011 +++ src/sys/dev/TODO.audiomp Fri Dec 2 13:36:17 2011 @@ -34,7 +34,7 @@ dev/isapnp/mpu_isapnp.c done dev/pad/pad.c done dev/pci/auacer.c done dev/pci/auich.c done port-amd64 -dev/pci/auixp.c done fails ac97.c:1937 KASSERT(mutex_owned(as-lock)); +dev/pci/auixp.c done port-i386 dev/pci/autri.c done port-sparc64 dev/pci/auvia.c done dev/pci/azalia.c done port-i386
CVS commit: src/share/man/man4/man4.x86
Module Name:src Committed By: wiz Date: Fri Dec 2 14:38:52 UTC 2011 Modified Files: src/share/man/man4/man4.x86: tprof_amdpmi.4 tprof_pmi.4 Log Message: Wording improvements. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.x86/tprof_amdpmi.4 \ src/share/man/man4/man4.x86/tprof_pmi.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.x86/tprof_amdpmi.4 diff -u src/share/man/man4/man4.x86/tprof_amdpmi.4:1.1 src/share/man/man4/man4.x86/tprof_amdpmi.4:1.2 --- src/share/man/man4/man4.x86/tprof_amdpmi.4:1.1 Fri Dec 2 12:17:51 2011 +++ src/share/man/man4/man4.x86/tprof_amdpmi.4 Fri Dec 2 14:38:51 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: tprof_amdpmi.4,v 1.1 2011/12/02 12:17:51 yamt Exp $ +.\ $NetBSD: tprof_amdpmi.4,v 1.2 2011/12/02 14:38:51 wiz Exp $ .\ .\ Copyright (c)2011 YAMAMOTO Takashi, .\ All rights reserved. @@ -42,11 +42,11 @@ The driver is a .Xr tprof 4 backend driver, which uses performance-monitoring events available for -some of AMD processors. +some AMD processors. .Pp It programs the processors so that CPU Clocks not Halted events -(event select 0x76) to raise NMIs and the NMI handler collects -a sample. +(event select 0x76) to raise NMIs and the NMI handler collect +samples. .\ .\.Sh EXAMPLES .\ Index: src/share/man/man4/man4.x86/tprof_pmi.4 diff -u src/share/man/man4/man4.x86/tprof_pmi.4:1.1 src/share/man/man4/man4.x86/tprof_pmi.4:1.2 --- src/share/man/man4/man4.x86/tprof_pmi.4:1.1 Fri Dec 2 12:17:51 2011 +++ src/share/man/man4/man4.x86/tprof_pmi.4 Fri Dec 2 14:38:51 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: tprof_pmi.4,v 1.1 2011/12/02 12:17:51 yamt Exp $ +.\ $NetBSD: tprof_pmi.4,v 1.2 2011/12/02 14:38:51 wiz Exp $ .\ .\ Copyright (c)2011 YAMAMOTO Takashi, .\ All rights reserved. @@ -45,8 +45,8 @@ backend driver, which uses performance-m Intel Pentium 4 (NetBurst) processors. .Pp It programs the processors so that global_power_events events -(ESCR Event Select = 0x13) to raise NMIs and the NMI handler collects -a sample. +(ESCR Event Select = 0x13) to raise NMIs and the NMI handler collect +samples. .\ .\.Sh EXAMPLES .\
CVS commit: src/etc/etc.luna68k
Module Name:src Committed By: tsutsui Date: Fri Dec 2 16:01:50 UTC 2011 Modified Files: src/etc/etc.luna68k: MAKEDEV.conf Log Message: - create scsibus1 for external SCSI bus on LUNA-II - also create sd1 sd2 sd3 cd0 cd1 st1 devices on all_md To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/etc/etc.luna68k/MAKEDEV.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.luna68k/MAKEDEV.conf diff -u src/etc/etc.luna68k/MAKEDEV.conf:1.5 src/etc/etc.luna68k/MAKEDEV.conf:1.6 --- src/etc/etc.luna68k/MAKEDEV.conf:1.5 Sat Jul 16 15:52:21 2011 +++ src/etc/etc.luna68k/MAKEDEV.conf Fri Dec 2 16:01:50 2011 @@ -1,9 +1,9 @@ -# $NetBSD: MAKEDEV.conf,v 1.5 2011/07/16 15:52:21 tsutsui Exp $ +# $NetBSD: MAKEDEV.conf,v 1.6 2011/12/02 16:01:50 tsutsui Exp $ all_md) - makedev ttya sd0 st0 + makedev ttya sd0 sd1 sd2 sd3 cd0 cd1 st0 st1 makedev wscons - makedev scsibus0 + makedev scsibus0 scsibus1 ;; tty[ab]) @@ -18,5 +18,5 @@ ramdisk) makedev std sd0 sd1 cd0 st0 st1 md0 makedev opty ttya makedev ttyEcfg ttyE0 wskbd0 - makedev scsibus0 + makedev scsibus0 scsibus1 ;;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: tsutsui Date: Fri Dec 2 16:17:04 UTC 2011 Modified Files: src/sys/dev/ic: mb89352.c Log Message: Define NO_MANUAL_XFER on luna68k as temporary workaround for hangup problem during probing old drives like DK312C in OMRON LUNA machines. I'll check this MSGIN xfer problem later. (NO_MANUAL_XFER also caused hang on heavy load on hp300 with multiple drives) To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/dev/ic/mb89352.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/mb89352.c diff -u src/sys/dev/ic/mb89352.c:1.52 src/sys/dev/ic/mb89352.c:1.53 --- src/sys/dev/ic/mb89352.c:1.52 Tue Jul 27 14:34:34 2010 +++ src/sys/dev/ic/mb89352.c Fri Dec 2 16:17:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mb89352.c,v 1.52 2010/07/27 14:34:34 jakllsch Exp $ */ +/* $NetBSD: mb89352.c,v 1.53 2011/12/02 16:17:04 tsutsui Exp $ */ /* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */ /*- @@ -77,7 +77,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mb89352.c,v 1.52 2010/07/27 14:34:34 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: mb89352.c,v 1.53 2011/12/02 16:17:04 tsutsui Exp $); #ifdef DDB #define integrate @@ -127,6 +127,9 @@ __KERNEL_RCSID(0, $NetBSD: mb89352.c,v /* threshold length for DMA transfer */ #define SPC_MIN_DMA_LEN 32 +#ifdef luna68k /* XXX old drives like DK312C in LUNAs require this */ +#define NO_MANUAL_XFER +#endif #ifdef x68k /* XXX it seems x68k SPC SCSI hardware has some quirks */ #define NEED_DREQ_ON_HARDWARE_XFER #define NO_MANUAL_XFER
CVS commit: [yamt-pagecache] src/sys/arch/sparc64
Module Name:src Committed By: yamt Date: Fri Dec 2 16:33:10 UTC 2011 Modified Files: src/sys/arch/sparc64/include [yamt-pagecache]: pmap.h src/sys/arch/sparc64/sparc64 [yamt-pagecache]: pmap.c Log Message: adapt sparc64. compile tested. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.55.2.1 src/sys/arch/sparc64/include/pmap.h cvs rdiff -u -r1.275 -r1.275.2.1 src/sys/arch/sparc64/sparc64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/include/pmap.h diff -u src/sys/arch/sparc64/include/pmap.h:1.55 src/sys/arch/sparc64/include/pmap.h:1.55.2.1 --- src/sys/arch/sparc64/include/pmap.h:1.55 Thu Oct 6 06:55:34 2011 +++ src/sys/arch/sparc64/include/pmap.h Fri Dec 2 16:33:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.55 2011/10/06 06:55:34 mrg Exp $ */ +/* $NetBSD: pmap.h,v 1.55.2.1 2011/12/02 16:33:09 yamt Exp $ */ /*- * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -118,10 +118,8 @@ extern struct page_size_map page_size_ma #endif struct pmap { - struct uvm_object pm_obj; - kmutex_t pm_obj_lock; -#define pm_lock pm_obj.vmobjlock -#define pm_refs pm_obj.uo_refs + unsigned int pm_refs; + TAILQ_HEAD(, vm_page) pm_ptps; LIST_ENTRY(pmap) pm_list[PMAP_LIST_MAXNUMCPU]; /* per cpu ctx used list */ struct pmap_statistics pm_stats; Index: src/sys/arch/sparc64/sparc64/pmap.c diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.275 src/sys/arch/sparc64/sparc64/pmap.c:1.275.2.1 --- src/sys/arch/sparc64/sparc64/pmap.c:1.275 Tue Jul 12 07:51:34 2011 +++ src/sys/arch/sparc64/sparc64/pmap.c Fri Dec 2 16:33:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.275 2011/07/12 07:51:34 mrg Exp $ */ +/* $NetBSD: pmap.c,v 1.275.2.1 2011/12/02 16:33:09 yamt Exp $ */ /* * * Copyright (C) 1996-1999 Eduardo Horvath. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.275 2011/07/12 07:51:34 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.275.2.1 2011/12/02 16:33:09 yamt Exp $); #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ #define HWREF @@ -1379,10 +1379,8 @@ pmap_create(void) memset(pm, 0, sizeof *pm); DPRINTF(PDB_CREATE, (pmap_create(): created %p\n, pm)); - mutex_init(pm-pm_obj_lock, MUTEX_DEFAULT, IPL_NONE); - uvm_obj_init(pm-pm_obj, NULL, false, 1); - uvm_obj_setlock(pm-pm_obj, pm-pm_obj_lock); - + pm-pm_refs = 1; + TAILQ_INIT(pm-pm_ptps); if (pm != pmap_kernel()) { while (!pmap_get_page(pm-pm_physaddr)) { uvm_wait(pmap_create); @@ -1416,7 +1414,7 @@ pmap_destroy(struct pmap *pm) #else #define pmap_cpus_active 0 #endif - struct vm_page *pg, *nextpg; + struct vm_page *pg; if ((int)atomic_dec_uint_nv(pm-pm_refs) 0) { return; @@ -1444,22 +1442,18 @@ pmap_destroy(struct pmap *pm) #endif /* we could be a little smarter and leave pages zeroed */ - for (pg = TAILQ_FIRST(pm-pm_obj.memq); pg != NULL; pg = nextpg) { + while ((pg = TAILQ_FIRST(pm-pm_ptps)) != NULL) { #ifdef DIAGNOSTIC struct vm_page_md *md = VM_PAGE_TO_MD(pg); #endif - KASSERT((pg-flags PG_MARKER) == 0); - nextpg = TAILQ_NEXT(pg, listq.queue); - TAILQ_REMOVE(pm-pm_obj.memq, pg, listq.queue); + TAILQ_REMOVE(pm-pm_ptps, pg, pageq.queue); KASSERT(md-mdpg_pvh.pv_pmap == NULL); dcache_flush_page_cpuset(VM_PAGE_TO_PHYS(pg), pmap_cpus_active); uvm_pagefree(pg); } pmap_free_page((paddr_t)(u_long)pm-pm_segs, pmap_cpus_active); - uvm_obj_destroy(pm-pm_obj, false); - mutex_destroy(pm-pm_obj_lock); pool_cache_put(pmap_cache, pm); } @@ -1809,7 +1803,7 @@ pmap_enter(struct pmap *pm, vaddr_t va, ptpg = PHYS_TO_VM_PAGE(ptp); if (ptpg) { ptpg-offset = (uint64_t)va (0xfLL 23); - TAILQ_INSERT_TAIL(pm-pm_obj.memq, ptpg, listq.queue); + TAILQ_INSERT_TAIL(pm-pm_ptps, ptpg, pageq.queue); } else { KASSERT(pm == pmap_kernel()); } @@ -1821,7 +1815,7 @@ pmap_enter(struct pmap *pm, vaddr_t va, ptpg = PHYS_TO_VM_PAGE(ptp); if (ptpg) { ptpg-offset = (((uint64_t)va 43) 0x3ffLL) 13; - TAILQ_INSERT_TAIL(pm-pm_obj.memq, ptpg, listq.queue); + TAILQ_INSERT_TAIL(pm-pm_ptps, ptpg, pageq.queue); } else { KASSERT(pm == pmap_kernel()); }
CVS commit: [yamt-pagecache] src/sys/arch/hppa/hppa
Module Name:src Committed By: yamt Date: Fri Dec 2 16:33:59 UTC 2011 Modified Files: src/sys/arch/hppa/hppa [yamt-pagecache]: pmap.c Log Message: adapt hp700. compile tested. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.81.2.1 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.81 src/sys/arch/hppa/hppa/pmap.c:1.81.2.1 --- src/sys/arch/hppa/hppa/pmap.c:1.81 Sun Jun 12 03:35:41 2011 +++ src/sys/arch/hppa/hppa/pmap.c Fri Dec 2 16:33:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.81 2011/06/12 03:35:41 rmind Exp $ */ +/* $NetBSD: pmap.c,v 1.81.2.1 2011/12/02 16:33:59 yamt Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.81 2011/06/12 03:35:41 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.81.2.1 2011/12/02 16:33:59 yamt Exp $); #include opt_cputype.h @@ -76,6 +76,7 @@ __KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.8 #include sys/mutex.h #include uvm/uvm.h +#include uvm/uvm_page_array.h #include machine/reg.h #include machine/psl.h @@ -393,7 +394,7 @@ pmap_pde_release(pmap_t pmap, vaddr_t va pmap_pde_set(pmap, va, 0); pmap-pm_stats.resident_count--; if (pmap-pm_ptphint == ptp) - pmap-pm_ptphint = TAILQ_FIRST(pmap-pm_obj.memq); + pmap-pm_ptphint = NULL; ptp-wire_count = 0; KASSERT((ptp-flags PG_BUSY) == 0); @@ -1087,7 +1088,9 @@ void pmap_destroy(pmap_t pmap) { #ifdef DIAGNOSTIC + struct uvm_page_array a; struct vm_page *pg; + off_t off; #endif int refs; @@ -1101,11 +1104,17 @@ pmap_destroy(pmap_t pmap) return; #ifdef DIAGNOSTIC - while ((pg = TAILQ_FIRST(pmap-pm_obj.memq))) { + uvm_page_array_init(a); + off = 0; + mutex_enter(pmap-pm_lock); + while ((pg = uvm_page_array_fill_and_peek(a, pmap-pm_obj, off, 0, 0)) + != NULL) { pt_entry_t *pde, *epde; struct vm_page *sheep; struct pv_entry *haggis; + off = pg-offset + PAGE_SIZE; + uvm_page_array_advance(a); if (pg == pmap-pm_pdir_pg) continue; @@ -1141,6 +1150,8 @@ pmap_destroy(pmap_t pmap) } DPRINTF(PDB_FOLLOW, (\n)); } + mutex_exit(pmap-pm_lock); + uvm_page_array_fini(a); #endif pmap_sdir_set(pmap-pm_space, 0); mutex_enter(pmap-pm_lock);
CVS commit: src/doc
Module Name:src Committed By: yamt Date: Fri Dec 2 16:37:43 UTC 2011 Modified Files: src/doc: BRANCHES Log Message: yamt-pagecache: update To generate a diff of this commit: cvs rdiff -u -r1.316 -r1.317 src/doc/BRANCHES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/BRANCHES diff -u src/doc/BRANCHES:1.316 src/doc/BRANCHES:1.317 --- src/doc/BRANCHES:1.316 Sat Nov 26 15:55:18 2011 +++ src/doc/BRANCHES Fri Dec 2 16:37:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: BRANCHES,v 1.316 2011/11/26 15:55:18 yamt Exp $ +# $NetBSD: BRANCHES,v 1.317 2011/12/02 16:37:43 yamt Exp $ # # This file contains a list of branches that exist in the NetBSD CVS # tree and their current state. @@ -605,17 +605,15 @@ Notes: - maintain object pages in radix - fix nfs commit range tracking. - fix nfs write clustering. XXX hack + TODO: + - benchmark + - test + - make the write clustering fix less kludgy and work + for backward clustering + tested: i386, amd64, nfs, ffs - sparc64 pmap - some mechanical changes are necessary. - stop using uvm_object. a TAILQ linked with - pageq.queue should be enough. - remove PG_MARKER assertion. - - hppa pmap - some mechanical changes are necessary. - use uvm_page_array_* instead of TAILQ_FOREACH memq. + have good chances to be broken: lfs, sparc64, hp700 Branch: reinoud-bufcleanup Description: implement and evaluate struct buf usage cleanup strategies.
CVS commit: [yamt-pagecache] src/share/man/man9
Module Name:src Committed By: yamt Date: Fri Dec 2 16:54:32 UTC 2011 Modified Files: src/share/man/man9 [yamt-pagecache]: uvm.9 Log Message: update To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.106.4.1 src/share/man/man9/uvm.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/uvm.9 diff -u src/share/man/man9/uvm.9:1.106 src/share/man/man9/uvm.9:1.106.4.1 --- src/share/man/man9/uvm.9:1.106 Wed Jun 1 02:22:18 2011 +++ src/share/man/man9/uvm.9 Fri Dec 2 16:54:32 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: uvm.9,v 1.106 2011/06/01 02:22:18 rmind Exp $ +.\ $NetBSD: uvm.9,v 1.106.4.1 2011/12/02 16:54:32 yamt Exp $ .\ .\ Copyright (c) 1998 Matthew R. Green .\ All rights reserved. @@ -189,6 +189,11 @@ being lower than causes the returned page to be filled with zeroes, either by allocating it from a pool of pre-zeroed pages or by zeroing it in-line as necessary. .Pp +While +.Fn uvm_pagealloc +does never wait for memory available by itself, it can block for mutexes +internally. +.Pp .Fn uvm_pagerealloc reallocates page .Fa pg @@ -196,6 +201,15 @@ to a new object .Fa newobj , at a new offset .Fa newoff . +If the +.Fa newobj +is +.Dv NULL , +.Fa newoff +is ignored and the page +.Fa pg +is just detached from the current object. +Currently, only the latter case is implemented. .Pp .Fn uvm_pagefree frees the physical page
CVS commit: src/sys/arch/hpcmips/tx
Module Name:src Committed By: shattered Date: Fri Dec 2 18:07:26 UTC 2011 Modified Files: src/sys/arch/hpcmips/tx: tx39.c Log Message: PR/32394 -- Don't define 'panic' label unconditionally, or minimal mobilepro 780 kernel configuration will not build. OK by wiz@ To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/hpcmips/tx/tx39.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/tx/tx39.c diff -u src/sys/arch/hpcmips/tx/tx39.c:1.43 src/sys/arch/hpcmips/tx/tx39.c:1.44 --- src/sys/arch/hpcmips/tx/tx39.c:1.43 Sat Feb 26 12:07:45 2011 +++ src/sys/arch/hpcmips/tx/tx39.c Fri Dec 2 18:07:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tx39.c,v 1.43 2011/02/26 12:07:45 tsutsui Exp $ */ +/* $NetBSD: tx39.c,v 1.44 2011/12/02 18:07:26 shattered Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tx39.c,v 1.43 2011/02/26 12:07:45 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: tx39.c,v 1.44 2011/12/02 18:07:26 shattered Exp $); #include opt_vr41xx.h #include opt_tx39xx.h @@ -285,7 +285,9 @@ tx_cons_init(void) } return; +#if (NM38813C 0) || (NTC5165BUF 0) panic: +#endif panic(tx_cons_init: can't init console); /* NOTREACHED */ }
CVS commit: src/external/gpl3/gcc/lib/crtstuff
Module Name:src Committed By: macallan Date: Fri Dec 2 22:28:47 UTC 2011 Modified Files: src/external/gpl3/gcc/lib/crtstuff: Makefile Log Message: actually pass $COPTS to the compiler ok mrg@ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/lib/crtstuff/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/crtstuff/Makefile diff -u src/external/gpl3/gcc/lib/crtstuff/Makefile:1.5 src/external/gpl3/gcc/lib/crtstuff/Makefile:1.6 --- src/external/gpl3/gcc/lib/crtstuff/Makefile:1.5 Fri Jul 1 05:07:46 2011 +++ src/external/gpl3/gcc/lib/crtstuff/Makefile Fri Dec 2 22:28:47 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2011/07/01 05:07:46 mrg Exp $ +# $NetBSD: Makefile,v 1.6 2011/12/02 22:28:47 macallan Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -61,7 +61,7 @@ ${OBJS}: ${DPSRCS} # Override the default .c - .o rule. .c.o: ${_MKTARGET_COMPILE} - ${CC} ${CPPFLAGS} ${CPPFLAGS.${.TARGET}} ${GCFLAGS} ${CPUFLAGS} -c ${.IMPSRC} -o ${.TARGET}.o + ${CC} ${CPPFLAGS} ${CPPFLAGS.${.TARGET}} ${GCFLAGS} ${COPTS} ${COPTS.${.TARGET}} ${CPUFLAGS} -c ${.IMPSRC} -o ${.TARGET}.o mv ${.TARGET}.o ${.TARGET} .if (${MACHINE_ARCH} == mips64eb) || (${MACHINE_ARCH} == mips64el)
CVS commit: src/sys/ddb
Module Name:src Committed By: christos Date: Fri Dec 2 23:57:59 UTC 2011 Modified Files: src/sys/ddb: db_xxx.c Log Message: deal with the proc_lock mutex. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/ddb/db_xxx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ddb/db_xxx.c diff -u src/sys/ddb/db_xxx.c:1.64 src/sys/ddb/db_xxx.c:1.65 --- src/sys/ddb/db_xxx.c:1.64 Sat Jun 11 23:35:51 2011 +++ src/sys/ddb/db_xxx.c Fri Dec 2 18:57:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: db_xxx.c,v 1.64 2011/06/12 03:35:51 rmind Exp $ */ +/* $NetBSD: db_xxx.c,v 1.65 2011/12/02 23:57:58 christos Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1993 @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: db_xxx.c,v 1.64 2011/06/12 03:35:51 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: db_xxx.c,v 1.65 2011/12/02 23:57:58 christos Exp $); #ifdef _KERNEL_OPT #include opt_kgdb.h @@ -106,8 +106,11 @@ db_kill_proc(db_expr_t addr, bool haddr, db_error(?\n); /*NOTREACHED*/ } - + /* We might stop when the mutex is held or when not */ + t = mutex_tryenter(proc_lock); p = proc_find((pid_t)pid); + if (t) + mutex_exit(proc_lock); if (p == NULL) { db_error(no such proc\n); /*NOTREACHED*/
CVS commit: [matt-nb5-mips64] src/sys
Module Name:src Committed By: matt Date: Sat Dec 3 01:44:04 UTC 2011 Modified Files: src/sys/arch/mips/conf [matt-nb5-mips64]: kern.ldscript src/sys/arch/mips/include [matt-nb5-mips64]: mips_param.h src/sys/net [matt-nb5-mips64]: if_gre.h src/sys/sys [matt-nb5-mips64]: cdefs_elf.h Log Message: Add __cacheline_aligned and __read_mostly from -HEAD. To generate a diff of this commit: cvs rdiff -u -r1.5.78.1 -r1.5.78.2 src/sys/arch/mips/conf/kern.ldscript cvs rdiff -u -r1.23.78.7 -r1.23.78.8 src/sys/arch/mips/include/mips_param.h cvs rdiff -u -r1.39 -r1.39.12.1 src/sys/net/if_gre.h cvs rdiff -u -r1.30 -r1.30.12.1 src/sys/sys/cdefs_elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/conf/kern.ldscript diff -u src/sys/arch/mips/conf/kern.ldscript:1.5.78.1 src/sys/arch/mips/conf/kern.ldscript:1.5.78.2 --- src/sys/arch/mips/conf/kern.ldscript:1.5.78.1 Wed Dec 22 06:13:36 2010 +++ src/sys/arch/mips/conf/kern.ldscript Sat Dec 3 01:44:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript,v 1.5.78.1 2010/12/22 06:13:36 matt Exp $ */ +/* $NetBSD: kern.ldscript,v 1.5.78.2 2011/12/03 01:44:04 matt Exp $ */ /* ldscript for NetBSD/mips kernels and LKMs */ OUTPUT_ARCH(mips) @@ -30,6 +30,11 @@ SECTIONS _fdata = . ; *(.data) CONSTRUCTORS + . = ALIGN(32); /* COHERENCY_UNIT */ + *(.data.cacheline_aligned) + . = ALIGN(32); /* COHERENCY_UNIT */ + *(.data.read_mostly) + . = ALIGN(32); /* COHERENCY_UNIT */ } _gp = ALIGN(16) + 0x7ff0; .lit8 : { *(.lit8) } Index: src/sys/arch/mips/include/mips_param.h diff -u src/sys/arch/mips/include/mips_param.h:1.23.78.7 src/sys/arch/mips/include/mips_param.h:1.23.78.8 --- src/sys/arch/mips/include/mips_param.h:1.23.78.7 Fri Dec 2 00:01:37 2011 +++ src/sys/arch/mips/include/mips_param.h Sat Dec 3 01:44:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_param.h,v 1.23.78.7 2011/12/02 00:01:37 matt Exp $ */ +/* $NetBSD: mips_param.h,v 1.23.78.8 2011/12/03 01:44:04 matt Exp $ */ #ifdef _KERNEL #include machine/cpu.h @@ -54,6 +54,10 @@ #define MSGBUFSIZE NBPG /* default message buffer size */ #endif +#ifndef COHERENCY_UNIT +#define COHERENCY_UNIT 32 /* MIPS cachelines are usually 32 bytes */ +#endif + /* * Round p (pointer or byte index) up to a correctly-aligned value for all * data types (int, long, ...). The result is u_int and must be cast to Index: src/sys/net/if_gre.h diff -u src/sys/net/if_gre.h:1.39 src/sys/net/if_gre.h:1.39.12.1 --- src/sys/net/if_gre.h:1.39 Mon Sep 8 23:36:55 2008 +++ src/sys/net/if_gre.h Sat Dec 3 01:44:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_gre.h,v 1.39 2008/09/08 23:36:55 gmcgarry Exp $ */ +/* $NetBSD: if_gre.h,v 1.39.12.1 2011/12/03 01:44:03 matt Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -63,12 +63,12 @@ enum gre_state { , GRE_S_DIE }; -#define __cacheline_aligned __aligned(CACHE_LINE_SIZE) +#define __xcacheline_aligned __aligned(CACHE_LINE_SIZE) struct gre_bufq { volatile int bq_prodidx; volatile int bq_considx; - size_t bq_len __cacheline_aligned; + size_t bq_len __xcacheline_aligned; size_t bq_lenmask; volatile int bq_drops; struct mbuf **bq_buf; Index: src/sys/sys/cdefs_elf.h diff -u src/sys/sys/cdefs_elf.h:1.30 src/sys/sys/cdefs_elf.h:1.30.12.1 --- src/sys/sys/cdefs_elf.h:1.30 Mon Jul 21 15:22:19 2008 +++ src/sys/sys/cdefs_elf.h Sat Dec 3 01:44:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs_elf.h,v 1.30 2008/07/21 15:22:19 lukem Exp $ */ +/* $NetBSD: cdefs_elf.h,v 1.30.12.1 2011/12/03 01:44:04 matt Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -156,4 +156,42 @@ #define __link_set_count(set) \ (__link_set_end(set) - __link_set_start(set)) +#ifdef _KERNEL + +/* + * On multiprocessor systems we can gain an improvement in performance + * by being mindful of which cachelines data is placed in. + * + * __read_mostly: + * + * It makes sense to ensure that rarely modified data is not + * placed in the same cacheline as frequently modified data. + * To mitigate the phenomenon known as false-sharing we + * can annotate rarely modified variables with __read_mostly. + * All such variables are placed into the .data.read_mostly + * section in the kernel ELF. + * + * Prime candidates for __read_mostly annotation are variables + * which are hardly ever modified and which are used in code + * hot-paths, e.g. pmap_initialized. + * + * __cacheline_aligned: + * + * Some data structures (mainly locks) benefit from being aligned + * on a cacheline boundary, and having a cacheline to themselves. + * This way, the modification of other data items cannot adversely + * affect the lock and vice versa. + * + * Any variables annotated with __cacheline_aligned will be + * placed into the .data.cacheline_aligned ELF section. + */ +#define __read_mostly \ +
CVS commit: [matt-nb5-mips64] src/sys/arch
Module Name:src Committed By: matt Date: Sat Dec 3 01:56:56 UTC 2011 Modified Files: src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: machdep.c src/sys/arch/mips/include [matt-nb5-mips64]: cpu.h pmap.h src/sys/arch/mips/mips [matt-nb5-mips64]: cpu_subr.c genassym.cf mipsX_subr.S pmap_tlb.c src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_subr.S Log Message: Rework things a bit for the XLR/XLS/XLP TLB. Before dealing with the TLB when MP on the XL?, disable interrupts and take out a lock to prevent concurrent updates to the TLB. In the TLB miss and invalid exception handlers, if the lock is already owned by another CPU, simply return from the exception and let it continue or restart as appropriate. This prevents concurrent TLB exceptions in multiple threads from possibly updating the TLB multiple times for a single address. To generate a diff of this commit: cvs rdiff -u -r1.1.2.36 -r1.1.2.37 src/sys/arch/evbmips/rmixl/machdep.c cvs rdiff -u -r1.90.16.37 -r1.90.16.38 src/sys/arch/mips/include/cpu.h cvs rdiff -u -r1.54.26.18 -r1.54.26.19 src/sys/arch/mips/include/pmap.h cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/sys/arch/mips/mips/cpu_subr.c cvs rdiff -u -r1.44.12.29 -r1.44.12.30 src/sys/arch/mips/mips/genassym.cf cvs rdiff -u -r1.26.36.1.2.49 -r1.26.36.1.2.50 \ src/sys/arch/mips/mips/mipsX_subr.S cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/sys/arch/mips/mips/pmap_tlb.c cvs rdiff -u -r1.1.2.9 -r1.1.2.10 src/sys/arch/mips/rmi/rmixl_subr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/rmixl/machdep.c diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.36 src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.37 --- src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.36 Tue Nov 29 07:48:32 2011 +++ src/sys/arch/evbmips/rmixl/machdep.c Sat Dec 3 01:56:55 2011 @@ -253,6 +253,12 @@ mach_init(int argc, int32_t *argv, void rmixl_pcr_init_core(); +#ifdef MULTIPROCESSOR + __asm __volatile(dmtc0 %0,$%1,2 + :: r(pmap_tlb0_info.ti_hwlock-mtx_lock), + n(MIPS_COP_0_OSSCRATCH)); +#endif + /* * Clear the BSS segment. */ @@ -374,8 +380,8 @@ mach_init(int argc, int32_t *argv, void #ifdef MULTIPROCESSOR /* reserve the cpu_wakeup_info area */ mem_cluster_cnt = ram_seg_resv(mem_clusters, mem_cluster_cnt, - (u_quad_t)trunc_page(rcp-rc_cpu_wakeup_info), - (u_quad_t)round_page(rcp-rc_cpu_wakeup_end)); + (u_quad_t)trunc_page((vaddr_t)rcp-rc_cpu_wakeup_info), + (u_quad_t)round_page((vaddr_t)rcp-rc_cpu_wakeup_end)); #endif #ifdef MEMLIMIT @@ -455,9 +461,6 @@ mach_init(int argc, int32_t *argv, void __asm __volatile(dmtc0 %0,$%1 :: r(cpu_info_store), n(MIPS_COP_0_OSSCRATCH)); #ifdef MULTIPROCESSOR - __asm __volatile(dmtc0 %0,$%1,2 - :: r(pmap_tlb0_info.ti_lock-mtx_lock), - n(MIPS_COP_0_OSSCRATCH)); mips_fixup_exceptions(rmixl_fixup_cop0_oscratch); #endif rmixl_fixup_curcpu(); Index: src/sys/arch/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.90.16.37 src/sys/arch/mips/include/cpu.h:1.90.16.38 --- src/sys/arch/mips/include/cpu.h:1.90.16.37 Thu May 26 19:21:55 2011 +++ src/sys/arch/mips/include/cpu.h Sat Dec 3 01:56:55 2011 @@ -107,7 +107,9 @@ struct cpu_info { volatile u_int ci_softints; struct evcnt ci_ev_fpu_loads; /* fpu load counter */ struct evcnt ci_ev_fpu_saves; /* fpu save counter */ - struct evcnt ci_ev_tlbmisses; + struct evcnt ci_ev_kern_tlbmisses; + struct evcnt ci_ev_user_tlbmisses; + struct evcnt ci_ev_tlblocked; /* * Per-cpu pmap information Index: src/sys/arch/mips/include/pmap.h diff -u src/sys/arch/mips/include/pmap.h:1.54.26.18 src/sys/arch/mips/include/pmap.h:1.54.26.19 --- src/sys/arch/mips/include/pmap.h:1.54.26.18 Fri Apr 29 08:26:21 2011 +++ src/sys/arch/mips/include/pmap.h Sat Dec 3 01:56:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.54.26.18 2011/04/29 08:26:21 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.54.26.19 2011/12/03 01:56:55 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -202,6 +202,7 @@ struct pmap_tlb_info { uint32_t ti_asid_max; LIST_HEAD(, pmap_asid_info) ti_pais; /* list of active ASIDs */ #ifdef MULTIPROCESSOR + kmutex_t *ti_hwlock; pmap_t ti_victim; uint32_t ti_synci_page_bitmap; /* page indices needing a syncicache */ uint32_t ti_cpu_mask; /* bitmask of CPUs sharing this TLB */ Index: src/sys/arch/mips/mips/cpu_subr.c diff -u src/sys/arch/mips/mips/cpu_subr.c:1.1.2.20 src/sys/arch/mips/mips/cpu_subr.c:1.1.2.21 --- src/sys/arch/mips/mips/cpu_subr.c:1.1.2.20 Tue Nov 29 07:48:31 2011 +++ src/sys/arch/mips/mips/cpu_subr.c Sat Dec 3 01:56:55 2011 @@ -242,9 +242,15 @@ cpu_attach_common(device_t self, struct evcnt_attach_dynamic(ci-ci_ev_fpu_saves, EVCNT_TYPE_MISC, NULL, xname, fpu saves); - evcnt_attach_dynamic(ci-ci_ev_tlbmisses, + evcnt_attach_dynamic(ci-ci_ev_user_tlbmisses, EVCNT_TYPE_TRAP, NULL, xname, - tlb misses); + user tlb misses); +