CVS commit: src/sys/uvm

2011-04-23 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sun Apr 24 03:56:50 UTC 2011

Modified Files:
src/sys/uvm: uvm_init.c

Log Message:
Initialize UVM loaning subsystem a bit later, after kmem(9).
Makes UVMHIST work again.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/uvm/uvm_init.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/uvm/uvm_init.c
diff -u src/sys/uvm/uvm_init.c:1.40 src/sys/uvm/uvm_init.c:1.41
--- src/sys/uvm/uvm_init.c:1.40	Sat Apr 23 18:14:12 2011
+++ src/sys/uvm/uvm_init.c	Sun Apr 24 03:56:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_init.c,v 1.40 2011/04/23 18:14:12 rmind Exp $	*/
+/*	$NetBSD: uvm_init.c,v 1.41 2011/04/24 03:56:50 rmind Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_init.c,v 1.40 2011/04/23 18:14:12 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_init.c,v 1.41 2011/04/24 03:56:50 rmind Exp $");
 
 #include 
 #include 
@@ -144,12 +144,6 @@
 	uvm_pager_init();
 
 	/*
-	 * step 8: init the uvm_loan() facility.
-	 */
-
-	uvm_loan_init();
-
-	/*
 	 * Initialize pools.  This must be done before anyone manipulates
 	 * any vm_maps because we use a pool for some map entry structures.
 	 */
@@ -163,6 +157,12 @@
 	kmem_init();
 
 	/*
+	 * Initialize the uvm_loan() facility.
+	 */
+
+	uvm_loan_init();
+
+	/*
 	 * init emap subsystem.
 	 */
 



CVS commit: src/lib/libutil

2011-04-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Apr 24 01:56:44 UTC 2011

Modified Files:
src/lib/libutil: passwd.c

Log Message:
fix freudian slip


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/lib/libutil/passwd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libutil/passwd.c
diff -u src/lib/libutil/passwd.c:1.50 src/lib/libutil/passwd.c:1.51
--- src/lib/libutil/passwd.c:1.50	Wed Aug 18 04:32:02 2010
+++ src/lib/libutil/passwd.c	Sat Apr 23 21:56:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: passwd.c,v 1.50 2010/08/18 08:32:02 christos Exp $	*/
+/*	$NetBSD: passwd.c,v 1.51 2011/04/24 01:56:44 christos Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: passwd.c,v 1.50 2010/08/18 08:32:02 christos Exp $");
+__RCSID("$NetBSD: passwd.c,v 1.51 2011/04/24 01:56:44 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include 
@@ -172,7 +172,7 @@
 	}
 	if (WIFEXITED(pstat)) {
 		if (WEXITSTATUS(pstat) != 0) {
-			warnx("pwd_mkdb exited with static %d",
+			warnx("pwd_mkdb exited with status %d",
 			WEXITSTATUS(pstat));
 			return -1;
 		}



CVS commit: src/sys/dev/raidframe

2011-04-23 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sat Apr 23 22:22:46 UTC 2011

Modified Files:
src/sys/dev/raidframe: rf_driver.c rf_engine.c

Log Message:
move the iodone setup and tear down into rf_engine.c.  this fixes
"raidctl -u" and should also help the case where we fail to setup
a device part of the way through.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/dev/raidframe/rf_driver.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/raidframe/rf_engine.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/raidframe/rf_driver.c
diff -u src/sys/dev/raidframe/rf_driver.c:1.123 src/sys/dev/raidframe/rf_driver.c:1.124
--- src/sys/dev/raidframe/rf_driver.c:1.123	Sat Apr 23 06:29:05 2011
+++ src/sys/dev/raidframe/rf_driver.c	Sat Apr 23 22:22:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_driver.c,v 1.123 2011/04/23 06:29:05 mrg Exp $	*/
+/*	$NetBSD: rf_driver.c,v 1.124 2011/04/23 22:22:46 mrg Exp $	*/
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -66,7 +66,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.123 2011/04/23 06:29:05 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.124 2011/04/23 22:22:46 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_raid_diagnostic.h"
@@ -240,9 +240,6 @@
 		   "rfreshutdown",0);
 	}
 
