From owner-freebsd-hackers Sat Sep 14 18:36:24 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA22833 for hackers-outgoing; Sat, 14 Sep 1996 18:36:24 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id SAA22828 for ; Sat, 14 Sep 1996 18:36:23 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id SAA00362; Sat, 14 Sep 1996 18:35:48 -0700 From: Terry Lambert Message-Id: <199609150135.SAA00362@phaeton.artisoft.com> Subject: Re: attribute/inode caching To: bde@zeta.org.au (Bruce Evans) Date: Sat, 14 Sep 1996 18:35:47 -0700 (MST) Cc: proff@suburbia.net, terry@lambert.org, freebsd-hackers@freebsd.org In-Reply-To: <199609150119.LAA30846@godzilla.zeta.org.au> from "Bruce Evans" at Sep 15, 96 11:19:02 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > >POSIX mandates that the access time will be marked for update when you > >read the directory; thus it's written out, and the thrashing is expected. > > Wrong. Neither marking for update nor updating the access times requires > writing anything. In FreeBSD, writing is a side affect of thrashing the > caches and updating is often a side effect of writing. First, when the > vnode cache thrashes, the vnodes have to be updated and written to the > buffer cache. Second, when the buffer cache thrashes, the dirty buffers > containing the vnodes have to be written out. They are usually written > with delayed writes, so the writes need not more than double the overhead > for the thrashing (probably much worse in practice because of seeks). If it weren't marked, it wouldn't be written. I stand behind my statement. > >The net result of this will be that the inode data itself will not be > >cached. > > It could be hung off the vnode for the mounted device. I'm not sure if > it isn't already. This problem is secondary. Repeated tree traversals > aren't all that common, and you don't really want them to eat the buffer > cache (you probably want to buffer precisely the inodes and directories > that will be hit again a long time later in the same search, e.g., > intermediate directories for a depth-first seach). It is not hung off the vnode for the device. It probably should not be, in any case (there is no "device" for NFS, for instance). Really, it wants to be device relative, not vnode relative, and yet still have the vnode mapping that makes the extra bmap per data transfer unnecessary (ie: the heart of the unification). Two lists are as easily maintained as one, IMO. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.