How to profile the disk io performed through mmaps?

Yuri yuri at rawbw.com
Wed Jul 29 20:39:20 UTC 2009


Stanislav Sedov wrote:
> Yes, it should be possible to monitor files written to via mmapped region
> with EVFILT_VNODE kevents.  Please note, however, that changes to mmapped
> region may be propagated to the files not immediately depending on the
> region attributes.
>   

 From kqueue(2) I don't see how to get details (offsets/sizes) of 
write/extend events on the file.
When I ask filter EVFILT_VNODE to monitor events NOTE_EXTEND and NOTE_WRITE
kevent returns when any of them occur and it even ors NOTE_EXTEND and 
NOTE_WRITE
flags in the output kevent structure. It gives no further details.

So my question is largely open: how to monitor actual reads/writes on 
the file?

Yuri



More information about the freebsd-hackers mailing list