From owner-freebsd-fs@FreeBSD.ORG Mon Jun 21 15:43:46 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38C881065670; Mon, 21 Jun 2010 15:43:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0B22B8FC20; Mon, 21 Jun 2010 15:43:46 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B2E5946B4C; Mon, 21 Jun 2010 11:43:45 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A4C4F8A04E; Mon, 21 Jun 2010 11:43:44 -0400 (EDT) From: John Baldwin To: freebsd-fs@freebsd.org Date: Mon, 21 Jun 2010 10:30:55 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <20100621125825.GG13238@deviant.kiev.zoral.com.ua> In-Reply-To: <20100621125825.GG13238@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201006211030.55327.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 21 Jun 2010 11:43:44 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: alc@freebsd.org, fs@freebsd.org, pho@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: Mon, 21 Jun 2010 15:43:46 -0000 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