-	mutex_destroy(&raidPtr->iodone_lock);
-	cv_destroy(&raidPtr->iodone_cv);
-
 	raidPtr->valid = 0;
 
 	if (raidPtr->parity_map != NULL)
@@ -353,10 +350,6 @@
 	raidPtr->status = rf_rs_optimal;
 	raidPtr->reconControl = NULL;
 
-	TAILQ_INIT(&(raidPtr->iodone));
-	mutex_init(&raidPtr->iodone_lock, MUTEX_DEFAULT, IPL_VM);
-	cv_init(&raidPtr->iodone_cv, "raidiow");
-
 	DO_RAID_INIT_CONFIGURE(rf_ConfigureEngine);
 	DO_RAID_INIT_CONFIGURE(rf_ConfigureStripeLocks);
 

Index: src/sys/dev/raidframe/rf_engine.c
diff -u src/sys/dev/raidframe/rf_engine.c:1.42 src/sys/dev/raidframe/rf_engine.c:1.43
--- src/sys/dev/raidframe/rf_engine.c:1.42	Sat Apr 23 06:29:05 2011
+++ src/sys/dev/raidframe/rf_engine.c	Sat Apr 23 22:22:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_engine.c,v 1.42 2011/04/23 06:29:05 mrg Exp $	*/
+/*	$NetBSD: rf_engine.c,v 1.43 2011/04/23 22:22:46 mrg Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -55,7 +55,7 @@
  /
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.42 2011/04/23 06:29:05 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.43 2011/04/23 22:22:46 mrg Exp $");
 
 #include 
 
@@ -120,6 +120,8 @@
   	DO_SIGNAL(raidPtr);
  	DO_UNLOCK(raidPtr);
 
+	mutex_destroy(&raidPtr->iodone_lock);
+	cv_destroy(&raidPtr->iodone_cv);
 }
 
 int
@@ -127,6 +129,13 @@
 		   RF_Config_t *cfgPtr)
 {
 
+	/*
+	 * Initialise iodone for the IO thread.
+	 */
+	TAILQ_INIT(&(raidPtr->iodone));
+	mutex_init(&raidPtr->iodone_lock, MUTEX_DEFAULT, IPL_VM);
+	cv_init(&raidPtr->iodone_cv, "raidiow");
+
 	rf_mutex_init(&raidPtr->node_queue_mutex);
 	raidPtr->node_queue = NULL;
 	raidPtr->dags_in_flight = 0;



CVS commit: src/sys

2011-04-23 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Apr 23 18:57:28 UTC 2011

Modified Files:
src/sys/kern: kern_descrip.c
src/sys/sys: file.h

Log Message:
- Sprinkle __cacheline_aligned and __read_mostly in file descriptor code.
- While here, remove trailing whitespaces, KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/sys/kern/kern_descrip.c
cvs rdiff -u -r1.72 -r1.73 src/sys/sys/file.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/kern/kern_descrip.c
diff -u src/sys/kern/kern_descrip.c:1.212 src/sys/kern/kern_descrip.c:1.213
--- src/sys/kern/kern_descrip.c:1.212	Sun Apr 10 15:45:33 2011
+++ src/sys/kern/kern_descrip.c	Sat Apr 23 18:57:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_descrip.c,v 1.212 2011/04/10 15:45:33 christos Exp $	*/
+/*	$NetBSD: kern_descrip.c,v 1.213 2011/04/23 18:57:27 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.212 2011/04/10 15:45:33 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.213 2011/04/23 18:57:27 rmind Exp $");
 
 #include 
 #include 
@@ -97,6 +97,17 @@
 #include 
 #include 
 
+/*
+ * A list (head) of open files, counter, and lock protecting them.
+ */
+struct filelist		filehead	__cacheline_aligned;
+static u_int		nfiles		__cacheline_aligned;
+kmutex_t		filelist_lock	__cacheline_aligned;
+
+static pool_cache_t	filedesc_cache	__read_mostly;
+static pool_cache_t	file_cache	__read_mostly;
+static pool_cache_t	fdfile_cache	__read_mostly;
+
 static int	file_ctor(void *, void *, int);
 static void	file_dtor(void *, void *);
 static int	fdfile_ctor(void *, void *, int);
