From owner-freebsd-stable@FreeBSD.ORG Wed Jun 30 23:54:47 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3F77106566C for ; Wed, 30 Jun 2010 23:54:47 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 5E9CB8FC08 for ; Wed, 30 Jun 2010 23:54:47 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAG92K0yDaFvG/2dsb2JhbACfVXHALoUlBA X-IronPort-AV: E=Sophos;i="4.53,516,1272859200"; d="scan'208";a="82488289" Received: from amazon.cs.uoguelph.ca ([131.104.91.198]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 30 Jun 2010 19:54:44 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by amazon.cs.uoguelph.ca (Postfix) with ESMTP id 4AE59210190; Wed, 30 Jun 2010 19:54:46 -0400 (EDT) X-Virus-Scanned: amavisd-new at amazon.cs.uoguelph.ca Received: from amazon.cs.uoguelph.ca ([127.0.0.1]) by localhost (amazon.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oylgWZOEUh4Z; Wed, 30 Jun 2010 19:54:45 -0400 (EDT) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by amazon.cs.uoguelph.ca (Postfix) with ESMTP id 1774E210175; Wed, 30 Jun 2010 19:54:45 -0400 (EDT) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id o610Bhb10601; Wed, 30 Jun 2010 20:11:44 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Wed, 30 Jun 2010 20:11:42 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Ian Smith In-Reply-To: <20100630132444.G9227@sola.nimnet.asn.au> Message-ID: References: <20100627221607.GA31646@kay.kiwi-computer.com> <20100628031401.GA45282@kay.kiwi-computer.com> <20100628140054.GA52174@kay.kiwi-computer.com> <20100629134033.O9227@sola.nimnet.asn.au> <20100629153252.GA71786@kay.kiwi-computer.com> <20100629160647.GD50409@dan.emsphone.com> <20100630132444.G9227@sola.nimnet.asn.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: "Rick C. Petty" , Dan Nelson , freebsd-stable@freebsd.org, Adam Vande More Subject: Re: Why is NFSv4 so slow? (root/toor) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 23:54:47 -0000 On Wed, 30 Jun 2010, Ian Smith wrote: > > I wondered whether this might be a Linux thing. On my 7.2 system, > > % find /usr/src -name "*.[ch]" -exec grep -Hw getpwuid {} \; > file > > returns 195 lines, many in the form getpwuid(getuid()), in many base and > contrib components - including id(1), bind, sendmail etc - that could be > nondeterministic if getpwuid(0) ever returned other than root. > > Just one mention of 'toor' in /usr/src/usr.sbin/makefs/compat/pwcache.c > > Not claiming to know how the lookups in /usr/src/lib/libc/gen/getpwent.c > work under the hood, but this does seem likely a non-issue on FreeBSD. > I remember it causing some confusion while testing, but I can't remember when or where. It might have been Linux or I might have been logged in as "toor" or ???? I think I will hardcode the "root" case in nfsuserd, just to be safe. (I also migt have editted /etc/passwd and reordered entries without paying attention to it.) rick