From: Jens Axboe <jens.axboe@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Dmitri Monakhov <dmonakhov@openvz.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] Add block device speciffic splice write method
Date: Thu, 23 Oct 2008 09:16:00 +0200 [thread overview]
Message-ID: <20081023071559.GV22217@kernel.dk> (raw)
In-Reply-To: <20081023000315.6aa579f2.akpm@linux-foundation.org>
On Thu, Oct 23 2008, Andrew Morton wrote:
> On Thu, 23 Oct 2008 08:51:13 +0200 Jens Axboe <jens.axboe@oracle.com> wrote:
>
> > On Wed, Oct 22 2008, Andrew Morton wrote:
> > > On Thu, 23 Oct 2008 08:29:23 +0200 Jens Axboe <jens.axboe@oracle.com> wrote:
> > >
> > > > > But really it'd be better if the throttling happened down in
> > > > > pipe_to_file(), on a per-page basis. As it stands we can dirty an
> > > > > arbitrary number of pagecache pages without throttling. I think?
> > > >
> > > > That's pretty exactly why it isn't done in the actor, to avoid doing it
> > > > per-page. As it's going to be PIPE_BUFFERS (16) pages max, I think this
> > > > is better.
> > > >
> > > > Back in the splice early days, the balance_dirty_pages() actually showed
> > > > up in profiles when it was done on a per-page basis. So I'm reluctant to
> > > > change it :-)
> > >
> > > That's why (the misnamed) balance_dirty_pages_ratelimited() exists?
> >
> > I think that is what was used, but the details are a little hazy at this
> > point. So I can't say for sure.
>
> All that function does is to bump a per-cpu variable and
> once-per-thousand or so it does the balance. If it was causing
> problems in the splice application we want to know, because write()
> uses it!
Once per 8 or 32. If we haven't exceeded the dirty limit, calling it in
the actor or at the end should not make a difference for splice, since
we should be going into balance_dirty_pages() at most once.
Perhaps it was different some years ago, or perhaps the micro benchmarks
were screwed. Or perhaps my memory is shot, can't say for sure :)
> > In this case it's moot anyway, since we can kill it.
>
> Nope, we can only remove it if the fd is O_SYNC||is_sync().
Right, I forgot this is still the buffered path.
--
Jens Axboe
next prev parent reply other threads:[~2008-10-23 7:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-19 14:00 [PATCH] Add block device speciffic splice write method Dmitri Monakhov
2008-10-20 17:49 ` Jens Axboe
2008-10-20 18:11 ` Jens Axboe
2008-10-20 18:42 ` Dmitri Monakhov
2008-10-23 5:39 ` Andrew Morton
2008-10-23 6:29 ` Jens Axboe
2008-10-23 6:41 ` Andrew Morton
2008-10-23 6:51 ` Jens Axboe
2008-10-23 7:03 ` Andrew Morton
2008-10-23 7:16 ` Jens Axboe [this message]
2008-10-23 8:41 ` Dmitri Monakhov
2008-10-20 18:29 ` Dmitri Monakhov
2008-10-20 18:33 ` Jens Axboe
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=20081023071559.GV22217@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=dmonakhov@openvz.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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