@@ -110,14 +121,6 @@
 static void fill_file(struct kinfo_file *, const file_t *, const fdfile_t *,
 		  int, pid_t);
 
-kmutex_t	filelist_lock;	/* lock on filehead */
-struct filelist	filehead;	/* head of list of open files */
-u_int		nfiles;		/* actual number of open files */
-
-static pool_cache_t filedesc_cache;
-static pool_cache_t file_cache;
-static pool_cache_t fdfile_cache;
-
 const struct cdevsw filedesc_cdevsw = {
 	filedescopen, noclose, noread, nowrite, noioctl,
 	nostop, notty, nopoll, nommap, nokqfilter, D_OTHER | D_MPSAFE,
@@ -206,9 +209,7 @@
 			KASSERT(fd_isused(fdp, fd));
 		}
 	}
-#else	/* DEBUG */
-	/* nothing */
-#endif	/* DEBUG */
+#endif
 }
 
 static int
@@ -240,7 +241,7 @@
 		off++;
 	}
 
-	return (-1);
+	return -1;
 
  found:
 	return (off << NDENTRYSHIFT) + ffs(~sub) - 1;
@@ -263,7 +264,7 @@
 		off--;
 
 	if (off < 0)
-		return (-1);
+		return -1;
 
 	i = ((off + 1) << NDENTRYSHIFT) - 1;
 	if (i >= last)
@@ -273,7 +274,7 @@
 	while (i > 0 && (ff[i] == NULL || !ff[i]->ff_allocated))
 		i--;
 
-	return (i);
+	return i;
 }
 
 static inline void
@@ -288,9 +289,9 @@
 	KASSERT((fdp->fd_lomap[off] & (1 << (fd & NDENTRYMASK))) == 0);
 	KASSERT(ff != NULL);
 	KASSERT(ff->ff_file == NULL);
-   	KASSERT(!ff->ff_allocated);
+	KASSERT(!ff->ff_allocated);
 
