From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andres Freund Subject: Re: [PATCH] fs: Make sync_file_range(2) use WB_SYNC_NONE writeback Date: Wed, 28 Oct 2015 10:30:40 +0100 Message-ID: <20151028093040.GG29811@alap3.anarazel.de> References: <1445714897-26342-1-git-send-email-jack@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Andrew Morton , Al Viro To: Jan Kara Return-path: Received: from mail.anarazel.de ([217.115.131.40]:57632 "EHLO mail.anarazel.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750916AbbJ1Jao (ORCPT ); Wed, 28 Oct 2015 05:30:44 -0400 Content-Disposition: inline In-Reply-To: <1445714897-26342-1-git-send-email-jack@suse.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi Jan, Thanks for looking into this and promptly sending a patch. On 2015-10-24 21:28:17 +0200, Jan Kara wrote: > These days do_sync_mapping_range() went away and we can switch > sync_file_range(2) back to issuing WB_SYNC_NONE writeback. That should > help PostgreSQL avoid large latency spikes when flushing data in the > background. > > diff --git a/fs/sync.c b/fs/sync.c > index fbc98ee62044..ef60e812d771 100644 > --- a/fs/sync.c > +++ b/fs/sync.c > @@ -343,7 +343,8 @@ SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes, > } > > if (flags & SYNC_FILE_RANGE_WRITE) { > - ret = filemap_fdatawrite_range(mapping, offset, endbyte); > + ret = __filemap_fdatawrite_range(mapping, offset, endbyte, > + WB_SYNC_NONE); > if (ret < 0) > goto out_put; > } Thanks. Would scheduling a comparative benchmark of this be helpful pushing htis forward ? Would probably only be early next week, I'm at the european postgresql conference right now. Regards, Andres