Le 1 mars 08 à 22:14, Bill Shannon a écrit :
> Jonathan Edwards wrote:
>>
>> On Mar 1, 2008, at 3:41 AM, Bill Shannon wrote:
>>> Running just plain "iosnoop" shows accesses to lots of files, but
>>> none
>>> on my zfs disk. Using "iosnoop -d c1t1d0" or "iosnoop -m
>>> /export/home/shannon"
>>> shows nothing at all. I tried /usr/demo/dtrace/iosnoop.d too, still
>>> nothing.
>>
>> hi Bill
>>
>> this came up sometime last year .. io:::start won't work since ZFS
>> doesn't call bdev_strategy() directly .. you'll want to use something
>> more like zfs_read:entry, zfs_write:entry and zfs_putpage or
>> zfs_getpage
>> for mmap'd ZFS files
>
Ed:
That's not entirely accurate. I believe ZFS does lead to bdev_strategy
being called and io:::start
will fire for ZFS I/Os. The problem is that a ZFS I/O can be servicing
a number of ZFS operations on a
number of different files (which is a great performance enabler).
Given that we can't map an I/O to a file,
iosnoop does not report the file info.
> Ah ha! Maybe someone should report this to the right people and get
> the
> dtrace toolkit and dtrace demo programs fixed?
Bill
Did the dtrace cmd I sent you gave any hints ?
-r
>> here's one i hacked from our discussion back then to track some
>> timings
>> on files:
>>
>>> cat zfs_iotime.d
>>
>> #!/usr/sbin/dtrace -s
>>
>> # pragma D option quiet
>>
>> zfs_write:entry,
>> zfs_read:entry,
>> zfs_putpage:entry,
>> zfs_getpage:entry
>> {
>> self->ts = timestamp;
>> self->filepath = args[0]->v_path;
>> }
>>
>> zfs_write:return,
>> zfs_read:return,
>> zfs_putpage:return,
>> zfs_getpage:return
>> /self->ts && self->filepath/
>> {
>> printf("%s on %s took %d nsecs\n", probefunc,
>> stringof(self->filepath), timestamp - self->ts);
>> self->ts = 0;
>> self->filepath = 0;
>> }
>
> Ok, that's much better! At least I'm getting output when I touch
> files
> on zfs. However, even though zpool iostat is reporting activity, the
> above program isn't showing any file accesses when the system is idle.
>
> Any ideas?
> _______________________________________________
> dtrace-discuss mailing list
> [email protected]
_______________________________________________
dtrace-discuss mailing list
[email protected]