Hi Daniel,

qihua wu wrote:
> Hi, All,
>
> Do we have entry point to tell us whether the IO performed bypass FS 
> cache or not?
> Somebody said using dd to copy file using raw disk format such as dd 
> if=/dev/dsk/...  will bypass the FS cache but using dd to copy a 
> normal file will NOT bypass the FS cache, I'd like to verify this. I 
> am wondering whether Dtrace could help on this case.
If the I/O (specifically, read/write) is not going through a cache 
from/to the disk,
the physio(9f) routine should be called.  Take a look at the physio(9f) 
man page.

So,
# dtrace -n 'physio:entry{}'
should fire on read/write calls that bypass any caching.   Try this with
dd if=foo of=/dev/null count=10

where foo is the file.  If physio() is not getting called, code above 
the disk
driver is buffering the data (or someone has written a very different 
disk driver...).
If you try dd with the raw device, you'll see physio(9f) getting called.


max



_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to