Tmpfs elimination of double-copy

Kostik Belousov kostikbel at gmail.com
Tue Jun 22 10:35:10 UTC 2010


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=revision&revision=197850
As I said, I did not looked at the issue, and did not verified it.

> 
> > 
> > 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.
> > 
> > Peter Holm helped me with the patch, apparently we survive fsx and stress2.
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20100622/540545b6/attachment.pgp


More information about the freebsd-fs mailing list