-   	ff->ff_allocated = 1;
+	ff->ff_allocated = 1;
 	fdp->fd_lomap[off] |= 1 << (fd & NDENTRYMASK);
 	if (__predict_false(fdp->fd_lomap[off] == ~0)) {
 		KASSERT((fdp->fd_himap[off >> NDENTRYSHIFT] &
@@ -322,7 +323,7 @@
 	 */
 	KASSERT(ff != NULL);
 	KASSERT(ff->ff_file == NULL);
-   	KASSERT(ff->ff_allocated);
+	KASSERT(ff->ff_allocated);
 
 	if (fd < fdp->fd_freefile) {
 		fdp->fd_freefile = fd;
@@ -709,11 +710,9 @@
 int
 fd_dup(file_t *fp, int minfd, int *newp, bool exclose)
 {
-	proc_t *p;
+	proc_t *p = curproc;
 	int error;
 
-	p = curproc;
-
 	while ((error = fd_alloc(p, minfd, newp)) != 0) {
 		if (error != ENOSPC) {
 			return error;
@@ -732,12 +731,10 @@
 int
 fd_dup2(file_t *fp, unsigned new)
 {
-	filedesc_t *fdp;
+	filedesc_t *fdp = curlwp->l_fd;
 	fdfile_t *ff;
 	fdtab_t *dt;
 
-	fdp = curlwp->l_fd;
-
 	/*
 	 * Ensure there are enough slots in the descriptor table,
 	 * and allocate an fdfile_t up front in case we need it.
@@ -772,7 +769,7 @@
 		KASSERT(new >= NDFDFILE);
 		dt->dt_ff[new] = ff;
 		ff = NULL;
-	}		
+	}
 	fd_used(fdp, new);
 	mutex_exit(&fdp->fd_lock);
 
@@ -807,8 +804,8 @@
 	mutex_exit(&fp->f_lock);
 
 	/* We held the last reference - release locks, close and free. */
-if ((fp->f_flag & FHASLOCK) && fp->f_type == DTYPE_VNODE) {
-	lf.l_whence = SEEK_SET;
+	if ((fp->f_flag & FHASLOCK) && fp->f_type == DTYPE_VNODE) {
+		lf.l_whence = SEEK_SET;
 		lf.l_start = 0;
 		lf.l_len = 0;
 		lf.l_type = F_UNLCK;
@@ -832,15 +829,13 @@
 int
 fd_alloc(proc_t *p, int want, int *result)
 {
-	filedesc_t *fdp;
+	filedesc_t *fdp = p->p_fd;
 	int i, lim, last, error;
 	u_int off, new;
 	fdtab_t *dt;
 
 	KASSERT(p == curproc || p == &proc0);
 
-	fdp = p->p_fd;
-
 	/*
 	 * Search for a free descriptor starting at the higher
 	 * of want or fd_freefile.
@@ -1070,13 +1065,11 @@
 int
 fd_allocfile(file_t **resultfp, int *resultfd)
 {
+	proc_t *p = c

CVS commit: src/sys/uvm

2011-04-23 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Apr 23 18:14:13 UTC 2011

Modified Files:
src/sys/uvm: uvm_amap.c uvm_amap.h uvm_anon.c uvm_aobj.c uvm_device.c
uvm_extern.h uvm_fault.c uvm_init.c uvm_io.c uvm_kmguard.c
uvm_loan.c uvm_mmap.c uvm_pager.c uvm_pglist.c uvm_stat.h
uvm_swap.c uvm_vnode.c

Log Message:
Replace "malloc" in comments, remove unnecessary header inclusions.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/uvm/uvm_amap.c
cvs rdiff -u -r1.35 -r1.36 src/sys/uvm/uvm_amap.h
cvs rdiff -u -r1.52 -r1.53 src/sys/uvm/uvm_anon.c
cvs rdiff -u -r1.113 -r1.114 src/sys/uvm/uvm_aobj.c
cvs rdiff -u -r1.60 -r1.61 src/sys/uvm/uvm_device.c src/sys/uvm/uvm_pglist.c
cvs rdiff -u -r1.171 -r1.172 src/sys/uvm/uvm_extern.h
cvs rdiff -u -r1.183 -r1.184 src/sys/uvm/uvm_fault.c
cvs rdiff -u -r1.39 -r1.40 src/sys/uvm/uvm_init.c
cvs rdiff -u -r1.25 -r1.26 src/sys/uvm/uvm_io.c
cvs rdiff -u -r1.4 -r1.5 src/sys/uvm/uvm_kmguard.c
cvs rdiff -u -r1.78 -r1.79 src/sys/uvm/uvm_loan.c
cvs rdiff -u -r1.134 -r1.135 src/sys/uvm/uvm_mmap.c
cvs rdiff -u -r1.99 -r1.100 src/sys/uvm/uvm_pager.c
cvs rdiff -u -r1.48 -r1.49 src/sys/uvm/uvm_stat.h
cvs rdiff -u -r1.153 -r1.154 src/sys/uvm/uvm_swap.c
cvs rdiff -u -r1.94 -r1.95 src/sys/uvm/uvm_vnode.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/uvm/uvm_amap.c
diff -u src/sys/uvm/uvm_amap.c:1.89 src/sys/uvm/uvm_amap.c:1.90
--- src/sys/uvm/uvm_amap.c:1.89	Wed Feb  2 15:13:33 2011
+++ src/sys/uvm/uvm_amap.c	Sat Apr 23 18:14:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_amap.c,v 1.89 2011/02/02 15:13:33 chuck Exp $	*/
+/*	$NetBSD: uvm_amap.c,v 1.90 2011/04/23 18:14:12 rmind Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -35,13 +35,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.89 2011/02/02 15:13:33 chuck Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.90 2011/04/23 18:14:12 rmind Exp $");
 
 #include "opt_uvmhist.h"
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -98,8 +97,8 @@
  * when enabled, an array of ints is allocated for the pprefs.  this
  * array is allocated only when a partial reference is added to the
  * map (either by unmapping part of the amap, or gaining a reference
- * to only a part of an amap).  if the malloc of the array fails
- * (M_NOWAIT), then we set the array pointer to PPREF_NONE to indicate
+ * to only a part of an amap).  if the allocation of the array fails
+ * (KM_NOSLEEP), then we set the array pointer to PPREF_NONE to indicate
  * that we tried to do ppref's but couldn't alloc the array so just
  * give up (after all, this is an optional feature!).
  *
@@ -190,6 +189,10 @@
 	amap->am_nslot = slots;
 	amap->am_nused = 0;
 
+	/*
+	 * Note: since allocations are likely big, we expect to reduce the
+	 * memory fragmentation by allocating them in separate blocks.
+	 */
 	amap->am_slots = kmem_alloc(totalslots * sizeof(int), kmflags);
 	if (amap->am_slots == NULL)
 		goto fail1;
@@ -475,15 +478,15 @@
 	}
 
 	/*
-	 * case 3: we need to malloc a new amap and copy all the amap
-	 * data over from old amap to the new one.
+	 * Case 3: we need to allocate a new amap and copy all the amap
+	 * data over from old amap to the new one.  Drop the lock before
+	 * performing allocation.
 	 *
-	 * note that the use of a kernel realloc() probably would not
-	 * help here, since we wish to abort cleanly if one of the
-	 * three (or four) mallocs fails.
+	 * Note: since allocations are likely big, we expect to reduce the
+	 * memory fragmentation by allocating them in separate blocks.
 	 */
 
-	amap_unlock(amap);	/* unlock in case we sleep in malloc */
+	amap_unlock(amap);
 
 	if (slotneed >= UVM_AMAP_LARGE) {
 		return E2BIG;
@@ -492,8 +495,10 @@
 	slotalloc = amap_roundup_slots(slotneed);
 #ifdef UVM_AMAP_PPREF
 	newppref = NULL;
-	if (amap->am_ppref && amap->am_ppref != PPREF_NONE)
+	if (amap->am_ppref && amap->am_ppref != PPREF_NONE) {
+		/* Will be handled later if fails. */
 		newppref = kmem_alloc(slotalloc * sizeof(*newppref), kmflags);
+	}
 #endif
 	newsl = kmem_alloc(slotalloc * sizeof(*newsl), kmflags);
 	newbck = kmem_alloc(slotalloc * sizeof(*newbck), kmflags);
@@ -519,7 +524,7 @@
 	KASSERT(amap->am_maxslot < slotneed);
 
 	/*
-	 * now copy everything over to new malloc'd areas...
+	 * Copy everything over to new allocated areas.
 	 */
 
 	slotadded = slotalloc - amap->am_nslot;
@@ -829,7 +834,7 @@
 	/*
 	 * need to double check reference count now that we've got the
 	 * src amap locked down.  the reference count could have
-	 * changed while we were in malloc.  if the reference count
+	 * changed while we were allocating.  if the reference count
 	 * dropped down to one we take over the old map rather than
 	 * copying the amap.
 	 */
@@ -1587,4 +1592,3 @@
 
 	UVMHIST_LOG(maphist,"<- done!", 0, 0, 0, 0);
 

CVS commit: src/share/man/man4

2011-04-23 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sat Apr 23 16:46:51 UTC 2011

Modified Files:
src/share/man/man4: wm.4

Log Message:
Add and entry for the Intel i82545GM with external PHY which works fine:

wm0 at pci1 dev 1 function 0: Intel i82545GM 1000BASE-T Ethernet, rev. 4
wm0: interrupting at ivec 0
wm0: 64-bit 66MHz PCI bus
wm0: 256 word (8 address bits) MicroWire EEPROM
wm0: Ethernet address 00:04:23:xx:xx:xx
makphy0 at wm0 phy 1: Marvell 88E1011 Gigabit PHY, rev. 5


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/share/man/man4/wm.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/wm.4



CVS commit: src

2011-04-23 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr 23 16:40:08 UTC 2011

Modified Files:
src/doc: CHANGES
src/libexec/ld.elf_so: tls.c

Log Message:
Fix a Freudian slip found by rmind


To generate a diff of this commit:
cvs rdiff -u -r1.1539 -r1.1540 src/doc/CHANGES
cvs rdiff -u -r1.6 -r1.7 src/libexec/ld.elf_so/tls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1539 src/doc/CHANGES:1.1540
--- src/doc/CHANGES:1.1539	Fri Apr 15 15:30:59 2011
+++ src/doc/CHANGES	Sat Apr 23 16:40:08 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1539 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1540 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -963,8 +963,8 @@
 		[bouyer 20110306]
 	tmux(1): First import of tmux (version 1.4).  [jmmv 20110310]
 	powerpc: add TLS (thread local storage) support.  [matt 20110311]
-	sh3: add TLS (thread locale storage) support.  [joerg 20110312]
-	x86: add TLS (thread locale storage) support.  [joerg 20110312]
+	sh3: add TLS (thread local storage) support.  [joerg 20110312]
+	x86: add TLS (thread local storage) support.  [joerg 20110312]
 	mips: add TLS (thread local storage) support.  [matt 20110314]
 	mips: add MIPS32R2 and MIPS64R2 support.  [matt 20110314]
 	shmif_dumpbus(1): Make endian-independent.  [pooka 20110314]
@@ -973,9 +973,9 @@
 	sandpoint: D-Link DSM-G600 support. [phx 20110319]
 	shark: chipsfb now works on shark. [macallan 20110323]
 	postfix(1): Import version 2.8.2 [tron 20110323]
-	sparc: add TLS (thread locale storage) support.  [martin 20110330]
-	sparc64: add TLS (thread locale storage) support.  [martin 20110330]
-	alpha: add TLS (thread locale storage) support.  [skrll 20110331]
+	sparc: add TLS (thread local storage) support.  [martin 20110330]
+	sparc64: add TLS (thread local storage) support.  [martin 20110330]
+	alpha: add TLS (thread local storage) support.  [skrll 20110331]
 	atf(7): Import 0.13.  [jmmv 20110331]
 	ssh-askpass: Updated to 1.2.0. [mbalmer 20110403]
 	rdcide(4): add a driver for the IDE controller found in RDC's

Index: src/libexec/ld.elf_so/tls.c
diff -u src/libexec/ld.elf_so/tls.c:1.6 src/libexec/ld.elf_so/tls.c:1.7
--- src/libexec/ld.elf_so/tls.c:1.6	Thu Apr  7 02:19:28 2011
+++ src/libexec/ld.elf_so/tls.c	Sat Apr 23 16:40:08 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.6 2011/04/07 02:19:28 matt Exp $	*/
+/*	$NetBSD: tls.c,v 1.7 2011/04/23 16:40:08 joerg Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: tls.c,v 1.6 2011/04/07 02:19:28 matt Exp $");
+__RCSID("$NetBSD: tls.c,v 1.7 2011/04/23 16:40:08 joerg Exp $");
 
 #include 
 #include 
@@ -243,7 +243,7 @@
 	if (_rtld_tls_static_space) {
 		if (obj->tlsinitsize) {
 			_rtld_error("%s: Use of initialized "
-			"Thread Locale Storage with model initial-exec "
+			"Thread Local Storage with model initial-exec "
 			"and dlopen is not supported",
 			obj->path);
 			return -1;



CVS commit: [rmind-uvmplock] src/sys/ufs/ffs

2011-04-23 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Sat Apr 23 15:35:25 UTC 2011

Modified Files:
src/sys/ufs/ffs [rmind-uvmplock]: ffs_quota2.c

Log Message:
Few fixes, missed in last sync with head.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/ufs/ffs/ffs_quota2.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/ufs/ffs/ffs_quota2.c
diff -u src/sys/ufs/ffs/ffs_quota2.c:1.2.2.2 src/sys/ufs/ffs/ffs_quota2.c:1.2.2.3
--- src/sys/ufs/ffs/ffs_quota2.c:1.2.2.2	Thu Apr 21 01:42:20 2011
+++ src/sys/ufs/ffs/ffs_quota2.c	Sat Apr 23 15:35:25 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_quota2.c,v 1.2.2.2 2011/04/21 01:42:20 rmind Exp $ */
+/* $NetBSD: ffs_quota2.c,v 1.2.2.3 2011/04/23 15:35:25 rmind Exp $ */
 /*-
   * Copyright (c) 2010 Manuel Bouyer
   * All rights reserved.
@@ -28,7 +28,7 @@
   */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_quota2.c,v 1.2.2.2 2011/04/21 01:42:20 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_quota2.c,v 1.2.2.3 2011/04/23 15:35:25 rmind Exp $");
 
 #include 
 #include 
@@ -92,9 +92,9 @@
 		}
 		ump->um_quotas[USRQUOTA] = vp;
 		ump->um_cred[USRQUOTA] = l->l_cred;
-		mutex_enter(&vp->v_interlock);
+		mutex_enter(vp->v_interlock);
 		vp->v_writecount++;
-		mutex_exit(&vp->v_interlock);
+		mutex_exit(vp->v_interlock);
 		VOP_UNLOCK(vp);
 	}
 if (fs->fs_quota_flags & FS_Q2_DO_TYPE(GRPQUOTA) &&
@@ -109,10 +109,10 @@
 		}
 		ump->um_quotas[GRPQUOTA] = vp;
 		ump->um_cred[GRPQUOTA] = l->l_cred;
-		mutex_enter(&vp->v_interlock);
+		mutex_enter(vp->v_interlock);
 		vp->v_vflag |= VV_SYSTEM;
 		vp->v_writecount++;
-		mutex_exit(&vp->v_interlock);
+		mutex_exit(vp->v_interlock);
 		VOP_UNLOCK(vp);
 	}
 	mp->mnt_flag |= MNT_QUOTA;



CVS commit: src/external/mit/xorg/lib/freetype

2011-04-23 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Sat Apr 23 15:26:05 UTC 2011

Modified Files:
src/external/mit/xorg/lib/freetype: Makefile

Log Message:
Add cache module to the build.

Fixes PR/42809.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/lib/freetype/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/mit/xorg/lib/freetype/Makefile
diff -u src/external/mit/xorg/lib/freetype/Makefile:1.7 src/external/mit/xorg/lib/freetype/Makefile:1.8
--- src/external/mit/xorg/lib/freetype/Makefile:1.7	Mon Nov 22 08:34:56 2010
+++ src/external/mit/xorg/lib/freetype/Makefile	Sat Apr 23 15:26:05 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2010/11/22 08:34:56 mrg Exp $
+#	$NetBSD: Makefile,v 1.8 2011/04/23 15:26:05 rjs Exp $
 
 .include 
 
@@ -22,6 +22,9 @@
 .PATH:	${FREETYPE}/src/bdf
 SRCS+=	bdf.c
 
+.PATH:	${FREETYPE}/src/cache
+SRCS+=	ftcache.c
+
 .PATH:	${FREETYPE}/src/cff
 SRCS+=	cff.c
 



CVS commit: src/sys/ufs/ffs

2011-04-23 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sat Apr 23 08:23:52 UTC 2011

Modified Files:
src/sys/ufs/ffs: ffs_snapshot.c

Log Message:
ffs_snapshot(): return an error if the node is an invalid snapshot.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/ufs/ffs/ffs_snapshot.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/ufs/ffs/ffs_snapshot.c
diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.112 src/sys/ufs/ffs/ffs_snapshot.c:1.113
--- src/sys/ufs/ffs/ffs_snapshot.c:1.112	Mon Apr 18 07:36:13 2011
+++ src/sys/ufs/ffs/ffs_snapshot.c	Sat Apr 23 08:23:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_snapshot.c,v 1.112 2011/04/18 07:36:13 hannken Exp $	*/
+/*	$NetBSD: ffs_snapshot.c,v 1.113 2011/04/23 08:23:52 hannken Exp $	*/
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.112 2011/04/18 07:36:13 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.113 2011/04/23 08:23:52 hannken Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -197,7 +197,9 @@
 	/*
 	 * If the vnode already is a snapshot, return.
 	 */
-	if ((VTOI(vp)->i_flags & (SF_SNAPSHOT | SF_SNAPINVAL)) == SF_SNAPSHOT) {
+	if ((VTOI(vp)->i_flags & SF_SNAPSHOT)) {
+		if ((VTOI(vp)->i_flags & SF_SNAPINVAL))
+			return EINVAL;
 		if (ctime) {
 			ctime->tv_sec = DIP(VTOI(vp), mtime);
 			ctime->tv_nsec = DIP(VTOI(vp), mtimensec);



CVS commit: src/sys/ufs/ffs

2011-04-23 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sat Apr 23 07:36:02 UTC 2011

Modified Files:
src/sys/ufs/ffs: ffs_balloc.c

Log Message:
Try to keep snapshot indirect blocks contiguous.

This speeds up snapshot creation by a factor of ~3 and reduces
the file system suspension time by a factor of ~5.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/ufs/ffs/ffs_balloc.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/ufs/ffs/ffs_balloc.c
diff -u src/sys/ufs/ffs/ffs_balloc.c:1.53 src/sys/ufs/ffs/ffs_balloc.c:1.54
--- src/sys/ufs/ffs/ffs_balloc.c:1.53	Sun Mar  6 17:08:38 2011
+++ src/sys/ufs/ffs/ffs_balloc.c	Sat Apr 23 07:36:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_balloc.c,v 1.53 2011/03/06 17:08:38 bouyer Exp $	*/
+/*	$NetBSD: ffs_balloc.c,v 1.54 2011/04/23 07:36:02 hannken Exp $	*/
 
 /*
  * Copyright (c) 2002 Networks Associates Technology, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_balloc.c,v 1.53 2011/03/06 17:08:38 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_balloc.c,v 1.54 2011/04/23 07:36:02 hannken Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -320,6 +320,10 @@
 			goto fail;
 		}
 		mutex_enter(&ump->um_lock);
+		/* Try to keep snapshot indirect blocks contiguous. */
+		if (i == num && (ip->i_flags & SF_SNAPSHOT) != 0)
+			pref = ffs_blkpref_ufs1(ip, lbn, indirs[i-1].in_off,
+			flags | B_METAONLY, &bap[0]);
 		if (pref == 0)
 			pref = ffs_blkpref_ufs1(ip, lbn, 0, flags | B_METAONLY,
 			NULL);
@@ -846,6 +850,10 @@
 			goto fail;
 		}
 		mutex_enter(&ump->um_lock);
+		/* Try to keep snapshot indirect blocks contiguous. */
+		if (i == num && (ip->i_flags & SF_SNAPSHOT) != 0)
+			pref = ffs_blkpref_ufs2(ip, lbn, indirs[i-1].in_off,
+			flags | B_METAONLY, &bap[0]);
 		if (pref == 0)
 			pref = ffs_blkpref_ufs2(ip, lbn, 0, flags | B_METAONLY,
 			NULL);