xfs
[Top] [All Lists]

Re: Latencies writing to memory mapped files

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: Latencies writing to memory mapped files
From: Shawn Bohrer <shawn.bohrer@xxxxxxxxx>
Date: Mon, 20 Sep 2010 17:17:26 -0500
Cc: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=5G9lfPOmfu6GGRq23CFdEq5ekuoS4KEUnqMUayqvfSg=; b=lbNqYCA6bVHFMwDQE4oXcaN7+41hFOejUEJGPVRL8MUSdCYhUrTKDG7edMKNcMmzWG fUJls7gs/W3ZZqp9RwYM4jg+1xFV8NzmeEuZxR6wl3ub0Hvh4vQ1HhQqUH30V+n5jF8B UAWXeHpclZP0iImrAic8LoQKKFdagFXlMZThE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=IPCslph9khiD13GgZTKOfbezoyE1P/PqzwM/aZ5PpXffQy4b2v7okVSNSx3dcgP0hT kcIqvMX2k1889txILpnALYxdwkeVBthqUyO0tg/CsVEmhQa2VRjf3zK3AjpVTUkYFHCm f9H6Omcnz9Y9czNKSVuDDgu5hFnrvPVpwRp/Y=
In-reply-to: <20100920000535.GM24409@dastard>
References: <20100915152633.GA2585@xxxxxxxxxxxxxxxxxxxxxxxxx> <20100916001837.GF24409@dastard> <20100917154523.GA2739@xxxxxxxxxxxxxxxxxxxxxxxxx> <20100920000535.GM24409@dastard>
User-agent: Mutt/1.5.20 (2009-12-10)
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.

What do I need to do to convert the block numbers to a buffer?

Thanks,
Shawn

<Prev in Thread] Current Thread [Next in Thread>