linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Timothy Shimmin <tes@sgi.com>
To: Bryan Henderson <hbryan@us.ibm.com>
Cc: jim owens <jowens@hp.com>, linux-fsdevel@vger.kernel.org
Subject: Re: fdatasync/barriers (was : [Bug 421482] Firefox 3 uses fsync excessively)
Date: Fri, 30 May 2008 14:00:15 +1000	[thread overview]
Message-ID: <483F7BCF.6080107@sgi.com> (raw)
In-Reply-To: <OFB3ADB835.F4CB5A92-ON88257458.007E1C76-88257458.007FCA17@us.ibm.com>

Bryan Henderson wrote:
> jim owens <jowens@hp.com> wrote on 05/29/2008 11:46:10 AM:
> 
>> Bryan Henderson wrote:
>>>> Here's a thought for someone implementing fdatasync().  If a database
>>>> uses O_DIRECT writes (typically with aio), then wants data which it's
>>>> written to be committed to the hard disk platter, and the filesystem
>>>> is mounted "barrier=1" - should it call fdatasync()?  Should that emit
>>>> the barrier?  If another application uses normal (not O_DIRECT)
>>>> writes, and then _is delayed_ so long that kernel writeback occurs and
>>>> all cache is clean, and then calls fdatasync(), should that call emit
>>>> a barrier in that case?  (Answers imho: yes and yes).
>>>
>>> I don't get it.  What would be the value of emitting the barrier?
>> In both cases the FS must flush the drive write cache.
>>
>> So which of Jamie's traps got you ...
> 
> Must have been where he assumes we think of a barrier as something that 
> causes a flush of the drive write cache.  That actually didn't cross my 
> mind in reading the proposal; it's probably some context I missed from 
> earlier in the thread.
> 
> If the idea is for fdatasync() to have that sync-to-platter function, 
> fdatasync() should just tell the block layer to sync previously written 
> data (now in the drive cache) to the platter; it has an interface for 
> that, doesn't it?
> 
blkdev_issue_flush() do you mean?

--Tim

  reply	other threads:[~2008-05-30  4:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-421482-310856@https.bugzilla.mozilla.org/>
     [not found] ` <200805260513.m4Q5DAU8018498@mrapp54.mozilla.org>
2008-05-26  7:05   ` [Bug 421482] Firefox 3 uses fsync excessively Andrew Morton
2008-05-26 10:07     ` Theodore Tso
2008-05-26 11:10       ` Jörn Engel
2008-05-26 11:38         ` Theodore Tso
2008-05-26 12:52           ` Jörn Engel
2008-05-26 20:22             ` Jamie Lokier
2008-05-29 17:08               ` fdatasync/barriers (was : [Bug 421482] Firefox 3 uses fsync excessively) Bryan Henderson
2008-05-29 18:46                 ` jim owens
2008-05-29 23:15                   ` Bryan Henderson
2008-05-30  4:00                     ` Timothy Shimmin [this message]
2008-05-30 14:14                       ` jim owens
2008-05-30 16:25                         ` Bryan Henderson
2008-05-30 18:48                           ` jim owens
2008-06-02 17:31                             ` Bryan Henderson
2008-05-26 18:49       ` [Bug 421482] Firefox 3 uses fsync excessively Andrew Morton

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=483F7BCF.6080107@sgi.com \
    --to=tes@sgi.com \
    --cc=hbryan@us.ibm.com \
    --cc=jowens@hp.com \
    --cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).