Matty wrote: > > Howdy, > > I am writing some DTrace scripts to trace NFSv3 operations. Since > numerous operations can be satisified by caches on the client, I > started to wonder if there was a way to determine if a given NFS > operation was satisfied from a local cache, or if a network I/O took > place. After reading through part of the NFSv3 client implementation > and reviewing the flowindent between nfs3_read:entry and > nfs3_read:return, it occurred to me that I might be able to set a > variable in a probe (e.g., tcp_send_data), and use > that variable to determine if the operation was satisified from the > server or a local cache. After a bunch of testing, it looks like this > approach won't work because of read-ahead, NFS block size vs read > size, and because the code paths change over time. Does anyone that is > bit more familar with the kernel / NFS client implementation happen to > know if there is a way to tell if an NFS read, lookup, etc. generated > an network I/O to the server?
For reads I think a simple way would be to see if a page fault was taken and if nfs3_getapage() was called. For lookups it would be nfs3lookup_otw(). Rao. > > Thanks for any insight, > - Ryan > -- > UNIX Administrator > http://daemons.net/~matty > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
