From owner-freebsd-current Mon Feb 18 23:40:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from rwcrmhc54.attbi.com (rwcrmhc54.attbi.com [216.148.227.87]) by hub.freebsd.org (Postfix) with ESMTP id 38D1137B416 for ; Mon, 18 Feb 2002 23:40:08 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc54.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020219074007.YCAD1214.rwcrmhc54.attbi.com@InterJet.elischer.org>; Tue, 19 Feb 2002 07:40:07 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id XAA55533; Mon, 18 Feb 2002 23:25:21 -0800 (PST) Date: Mon, 18 Feb 2002 23:25:20 -0800 (PST) From: Julian Elischer To: Matthew Dillon Cc: Peter Wemm , current@FreeBSD.ORG Subject: Re: Patch sets to date and timing tests with Giant out of userret. In-Reply-To: <200202190646.g1J6kgE58769@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The fully safe version of this code is: td->td_retval[0] = td->td_ucred->cr_ruid; td->td_retval[1] = td->td_ucred->cr_uid; return (0); because td->td_ucred is read-only for it's whole existance. Also, it's not worth arguing about this when Jouhn's not here.. and when he is it's better offline.. julian On Mon, 18 Feb 2002, Matthew Dillon wrote: > :> - mtx_lock(&Giant); > :> - td->td_retval[0] = p->p_ucred->cr_ruid; > :> + s = mtx_lock_giant(kern_giant_ucred); > :> + td->td_retval[0] = td->td_ucred->cr_ruid; > :> #if defined(COMPAT_43) || defined(COMPAT_SUNOS) > :> - td->td_retval[1] = p->p_ucred->cr_uid; > :> + td->td_retval[1] = td->td_ucred->cr_uid; > :> #endif > :> - mtx_unlock(&Giant); > :> + mtx_unlock_giant(s); > :> return (0); > : > :What a waste.. John has already done all this stuff already (using > :td_ucred instead of p_ucred) over the entire tree. > : > :Cheers, > :-Peter > > He didn't instrument Giant, and if you actually believe that one > massive commit is going to be more stable then the piecemeal safe-mode > commits I am making then you are smoking something. Or are you > expecting John to commit his patchset piecemeal as well and test > inbetween? If that is so, then he just wasted a whole lot time > managing all this junk in P4 because, frankly, it only took me a few > minutes to instrument the easier system calls. I spend far more > time testing. > > -Matt > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message