Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2013 11:37:30 -0700
From:      Tim Kientzle <kientzle@freebsd.org>
To:        Andrew Turner <andrew@fubar.geek.nz>, Jeff Roberson <jeff@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r251709 - head/sys/vm
Message-ID:  <49DCB494-32B5-46D7-89FC-8B03477EC945@freebsd.org>
In-Reply-To: <0AA48233-11CD-482E-82DE-E0F8C833E36E@kientzle.com>
References:  <201306132105.r5DL5c4F013089@svn.freebsd.org> <20130615113503.4f5509dd@bender.Home> <20130618233450.71d9d03b@bender.Home> <0AA48233-11CD-482E-82DE-E0F8C833E36E@kientzle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>> On Sat, 15 Jun 2013 11:35:03 +0100
>> Andrew Turner <andrew@fubar.geek.nz> wrote:
>> 
>>> On Thu, 13 Jun 2013 21:05:38 +0000 (UTC)
>>> Jeff Roberson <jeff@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);





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49DCB494-32B5-46D7-89FC-8B03477EC945>