From owner-freebsd-arch@FreeBSD.ORG Thu Mar 1 14:14:07 2012 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0D921065672; Thu, 1 Mar 2012 14:14:07 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 4FE0D8FC0A; Thu, 1 Mar 2012 14:14:07 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 19F6C12D; Thu, 1 Mar 2012 15:14:05 +0100 (CET) Date: Thu, 1 Mar 2012 15:12:47 +0100 From: Pawel Jakub Dawidek To: Gleb Kurtsou Message-ID: <20120301141247.GE1336@garage.freebsd.pl> References: <20120203193719.GB3283@deviant.kiev.zoral.com.ua> <20120225151334.GH1344@garage.freebsd.pl> <20120225194630.GI1344@garage.freebsd.pl> <20120301111624.GB30991@reks> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qp4W5+cUSnZs0RIF" Content-Disposition: inline In-Reply-To: <20120301111624.GB30991@reks> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Attilio Rao , Konstantin Belousov , arch@freebsd.org Subject: Re: Prefaulting for i/o buffers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2012 14:14:08 -0000 --qp4W5+cUSnZs0RIF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 01, 2012 at 01:16:24PM +0200, Gleb Kurtsou wrote: > On (25/02/2012 20:46), Pawel Jakub Dawidek wrote: > > - "Every file system needs cache. Let's make it general, so that all fi= le > > systems can use it!" Well, for VFS each file system is a separate > > entity, which is not the case for ZFS. ZFS can cache one block only > > once that is used by one file system, 10 clones and 100 snapshots, > > which all are separate mount points from VFS perspective. > > The same block would be cached 111 times by the buffer cache. >=20 > Hmm. But this one is optional. Use vop_cachedlookup (or call > cache_entry() on your own), add a number of cache_prune calls. It's > pretty much library-like design you describe below. Yes, namecache is already library-like, but I was talking about the buffer cache. I managed to bypass it eventually with suggestions from ups@, but for a long time I was sure it isn't at all possible. > Everybody agrees that VFS needs more care. But there haven't been much > of concrete suggestions or at least there is no VFS TODO list. Everybody agrees on that, true, but we disagree on the direction we should move our VFS, ie. make it more light-weight vs. more heavy-weight. > > When looking at the big picture, it would be nice to have all this > > general stuff like rangelocking, quota, buffer cache, etc. as some kind > > of libraries for file systems to use and not something that is > > mandatory. If I develop a file system for FreeBSD only and I don't want > > to reinvent the wheel, I can use those libraries. If I port file system > > to FreeBSD or develop a file system that doesn't really need those > > libraries I'm not forced to use them. >=20 > Are you aware of a real "libraries for file systems" VFS example? It > sounds very interesting but I'm afraid it's going to look good only in > theory. E.g. locking at file system level (Darwin, Dragonfly BSD) looks > rather messy (IMHO) and more likely to be bug prone. On the other side > Linux has optional per file system rename lock making VOP_RENAME > implementation much easier, while ours is tremendously difficult to do > right. There are not many examples for such libraries, but the namecache is one of them. Things like rangelocking definiately look like a good candidate to make it a library. > > All this might make a good working group subject at BSDCan devsummit. > > We could cross swords there:) >=20 > Unfortunately I'm afraid I won't make there too. And most likely will > miss EuroBSD/MeetBSD 2012 in Warsaw as well. I have a number of fresh > ideas about namecache I'd love to discuss. What do you think about > organising preliminary group meeting on fs@ or arch@? :) Sounds good. Both forums seems suitable, just pick one. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --qp4W5+cUSnZs0RIF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk9Pg98ACgkQForvXbEpPzSpdACfdxehVqvpgF/3wXtT3OJCIw0Z GOMAoKlqRr5LjBU7koitFf+7VGbMC6z+ =4IE/ -----END PGP SIGNATURE----- --qp4W5+cUSnZs0RIF--