From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodore Ts'o Subject: Re: [PATCH RFC] vfs: add a O_NOMTIME flag Date: Wed, 6 May 2015 19:21:46 -0400 Message-ID: <20150506232146.GB12706@thunk.org> References: <1430949612-21356-1-git-send-email-zab@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Trond Myklebust , Zach Brown , Alexander Viro , Linux FS-devel Mailing List , Linux Kernel Mailing List , Linux API Mailing List To: Sage Weil Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On Wed, May 06, 2015 at 03:19:13PM -0700, Sage Weil wrote: > > Just out of curiosity, if you need to modify the application anyway, > > why wouldn't use of fdatasync() when flushing be able to offer a > > similar performance boost? > > Although fdatasync(2) doesn't have to update synchronously, it does > eventually get written, and that can trigger lots of unwanted IO. Something that might be worth trying out is using MS_LAZYTIME plus fdatasync(2). That should significantly reduce the unwanted IO, while eventually letting the mtimes get updated, plus allowing updates of adjacent inodes in the same inode table block update the mtime "for free". Regards, - Ted