[SCSI] zfcp: add measurement data for average qdio queue utilisation
authorMartin Peschke <mpeschke@linux.vnet.ibm.com>
Mon, 2 Mar 2009 12:08:56 +0000 (13:08 +0100)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 12 Mar 2009 17:58:18 +0000 (12:58 -0500)
Provide measurement data for the utilisation of the QDIO outbound queue.
The additional value allows to calculate an average queue utilisation
by looking at the deltas per time unit. Needed for capacity planning.
It is up to user space to handle wrap-arounds of the 64 bit value.

The new counter neatly complements the existing counter for queue full
conditions. That is why, both statistics counter have been integrated.

Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/s390/scsi/zfcp_aux.c
drivers/s390/scsi/zfcp_def.h
drivers/s390/scsi/zfcp_qdio.c
drivers/s390/scsi/zfcp_sysfs.c

index 497986f..969a3f0 100644 (file)
@@ -501,6 +501,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device)
        spin_lock_init(&adapter->scsi_dbf_lock);
        spin_lock_init(&adapter->rec_dbf_lock);
        spin_lock_init(&adapter->req_q_lock);
+       spin_lock_init(&adapter->qdio_stat_lock);
 
        rwlock_init(&adapter->erp_lock);
        rwlock_init(&adapter->abort_lock);
index 56302a1..a0cd4b0 100644 (file)
@@ -445,6 +445,9 @@ struct zfcp_adapter {
        spinlock_t              req_q_lock;        /* for operations on queue */
        int                     req_q_pci_batch;   /* SBALs since PCI indication
                                                      was last set */
+       ktime_t                 req_q_time; /* time of last fill level change */
+       u64                     req_q_util; /* for accounting */
+       spinlock_t              qdio_stat_lock;
        u32                     fsf_req_seq_no;    /* FSF cmnd seq number */
        wait_queue_head_t       request_wq;        /* can be used to wait for
                                                      more avaliable SBALs */
Simple merge
Simple merge