svn commit: r251709 - head/sys/vm

Tim Kientzle kientzle at freebsd.org
Sun Jul 21 18:37:39 UTC 2013


>> On Sat, 15 Jun 2013 11:35:03 +0100
>> Andrew Turner <andrew at fubar.geek.nz> wrote:
>> 
>>> On Thu, 13 Jun 2013 21:05:38 +0000 (UTC)
>>> Jeff Roberson <jeff at FreeBSD.org> wrote:
>>> 
>>>> Author: jeff
>>>> Date: Thu Jun 13 21:05:38 2013
>>>> New Revision: 251709
>>>> URL: http://svnweb.freebsd.org/changeset/base/251709
>>>> 
>>>> Log:
>>>>   - Convert the slab free item list from a linked array of indices
>>>> to a bitmap using sys/bitset.  This is much simpler, has lower space
>>>>     overhead and is cheaper in most cases.
>>>>   - Use a second bitmap for invariants asserts and improve the
>>>> quality of the asserts as well as the number of erroneous conditions
>>>> that we will catch.
>>>>   - Drastically simplify sizing code.  Special case refcnt zones
>>>> since they will be going away.
>>>>   - Update stale comments.
>>> 
>>> This broke booting for my on the Raspberry Pi for me. If I revert just
>>> this change the board boots as expected. Kernel output from the boot
>>> failure follows.

As Andrew pointed out some time ago, this broke armv6 with:

  panic: lock "vm map (user)" 0xc09cc050 already initialized

I put in some debug printfs and verified that this is
actually the first time that vm_map_zinit is called.  So I
don't think the lock is actually being re-initialized; rather
I think it's a problem with uninitialized memory.  The following
seems to fix it for me:

Index: sys/vm/vm_map.c
===================================================================
--- sys/vm/vm_map.c	(revision 253514)
+++ sys/vm/vm_map.c	(working copy)
@@ -239,8 +239,7 @@
 	vm_map_t map;
 
 	map = (vm_map_t)mem;
-	map->nentries = 0;
-	map->size = 0;
+	memset(map, 0, sizeof(*map));
 	mtx_init(&map->system_mtx, "vm map (system)", NULL, MTX_DEF | MTX_DUPOK);
 	sx_init(&map->lock, "vm map (user)");
 	return (0);




More information about the svn-src-head mailing list