DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

met_ds_hist_stats(D3)


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)

Description

met_ds_hist_stats updates disk access and response time histograms when a read or write request completes.

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.

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.

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.

Context and synchronization

Non-blockable, interrupt, user, or blockable context.

Hardware applicability

All

Version applicability

ddi: 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

References

met_ds_alloc_stats(D3), met_ds_dequeued(D3), met_ds_iodone(D3)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005