|
|
#include <sys/types.h> #include <sys/ddi.h>void met_ds_hist_stats(met_disk_stats_t *dsp, long cyl, ulong *start, ulong *end)
The driver calls met_ds_hist_stats on behalf of a completed read or write request, and it can be called either before or after sending another request. This routine updates response time, seek distance, and cylinder (or block) access histograms, but only if a user requests that this information be kept. If no users have requested histogram information, the routine returns without doing anything.
dsp is a pointer to a met_disk_stats_t statistics structure which was allocated through a call to met_ds_alloc_stats.
cyl is the start cylinder (or block number) for the completed request. If met_ds_alloc_stats was called with the flag MET_DS_CYL, cyl is the cylinder number; otherwise, cyl is the block number since met_ds_alloc_stats was called with the MET_DS_BLK flag. (If the MET_DS_NO_ACCESS_HIST flag is given to met_ds_alloc_stats, cyl is not needed.)
start and end are pointers to timestamps of when the request was enqueued and when it completed. The driver is responsible for recording those times. If the driver does not provide these times to met_ds_hist_stats, met_ds_alloc_stats should have been called with the MET_DS_NO_ACCESS_HIST flag set.
met_ds_hist_stats should be protected from interrupts.