All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@bfk.de>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Does fsync() block read and write ops on the same file?
Date: Fri, 11 Dec 2009 12:53:11 +0000	[thread overview]
Message-ID: <824onxekp4.fsf@mid.bfk.de> (raw)
In-Reply-To: <20091211124224.GK30608@discord.disaster> (Dave Chinner's message of "Fri\, 11 Dec 2009 23\:42\:24 +1100")

* Dave Chinner:

>> I'm not concerned with fsync latency per se.  It's going to take a
>> while to write a few GBs scattered across the file.  However, it's
>> annoying that read operations on the same file (which can't even see
>> the effect of the fsync operation) are blocked, some times for more
>> than two minutes.
>
> If they are blocking for that long then sysrq-w during that period
> will tell us exactly where in what filesystem they are blocking on....

Interesting.  Is it possible to trigger this from the hang timer?
From that, I've got two traces:

[307370.450502] Call Trace:
[307370.450555]  [<ffffffff802aa9c8>] dput+0x1c/0xdd
[307370.450590]  [<ffffffff8042a2e9>] __down_read+0x87/0xa1
[307370.450641]  [<ffffffffa0276cd8>] :xfs:xfs_ilock+0x31/0x60
[307370.450684]  [<ffffffffa029a208>] :xfs:xfs_read+0x147/0x21a
[307370.450718]  [<ffffffff8029ae23>] do_sync_read+0xc9/0x10c
[307370.450750]  [<ffffffff80246201>] autoremove_wake_function+0x0/0x2e
[307370.450787]  [<ffffffff8029b614>] vfs_read+0xaa/0x152
[307370.450815]  [<ffffffff8029b9f5>] sys_read+0x45/0x6e
[307370.450844]  [<ffffffff8020beca>] system_call_after_swapgs+0x8a/0x8f

[307396.186071] Call Trace:
[307396.186128]  [<ffffffff8042963d>] __mutex_lock_slowpath+0x64/0x9b
[307396.186160]  [<ffffffff804294a2>] mutex_lock+0xa/0xb
[307396.186190]  [<ffffffff8029b749>] generic_file_llseek+0x2a/0x8b
[307396.186219]  [<ffffffff8029b8f8>] sys_lseek+0x40/0x60
[307396.186248]  [<ffffffff8020beca>] system_call_after_swapgs+0x8a/0x8f

-- 
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99
--
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:[~2009-12-11 12:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-10  9:22 Does fsync() block read and write ops on the same file? Florian Weimer
2009-12-11  3:55 ` Dave Chinner
2009-12-11  8:53   ` Florian Weimer
2009-12-11 12:42     ` Dave Chinner
2009-12-11 12:53       ` Florian Weimer [this message]
2009-12-12 23:05         ` Dave Chinner
2009-12-11 13:21       ` Christoph Hellwig
2009-12-11 13:35         ` Florian Weimer

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=824onxekp4.fsf@mid.bfk.de \
    --to=fweimer@bfk.de \
    --cc=david@fromorbit.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.