Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jun 2010 13:35:04 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Gleb Kurtsou <gleb.kurtsou@gmail.com>
Cc:        alc@freebsd.org, pho@freebsd.org, fs@freebsd.org
Subject:   Re: Tmpfs elimination of double-copy
Message-ID:  <20100622103504.GW13238@deviant.kiev.zoral.com.ua>
In-Reply-To: <20100622092044.GA2958@tops>
References:  <20100621125825.GG13238@deviant.kiev.zoral.com.ua> <20100622092044.GA2958@tops>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100622103504.GW13238>