This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Retrieving filename / inode from page fault probe


Hi, friends:

I am benchmarking a NFS server, on which I want to answer this question:

When there is a NFS read request coming in, are the pages of the
requested file in page cache?

My plan is to record timestamp of arriving read request with
"network/nfsd-trace.stp" and record the file that corresponds to every
page-cache-add and page-cache-remove.  Once the data is collected, I
can match read request timeline with that of page cache to see if the
request is a hit or miss.

The following script aims to record the file that an added page belongs to:

probe kernel.trace("mm_filemap_add_to_page_cache") {
 f = inode_path($page->mapping->host)
 printf("%s %s \n", tz_ctime(gettimeofday_s()), f);
}

This will result in a read fault runtime error:
ERROR: read fault [man error::fault] at 0xffffffffffffff78 (addr) near
operator '->' at /usr/share/systemtap/tapset/linux/dentry.stp:65:33

Well, I'm not sure if this is the correct way of achieving the goal
...  It is also not clear to me how the probe differs from Systemtap's
"vm.pagefault" probe.

Anyone has suggest on this?

Thanks,

Yunchih


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]