linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Curt Wohlgemuth <curtw@google.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] writeback: Don't wait for completion in writeback_inodes_sb_nr
Date: Tue, 28 Jun 2011 18:56:41 -0700	[thread overview]
Message-ID: <BANLkTimKtwVZo3D+w9AB2-C83d08YROcMw@mail.gmail.com> (raw)
In-Reply-To: <20110629005422.GQ32466@dastard>

Hi Dave:

Thanks for the response.

On Tue, Jun 28, 2011 at 5:54 PM, Dave Chinner <david@fromorbit.com> wrote:
> On Tue, Jun 28, 2011 at 04:43:35PM -0700, Curt Wohlgemuth wrote:
>> Contrary to the comment block atop writeback_inodes_sb_nr(),
>> we *were* calling
>>
>>         wait_for_completion(&done);
>>
>> which should not be done, as this is not called for data
>> integrity sync.
>>
>> Signed-off-by: Curt Wohlgemuth <curtw@google.com>
>
> The comment says it does not wait for IO to be -completed-.
>
> The function as implemented waits for IO to be *submitted*.
>
> This provides the callers with same blocking semantics (i.e. request
> queue full) as if the caller submitted the IO themselves. The code
> that uses this function rely on this blocking to delay the next set
> of operations they do until after IO has been started, so removing
> the completion will change their behaviour significantly.

I don't quite understand this.  It's true that all IO done as a result
of calling wb_writeback() on this work item won't finish before the
completion takes place, but sending all those pages in flight *will*
take place.  And that's a lot of time.  To wait on this before we then
call sync_inodes_sb(), and do it all over again, seems odd at best.

Pre-2.6.35 kernels would start non-integrity sync writeback and
immediately return, which would seem like a reasonable "prefetch-y"
thing to do, considering it's going to be immediately followed by a
data integrity sync writeback operation.

The post 2.6.35 semantics are fine; but then I don't understand why we
do both a __sync_filesystem(0) followed by a __sync_filesystem(1) (in
the case of sync(2)).  It doesn't seem to be any safer or more correct
to me; why not just do the data integrity sync writeback and call it a
day?

Thanks,
Curt

>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-06-29  1:56 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28 23:43 [PATCH] writeback: Don't wait for completion in writeback_inodes_sb_nr Curt Wohlgemuth
2011-06-29  0:54 ` Dave Chinner
2011-06-29  1:56   ` Curt Wohlgemuth [this message]
2011-06-29  8:11     ` Christoph Hellwig
2011-06-29 16:57       ` Jan Kara
2011-06-29 17:55         ` Christoph Hellwig
2011-06-29 19:15           ` Jan Kara
2011-06-29 20:12             ` Christoph Hellwig
2011-06-30 12:15               ` Jan Kara
2011-06-30 12:37                 ` Christoph Hellwig
2011-07-01 22:55             ` Curt Wohlgemuth
2011-07-02 11:32               ` Christoph Hellwig
2011-07-11 17:00               ` Jan Kara
2011-07-11 17:11                 ` Curt Wohlgemuth
2011-07-11 19:48                   ` Jan Kara
2011-07-11 19:51                     ` Curt Wohlgemuth
2011-07-11 20:11                     ` Christoph Hellwig
2011-07-12 10:34                       ` Jan Kara
2011-07-12 10:41                         ` Christoph Hellwig
2011-07-12 22:37                           ` Jan Kara
2011-07-14 16:29                             ` Curt Wohlgemuth
2011-07-14 23:08                               ` Jan Kara
2011-07-19 16:56                                 ` Christoph Hellwig
2011-07-21 18:35                                   ` Jan Kara
2011-07-22 15:16                                     ` Christoph Hellwig
2011-07-19 16:53                               ` Christoph Hellwig
2011-07-19 16:51                             ` Christoph Hellwig
2011-07-20 22:00                               ` Jan Kara
2011-07-22 15:11                                 ` Christoph Hellwig
2011-06-29 17:26       ` Curt Wohlgemuth
2011-06-29 18:00         ` Christoph Hellwig
2011-06-29 21:30           ` Curt Wohlgemuth
2011-07-19 15:54             ` Christoph Hellwig
2011-06-29  6:42   ` Christoph Hellwig

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=BANLkTimKtwVZo3D+w9AB2-C83d08YROcMw@mail.gmail.com \
    --to=curtw@google.com \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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).