Date: Tue, 22 Jun 2010 12:20:44 +0300 From: Gleb Kurtsou <gleb.kurtsou@gmail.com> To: Kostik Belousov <kostikbel@gmail.com> Cc: alc@freebsd.org, pho@freebsd.org, fs@freebsd.org Subject: Re: Tmpfs elimination of double-copy Message-ID: <20100622092044.GA2958@tops> 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 (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 > > 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. Thanks, Gleb.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100622092044.GA2958>