From: Dave Chinner <david@fromorbit.com>
To: Shawn Bohrer <shawn.bohrer@gmail.com>
Cc: xfs@oss.sgi.com
Subject: Re: Latencies writing to memory mapped files
Date: Tue, 21 Sep 2010 08:48:33 +1000 [thread overview]
Message-ID: <20100920224833.GB2614@dastard> (raw)
In-Reply-To: <20100920221726.GA3182@BohrerMBP.rgmadvisors.com>
On Mon, Sep 20, 2010 at 05:17:26PM -0500, Shawn Bohrer wrote:
> Thanks Dave for your explanations.
>
> On Mon, Sep 20, 2010 at 10:05:35AM +1000, Dave Chinner wrote:
> > FWIW, if you can work out the magic necessary (perhaps systemtap) it
> > woul dbe really interesting to know whether it is the same buffer
> > that is causing the latency every time (i.e. get the bp->b_bn field
> > from the metadata buffer). With the block number, we can use xfs_db
> > to dig out what the buffer actually is....
>
> I'm working on a dev box right now so I just added a trace_printk() to
> print out the bp->b_bn field when the xfs_buf_lock blocks for more
> than 300ms. Here are some numbers (I can easily get a lot more):
>
> _xfs_buf_find: xfs_buf_lock blocked for 1843ms on bp->b_bn: 812730376
> _xfs_buf_find: xfs_buf_lock blocked for 1504ms on bp->b_bn: 406702514
> _xfs_buf_find: xfs_buf_lock blocked for 307ms on bp->b_bn: 881190896
> _xfs_buf_find: xfs_buf_lock blocked for 433ms on bp->b_bn: 406703400
> _xfs_buf_find: xfs_buf_lock blocked for 420ms on bp->b_bn: 541595968
> _xfs_buf_find: xfs_buf_lock blocked for 308ms on bp->b_bn: 44945968
> _xfs_buf_find: xfs_buf_lock blocked for 702ms on bp->b_bn: 406027744
> _xfs_buf_find: xfs_buf_lock blocked for 454ms on bp->b_bn: 474486504
> _xfs_buf_find: xfs_buf_lock blocked for 869ms on bp->b_bn: 881195976
> _xfs_buf_find: xfs_buf_lock blocked for 387ms on bp->b_bn: 1287891544
> _xfs_buf_find: xfs_buf_lock blocked for 397ms on bp->b_bn: 1220116224
> _xfs_buf_find: xfs_buf_lock blocked for 461ms on bp->b_bn: 2101644280
> _xfs_buf_find: xfs_buf_lock blocked for 312ms on bp->b_bn: 338919728
> _xfs_buf_find: xfs_buf_lock blocked for 356ms on bp->b_bn: 1016769536
> _xfs_buf_find: xfs_buf_lock blocked for 593ms on bp->b_bn: 474488848
> _xfs_buf_find: xfs_buf_lock blocked for 323ms on bp->b_bn: 1022248984
>
> I should say that not every one of these results in a stall in my
> application, since my app needs to generate a page fault while that
> lock is held.
Hmmm - it would be good to know which one produced the latency,
given there does not appear to be a pattern in the block numbers.
> What do I need to do to convert the block numbers to a buffer?
# xfs_db -r -c "daddr 812730376" -c "print" <dev>
Will dump the sector at that address. That should be enough to tell
us what is in the buffer (by the magic number).
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-09-20 22:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 15:26 Latencies writing to memory mapped files Shawn Bohrer
2010-09-16 0:18 ` Dave Chinner
2010-09-17 15:45 ` Shawn Bohrer
2010-09-20 0:05 ` Dave Chinner
2010-09-20 22:17 ` Shawn Bohrer
2010-09-20 22:48 ` Dave Chinner [this message]
2010-09-21 18:05 ` Shawn Bohrer
2010-09-21 23:15 ` Dave Chinner
2010-09-29 15:31 ` Shawn Bohrer
2010-09-29 23:19 ` Dave Chinner
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=20100920224833.GB2614@dastard \
--to=david@fromorbit.com \
--cc=shawn.bohrer@gmail.com \
--cc=xfs@oss.sgi.com \
/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