From owner-freebsd-fs@FreeBSD.ORG Thu Nov 28 00:21:26 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B6459FC for ; Thu, 28 Nov 2013 00:21:26 +0000 (UTC) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 1C7FE880 for ; Thu, 28 Nov 2013 00:21:25 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqEEAHKLllKDaFve/2dsb2JhbABZhBKCerVJgTd0giUBAQUjVgwPEQMBAgERGQIEHy4IBhOHbwMPrwiIXQ2IAheMcYFdGQoRBwaCZYFIA4lChm+FeI5FhTmDRx6Bbg X-IronPort-AV: E=Sophos;i="4.93,786,1378872000"; d="c'?scan'208";a="73025463" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-annu.net.uoguelph.ca with ESMTP; 27 Nov 2013 19:21:24 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id A27CFB40B4; Wed, 27 Nov 2013 19:21:24 -0500 (EST) Date: Wed, 27 Nov 2013 19:21:24 -0500 (EST) From: Rick Macklem To: Kirk McKusick Message-ID: <66384815.22292870.1385598084659.JavaMail.root@uoguelph.ca> In-Reply-To: <201311272320.rARNKEKQ045789@chez.mckusick.com> Subject: Re: RFC: NFS client patch to reduce sychronous writes MIME-Version: 1.0 X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 7.2.1_GA_2790 (ZimbraWebClient - FF3.0 (Win)/7.2.1_GA_2790) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Cc: FreeBSD FS X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 00:21:26 -0000 Oops, I did my usual and forgot to attach the test program. Here it is, rick ----- Original Message ----- > > Date: Wed, 27 Nov 2013 17:50:48 -0500 (EST) > > From: Rick Macklem > > To: Konstantin Belousov > > Subject: Re: RFC: NFS client patch to reduce sychronous writes > > > > Kostik wrote: > >> Sorry, I do not understand the question. mmap(2) itself does not > >> change > >> file size. But if mmaped area includes the last page, I still > >> think > >> that the situation I described before is possible. > > > > Yes, I'll need to look at this. If it is a problem, all I can think > > of > > is bzeroing all new pages when they're allocated to the buffer > > cache. > > > > Thanks for looking at it, rick > > ps: Btw, jhb@'s patch didn't have the bzeroing in it. > > The ``fix'' of bzero'ing every buffer cache page was made to UFS/FFS > for this problem and it killed write performance of the filesystem > by nearly half. We corrected this by only doing the bzero when the > file is mmap'ed which helped things considerably (since most files > being written are not also bmap'ed). > > Kirk >