Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jun 2010 10:30:55 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-fs@freebsd.org
Cc:        alc@freebsd.org, fs@freebsd.org, pho@freebsd.org
Subject:   Re: Tmpfs elimination of double-copy
Message-ID:  <201006211030.55327.jhb@freebsd.org>
In-Reply-To: <20100621125825.GG13238@deviant.kiev.zoral.com.ua>
References:  <20100621125825.GG13238@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 21 June 2010 8:58:25 am 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.
> 
> 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.

Why did you have to move vnp_size out of the union?  Is tmpfs using a non-
OBJT_VNODE object to hold file data?

-- 
John Baldwin



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