From owner-freebsd-current@FreeBSD.ORG Fri Jul 17 08:10:48 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E80F3106566B; Fri, 17 Jul 2009 08:10:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 2E6498FC23; Fri, 17 Jul 2009 08:10:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n6H8Ahl3030547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Jul 2009 11:10:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n6H8Ah4A079434; Fri, 17 Jul 2009 11:10:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n6H8AhTJ079433; Fri, 17 Jul 2009 11:10:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 17 Jul 2009 11:10:43 +0300 From: Kostik Belousov To: Rick Macklem Message-ID: <20090717081043.GP55190@deviant.kiev.zoral.com.ua> References: <861vogcyp4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EGjwyTcQXITbA3JU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Anonymous , Rick Macklem , freebsd-current@freebsd.org Subject: Re: [newnfs/client] -alldirs: listing files consumes too much memory X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 08:10:49 -0000 --EGjwyTcQXITbA3JU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 16, 2009 at 08:12:38PM -0400, Rick Macklem wrote: >=20 >=20 > On Thu, 16 Jul 2009, Anonymous wrote: >=20 > >Let's create 335 empty files in /blah and try to list them over nfsv3. > > > ># uname -vm > >FreeBSD 8.0-BETA1 #0: Sat Jul 4 03:55:14 UTC 2009 =20 > >root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 > > > ># mkdir /blah > ># (while [ $((i+=3D1)) -le 334 ]; do : >/blah/foo_$i; done) > ># echo / -alldirs >/etc/exports > ># /etc/rc.d/nfsd onestart > ># mount -t newnfs -o nfsv3 0:/blah /mnt > > > Well, this turns out more interesting than I expected. The problem occurs > when there is a large directory "at the mount point only". If you: > # mount -t newnfs -o nfsv3 0:/ /mnt > # cd /mnt/blah > # ls > - it works. >=20 > When the large directory is at the mount point, it reads the first > block normally but... it then thinks all subsequent blocks are already > in the buffer cache. ie. They come back from getblk() with B_CACHE > already set??? (It then just loops getting blocks forever, since it > won't see the eof if it doesn't try and read from the server.) >=20 > Anyone happen to have a clue why that would happen? Why would blocks > on a mount point vnode behave differently than others. >=20 > Well, at least it's easy to reproduce, so I can keep poking around > with it, rick. Without looking too hard into it, could it be due to read-ahead ? --EGjwyTcQXITbA3JU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkpgMgIACgkQC3+MBN1Mb4jcIACcDmqiM/e3fAniOaokeaUcekL0 4gUAoLbPbWqqQWo7iGlNUUKXkS8Yh457 =aqwQ -----END PGP SIGNATURE----- --EGjwyTcQXITbA3JU--