Message ID | 20181108144458.29012-12-maier@linux.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | zfcp updates for v4.21 | expand |
On 11/8/18 3:44 PM, Steffen Maier wrote: > There is no point for double bookkeeping especially just for tracing. > The trace can take it from the QTCB which always exists for non-SRB > responses traced with zfcp_dbf_hba_fsf_res(). > > As a side effect, this removes an alignment hole and reduces the > size of struct zfcp_fsf_req, and thus of each pending request, by > 8 bytes. > Before: > $ pahole -C zfcp_fsf_req drivers/s390/scsi/zfcp.ko > ... > struct fsf_qtcb * qtcb; /* 144 8 */ > u32 seq_no; /* 152 4 */ > /* XXX 4 bytes hole, try to pack */ > void * data; /* 160 8 */ > ... > /* size: 296, cachelines: 2, members: 14 */ > /* sum members: 288, holes: 2, sum holes: 8 */ > /* last cacheline: 40 bytes */ > After: > $ pahole -C zfcp_fsf_req drivers/s390/scsi/zfcp.ko > ... > struct fsf_qtcb * qtcb; /* 144 8 */ > void * data; /* 152 8 */ > ... > /* size: 288, cachelines: 2, members: 13 */ > /* sum members: 284, holes: 1, sum holes: 4 */ > > Signed-off-by: Steffen Maier <maier@linux.ibm.com> > Reviewed-by: Benjamin Block <bblock@linux.ibm.com> > --- > drivers/s390/scsi/zfcp_dbf.c | 2 +- > drivers/s390/scsi/zfcp_def.h | 2 -- > drivers/s390/scsi/zfcp_fsf.c | 1 - > 3 files changed, 1 insertion(+), 4 deletions(-) > Makes one wonder what we need the sequence number for ... Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index d20977bb27a4..3503de873963 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c @@ -82,7 +82,7 @@ void zfcp_dbf_hba_fsf_res(char *tag, int level, struct zfcp_fsf_req *req) rec->fsf_req_id = req->req_id; rec->fsf_req_status = req->status; rec->fsf_cmd = q_head->fsf_command; - rec->fsf_seq_no = req->seq_no; + rec->fsf_seq_no = q_pref->req_seq_no; rec->u.res.req_issued = req->issued; rec->u.res.prot_status = q_pref->prot_status; rec->u.res.fsf_status = q_head->fsf_status; diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index d65adb0ae9f1..84a742a67975 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h @@ -278,7 +278,6 @@ static inline u64 zfcp_scsi_dev_lun(struct scsi_device *sdev) * @completion: used to signal the completion of the request * @status: status of the request * @qtcb: associated QTCB - * @seq_no: sequence number of this request * @data: private data * @timer: timer data of this request * @erp_action: reference to erp action if request issued on behalf of ERP @@ -294,7 +293,6 @@ struct zfcp_fsf_req { struct completion completion; u32 status; struct fsf_qtcb *qtcb; - u32 seq_no; void *data; struct timer_list timer; struct zfcp_erp_action *erp_action; diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 07b86375b461..c949c65ffc6a 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -724,7 +724,6 @@ static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_qdio *qdio, return ERR_PTR(-ENOMEM); } - req->seq_no = adapter->fsf_req_seq_no; req->qtcb->prefix.req_seq_no = adapter->fsf_req_seq_no; req->qtcb->prefix.req_id = req->req_id; req->qtcb->prefix.ulp_info = 26;