From owner-freebsd-fs@FreeBSD.ORG Tue Jun 22 10:35:10 2010 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0013E106566B; Tue, 22 Jun 2010 10:35:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2C6BD8FC08; Tue, 22 Jun 2010 10:35:08 +0000 (UTC) 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 o5MAZ4H4041152 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Jun 2010 13:35:04 +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.4/8.14.4) with ESMTP id o5MAZ4pm077578; Tue, 22 Jun 2010 13:35:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o5MAZ4Gh077568; Tue, 22 Jun 2010 13:35:04 +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: Tue, 22 Jun 2010 13:35:04 +0300 From: Kostik Belousov To: Gleb Kurtsou Message-ID: <20100622103504.GW13238@deviant.kiev.zoral.com.ua> References: <20100621125825.GG13238@deviant.kiev.zoral.com.ua> <20100622092044.GA2958@tops> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CN3FGaqzfdtlPLTf" Content-Disposition: inline In-Reply-To: <20100622092044.GA2958@tops> 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=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: alc@freebsd.org, pho@freebsd.org, fs@freebsd.org Subject: Re: Tmpfs elimination of double-copy X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2010 10:35:10 -0000 --CN3FGaqzfdtlPLTf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 22, 2010 at 12:20:44PM +0300, Gleb Kurtsou wrote: > On (21/06/2010 15:58), Kostik Belousov wrote: > > Hi, > > Below is the patch that eliminates second copy of the data kept by tmpfs > > in case a file is mapped. Also, it removes potential deadlocks due to > > tmpfs doing copyin/out while page is busy. It is possible that patch > > also fixes known issue with sendfile(2) of tmpfs file, but I did not > > verified this. > What is that sendfile issue you refer to? I though it was fixed: > http://svn.freebsd.org/viewvc/base?view=3Drevision&revision=3D197850 As I said, I did not looked at the issue, and did not verified it. >=20 > >=20 > > Patch essentially consists of three parts: > > - move of vm_object' vnp_size from the type-discriminated union to the > > vm_object proper; > > - making vm not choke when vm object held in the struct vnode' v_object > > is default or swap object instead of vnode object; > > - use of the swap object that keeps data for tmpfs VREG file, also as > > v_object. > >=20 > > Peter Holm helped me with the patch, apparently we survive fsx and stre= ss2. > There is race issue in tmpfs_rename(). It can be easily provoked with > blogbench. I don't remember details but it seems node from fdvp can > disappear during call. Probably UFS-style exclusively lock all vnodes in > VOP_RENAME() should work great for tmpfs. If you have ideas on how to > fix it I'll find time to work on it, it's somewhat related to my > dircache project. I believe there is still an issue in tmpfs_lookup(), but I did not looked at it for long time. --CN3FGaqzfdtlPLTf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkwgkdgACgkQC3+MBN1Mb4g6BACeKQm0DPZxlqRALx3HG48m5Mna P24AoOFdhp8bcxSqenmWQQRI3UTBQt6m =eKet -----END PGP SIGNATURE----- --CN3FGaqzfdtlPLTf--