From owner-freebsd-stable@FreeBSD.ORG Mon Feb 20 22:21:01 2012 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 2BD7D106566C for ; Mon, 20 Feb 2012 22:21:01 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id CD8228FC16 for ; Mon, 20 Feb 2012 22:21:00 +0000 (UTC) Received: from localhost.samsco.home (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.5/8.14.5) with ESMTP id q1KMKtdZ035218; Mon, 20 Feb 2012 15:20:55 -0700 (MST) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 From: Scott Long In-Reply-To: <4F429DFB.8050003@os2.kiev.ua> Date: Mon, 20 Feb 2012 15:20:54 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4F215A99.8020003@os2.kiev.ua> <4F27C04F.7020400@omnilan.de> <4F27C7C7.3060807@os2.kiev.ua> <4F37F81E.7070100@os2.kiev.ua> <4F38AF69.6010506@os2.kiev.ua> <20120213132821.GA78733@in-addr.com> <20120214200258.GA29641@server.vk2pj.dyndns.org> <4F429DFB.8050003@os2.kiev.ua> To: Alex Samorukov X-Mailer: Apple Mail (2.1257) X-Spam-Status: No, score=-50.0 required=3.8 tests=ALL_TRUSTED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on pooker.samsco.org Cc: freebsd-stable@freebsd.org, Peter Jeremy Subject: Re: disk devices speed is ugly 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: Mon, 20 Feb 2012 22:21:01 -0000 On Feb 20, 2012, at 12:24 PM, Alex Samorukov wrote: > On 02/15/2012 05:50 AM, Scott Long wrote: >>=20 >> What would be nice is a generic caching subsystem that any FS can use >> - similar to the old block devices but with hooks to allow the FS to >> request read-ahead, advise of unwanted blocks and ability to flush >> dirty blocks in a requested order with the equivalent of barriers >> (request Y will not occur until preceeding request X has been >> committed to stable media). This would allow filesystems to regain >> the benefits of block devices with minimal effort and then improve >> performance& cache efficiency with additional work. >>=20 >> Any filesystem that uses bread/bwrite/cluster_read are already using = the "generic caching subsystem" that you propose. This includes UDF, = CD9660, MSDOS, NTFS, XFS, ReiserFS, EXT2FS, and HPFS, i.e. every local = storage filesystem in the tree except for ZFS. Not all of them = implement VOP_GETPAGES/VOP_PUTPAGES, but those are just optimizations = for the vnode pager, not requirements for using buffer-cache services on = block devices. As Kostik pointed out in a parallel email, the only = thing that was removed from FreeBSD was the userland interface to cached = devices via /dev nodes. This has nothing to do with filesystems, though = I suppose that could maybe sorta kinda be an issue for FUSE?. > May be its possible to provide some generic interface for fuse based = filesystems to use this generic cache? I can test it and report = performance. >=20 What you're asking for is to bring back the cached raw devices. I don't = have a strong opinion on this one way or another, except that it's a = pretty specific use case. Does the inherent performance gap with user = land filesystems warrant this? Maybe a simple cache layer can be put = into FUSE that would allow client filesystems the same control over = block caching and clustering that is afforded in the kernel? Scott