met_ds_hist_stats(D3) met_ds_hist_stats(D3)
NAME
met_ds_hist_stats - update disk access and response time
histograms when a request completes
SYNOPSIS
#include <sys/types.h>
#include <sys/ddi.h>
void
met_ds_hist_stats(met_disk_stats_t *dsp, long cyl, ulong *start,
ulong *end)
Arguments
dsp Pointer to a met_disk_stats_t statistics structure.
cyl The start cylinder (or block number) for the
completed request.
start Pointer to timestamp recording when request was
queued.
end Pointer to timestamp recording when a request was
completed.
DESCRIPTION
met_ds_hist_stats updates disk access and response time
histograms when a read or write request completes.
Return Values
None.
USAGE
When a read or write request completes, the driver calls two
statistics routines, met_ds_iodone(D3) and
met_ds_hist_stats(D3). The first is mandatory, but the second
is optional, although if it is not called,
met_ds_alloc_stats(D3) should be called with the flags
MET_DS_NO_ACCESS_HIST and MET_DS_NO_RESP_HIST set.
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.
Copyright 1994 Novell, Inc. Page 1
met_ds_hist_stats(D3) met_ds_hist_stats(D3)
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.
Level
Base or Interrupt.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
REFERENCES
met_ds_alloc_stats(D3), met_ds_dequeued(D3), met_ds_iodone(D3)
NOTICES
Portability
All processors
Applicability
ddi: 5, 5mp, 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2