From owner-freebsd-arch Thu Feb 21 20:37:36 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by hub.freebsd.org (Postfix) with ESMTP id 1BFAD37B404 for ; Thu, 21 Feb 2002 20:37:31 -0800 (PST) Received: (qmail 2683 invoked from network); 22 Feb 2002 04:37:23 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([65.91.136.163]) (envelope-sender ) by mail6.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 22 Feb 2002 04:37:23 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200202212204.g1LM4vQ09988@apollo.backplane.com> Date: Thu, 21 Feb 2002 23:36:59 -0500 (EST) From: John Baldwin To: Matthew Dillon Subject: Re: RE: that INVARIANT/ucred freeing stuff. Cc: arch@FreeBSD.ORG, Julian Elischer Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 21-Feb-02 Matthew Dillon wrote: > We learned a lesson with DIAGNOSTIC. You are repeating the same mistakes > DIAGNOSTIC had which resulted in DIAGNOSTIC becoming essentially > unusable. > INVARIANTS != DIAGNOSTIC. If you want to resurrect DIAGNOSTIC you are > welcome to throw this ucred-clearing code under that option. > > INVARIANTS is not supposed to change algorithms or optimizations > wholesale. It is simply supposed to add additional sanity checks to > existing algorithms and optimizations. > > So when the decision was made to implement td_ucred as an optimization, > that means that is what we need to use. We should not go lobotomizing > it for INVARIANTS. > > It's that simple. It is nothing even close to the absurdness > of removing KASSERT for INVARIANTS that you are trying to contrast it > against. > > What I recommend you do, John, is to add KASSERT()s at a few critical > points in the code to assert that td_ucred is not being used out of > context. We ... meaning Julian and myself mainly, see absolutely no > point in lobotomizing an optimization that has such a huge effect on > performance just because INVARIANTS is turned on. That is not the > purpose of INVARIANTS. We want that code *GONE*. > > We would like you to acquiesce to this request. Fine, stick it under DIAGNOSTIC (which isn't dead.) The problem is that there aren't just 5 places in the kernel that you would need to stick this assert, you would need it all over the place. But I guess no one else has looked at all the places that p_ucred is used and thought about how to ensure we don't use a bogus td_ucred. > -Matt -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message