Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Apr 2000 14:09:45 -0500
From:      Alan Cox <alc@cs.rice.edu>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Brian Fundakowski Feldman <green@freebsd.org>, Alfred Perlstein <bright@wintelcom.net>, Michael Reifenberger <root@nihil.plaut.de>, current@freebsd.org, alc@freebsd.org
Subject:   Re: panic: vm_object_shadow: source object has OBJ_ONEMAPPING set.
Message-ID:  <20000415140945.B3462@cs.rice.edu>
In-Reply-To: <200004151823.LAA79731@apollo.backplane.com>; from Matthew Dillon on Sat, Apr 15, 2000 at 11:23:11AM -0700
References:  <Pine.BSF.4.21.0004151328500.16430-100000@green.dyndns.org> <200004151823.LAA79731@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 15, 2000 at 11:23:11AM -0700, Matthew Dillon wrote:
> :Well, first the question must be answered, in an absolute yes or no:
> :is it wrong in the first place to have OBJ_ONEMAPPING set with a ref_count
> :of more than 1?  I'd accept an authoritative answer about this from
> :alc, dillon, dyson, or luoqi, who are all very familiar with the new
> :VM.
> :--
> : Brian Fundakowski Feldman           \  FreeBSD: The Power to Serve!  /
> : green@FreeBSD.org                    `------------------------------'
> 
>     It is totally legal for OBJ_ONEMAPPING to be set even if the ref_count
>     is greater then 1.

Agreed.  OBJ_ONEMAPPING actually means that *each page* within the object
is mapped at most once.  The object itself may be mapped many times,
as long as the previous rule isn't violated.  In other words, none
of the mappings map an overlapping set of pages.
 
>     ...  The ref_count has no bearing on the shareability
>     of the object any more.  The tests were there before due to all sorts
>     of crud that had been hacked in in the 2.2.x and 3.x era to get around
>     serious bugs in the OBJ_ONEMAPPING flag and elsewhere in the VM system.
> 
>     Note that the ref_count == 1 test in the vm_object_shadow optimization
>     should be left intact.  This optimization requires a much stricter set
>     of tests because we do not want to assume sharability of an object
>     if someone else (the 'else' being 'someone unknown to us') has a reference
>     on it, even if OBJ_ONEMAPPING is set.
> 

Here's what troubles me about the state of the OBJ_ONEMAPPING management
code: When we clear the OBJ_ONEMAPPING attribute on an object, we don't
touch any of its backing objects.  Specifically, we don't guarantee
that they don't have OBJ_ONEMAPPING set.  I think we should, if only
because it makes reasoning about the system's behavior a lot easier.

If we cleared OBJ_ONEMAPPING recursively, then the rationale for
this assertion would go away.

Brian, if you'd like to try this, I'll be happy to review it.

Alan


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000415140945.B3462>