xfs
[Top] [All Lists]

Re: xfs_buf and buffercache/pagecache connection

To: Yannis Klonatos <klonatos@xxxxxxxxxxxx>
Subject: Re: xfs_buf and buffercache/pagecache connection
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 1 Jun 2010 08:06:03 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <4C03E46B.9040407@xxxxxxxxxxxx>
References: <4C03E46B.9040407@xxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Mon, May 31, 2010 at 07:31:39PM +0300, Yannis Klonatos wrote:
> Hello,
> 
>         I was looking to add a kernel hook to my system in order to
> monitor buffer-cache hit and misses. Initially I was
> planning to add my modifications to the __getblk(). However, i
> noticed that XFS does not directly use the buffer-cache
> for its pages but it seems to implement its own buffer.
>         What I am now looking for is 1) the place where XFS checks
> whether a page exists in its buffer or not and 2)
> what are the possible interactions between xfs_buf and the Linux
> kernel buffer-cache.
>         I would appreciate any information regarding the above issues.

There are already stats in place to tell you about this.

http://xfs.org/index.php/Runtime_Stats#buf_-_Buf_Statistics

They aren't documented there, but if you look at
fs/xfs/linux-2.6/xfs_buf.c an search for XFS_STATS_INC you'll find
what they all mean from the code. It isn't as simple as hit or miss
counters - there's different counters for different types of hits
and misses....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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