From owner-freebsd-current Sat Apr 15 12: 9:58 2000 Delivered-To: freebsd-current@freebsd.org Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by hub.freebsd.org (Postfix) with ESMTP id 1B19737B610; Sat, 15 Apr 2000 12:09:54 -0700 (PDT) (envelope-from alc@cs.rice.edu) Received: (from alc@localhost) by cs.rice.edu (8.9.0/8.9.0) id OAA05179; Sat, 15 Apr 2000 14:09:45 -0500 (CDT) Date: Sat, 15 Apr 2000 14:09:45 -0500 From: Alan Cox To: Matthew Dillon Cc: Brian Fundakowski Feldman , Alfred Perlstein , Michael Reifenberger , 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> References: <200004151823.LAA79731@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5us In-Reply-To: <200004151823.LAA79731@apollo.backplane.com>; from Matthew Dillon on Sat, Apr 15, 2000 at 11:23:11AM -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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