From owner-freebsd-fs@FreeBSD.ORG Wed Nov 27 23:20:19 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 602CAEB7 for ; Wed, 27 Nov 2013 23:20:19 +0000 (UTC) Received: from chez.mckusick.com (chez.mckusick.com [IPv6:2001:5a8:4:7e72:4a5b:39ff:fe12:452]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4179231C for ; Wed, 27 Nov 2013 23:20:19 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id rARNKEKQ045789; Wed, 27 Nov 2013 15:20:14 -0800 (PST) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201311272320.rARNKEKQ045789@chez.mckusick.com> To: Rick Macklem Subject: Re: RFC: NFS client patch to reduce sychronous writes In-reply-to: <661293549.22251424.1385592648623.JavaMail.root@uoguelph.ca> Date: Wed, 27 Nov 2013 15:20:14 -0800 From: Kirk McKusick 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: Wed, 27 Nov 2013 23:20:19 -0000 > 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