mirror_zfs/lib
Prakash Surya 1421c89142 Add visibility in to arc_read
This change is an attempt to add visibility into the arc_read calls
occurring on a system, in real time. To do this, a list was added to the
in memory SPA data structure for a pool, with each element on the list
corresponding to a call to arc_read. These entries are then exported
through the kstat interface, which can then be interpreted in userspace.

For each arc_read call, the following information is exported:

 * A unique identifier (uint64_t)
 * The time the entry was added to the list (hrtime_t)
   (*not* wall clock time; relative to the other entries on the list)
 * The objset ID (uint64_t)
 * The object number (uint64_t)
 * The indirection level (uint64_t)
 * The block ID (uint64_t)
 * The name of the function originating the arc_read call (char[24])
 * The arc_flags from the arc_read call (uint32_t)
 * The PID of the reading thread (pid_t)
 * The command or name of thread originating read (char[16])

From this exported information one can see, in real time, exactly what
is being read, what function is generating the read, and whether or not
the read was found to be already cached.

There is still some work to be done, but this should serve as a good
starting point.

Specifically, dbuf_read's are not accounted for in the currently
exported information. Thus, a follow up patch should probably be added
to export these calls that never call into arc_read (they only hit the
dbuf hash table). In addition, it might be nice to create a utility
similar to "arcstat.py" to digest the exported information and display
it in a more readable format. Or perhaps, log the information and allow
for it to be "replayed" at a later time.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2013-10-25 13:57:25 -07:00
..
libavl Remove autotools products 2012-08-27 11:47:44 -07:00
libefi Generate libraries with correct DT_NEEDED entries 2013-10-10 16:56:51 -07:00
libnvpair Illumos #2619 and #2747 2013-01-08 10:35:35 -08:00
libshare Add smb_available() sanity checks 2013-04-02 09:27:52 -07:00
libspl Revert "Add txgs-<pool> kstat file" 2013-10-25 13:57:25 -07:00
libunicode Remove autotools products 2012-08-27 11:47:44 -07:00
libuutil Remove autotools products 2012-08-27 11:47:44 -07:00
libzfs Increase default udev wait time 2013-10-22 10:25:51 -07:00
libzfs_core Fix libzfs_core changes to follow GNU libtool guidelines 2013-10-10 16:56:51 -07:00
libzpool Add visibility in to arc_read 2013-10-25 13:57:25 -07:00
Makefile.am Illumos #2882, #2883, #2900 2013-09-04 15:49:00 -07:00