linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Andres Freund <andres@anarazel.de>
Cc: Jan Kara <jack@suse.com>,
	linux-fsdevel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Al Viro <viro@ZenIV.linux.org.uk>
Subject: Re: [PATCH] fs: Make sync_file_range(2) use WB_SYNC_NONE writeback
Date: Wed, 28 Oct 2015 15:18:52 +0100	[thread overview]
Message-ID: <20151028141852.GA11575@quack.suse.cz> (raw)
In-Reply-To: <20151028093040.GG29811@alap3.anarazel.de>

  Hi Andres,

On Wed 28-10-15 10:30:40, Andres Freund wrote:
> 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.

If you could run it, it would be nice. Thanks!

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2015-10-28 14:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-24 19:28 [PATCH] fs: Make sync_file_range(2) use WB_SYNC_NONE writeback Jan Kara
2015-10-28  9:30 ` Andres Freund
2015-10-28 14:18   ` Jan Kara [this message]
2015-11-06 13:06     ` Andres Freund
2015-11-06 20:43       ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151028141852.GA11575@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=andres@anarazel.de \
    --cc=jack@suse.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).