diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2009-08-18 09:43:19 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-05 09:49:27 -0400 |
commit | 564e1c86c810f9ccfe4300afa402815e3db4886d (patch) | |
tree | ecb88038c443d6486e9df352c79b3c78be5454ef /drivers/s390/scsi/zfcp_def.h | |
parent | 42428f747a8a0db9c6de03e105932316defad65d (diff) |
[SCSI] zfcp: Move qdio related data out of zfcp_adapter
The zfcp_adapter structure was growing over time to a size of almost
one memory page. To reduce the size of the data structure and to
seperate different layers, put all qdio related data in the new
zfcp_qdio data structure.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_def.h')
-rw-r--r-- | drivers/s390/scsi/zfcp_def.h | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index a04bdfd4d2f6..bac5c497eab5 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -428,6 +428,29 @@ struct zfcp_latencies { | |||
428 | spinlock_t lock; | 428 | spinlock_t lock; |
429 | }; | 429 | }; |
430 | 430 | ||
431 | /** struct zfcp_qdio - basic QDIO data structure | ||
432 | * @resp_q: response queue | ||
433 | * @req_q: request queue | ||
434 | * @stat_lock: lock to protect req_q_util and req_q_time | ||
435 | * @req_q_lock; lock to serialize access to request queue | ||
436 | * @req_q_time: time of last fill level change | ||
437 | * @req_q_util: used for accounting | ||
438 | * @req_q_full: queue full incidents | ||
439 | * @req_q_wq: used to wait for SBAL availability | ||
440 | * @adapter: adapter used in conjunction with this QDIO structure | ||
441 | */ | ||
442 | struct zfcp_qdio { | ||
443 | struct zfcp_qdio_queue resp_q; | ||
444 | struct zfcp_qdio_queue req_q; | ||
445 | spinlock_t stat_lock; | ||
446 | spinlock_t req_q_lock; | ||
447 | ktime_t req_q_time; | ||
448 | u64 req_q_util; | ||
449 | atomic_t req_q_full; | ||
450 | wait_queue_head_t req_q_wq; | ||
451 | struct zfcp_adapter *adapter; | ||
452 | }; | ||
453 | |||
431 | struct zfcp_adapter { | 454 | struct zfcp_adapter { |
432 | atomic_t refcount; /* reference count */ | 455 | atomic_t refcount; /* reference count */ |
433 | wait_queue_head_t remove_wq; /* can be used to wait for | 456 | wait_queue_head_t remove_wq; /* can be used to wait for |
@@ -436,6 +459,7 @@ struct zfcp_adapter { | |||
436 | u64 peer_wwpn; /* P2P peer WWPN */ | 459 | u64 peer_wwpn; /* P2P peer WWPN */ |
437 | u32 peer_d_id; /* P2P peer D_ID */ | 460 | u32 peer_d_id; /* P2P peer D_ID */ |
438 | struct ccw_device *ccw_device; /* S/390 ccw device */ | 461 | struct ccw_device *ccw_device; /* S/390 ccw device */ |
462 | struct zfcp_qdio *qdio; | ||
439 | u32 hydra_version; /* Hydra version */ | 463 | u32 hydra_version; /* Hydra version */ |
440 | u32 fsf_lic_version; | 464 | u32 fsf_lic_version; |
441 | u32 adapter_features; /* FCP channel features */ | 465 | u32 adapter_features; /* FCP channel features */ |
@@ -447,15 +471,7 @@ struct zfcp_adapter { | |||
447 | unsigned long req_no; /* unique FSF req number */ | 471 | unsigned long req_no; /* unique FSF req number */ |
448 | struct list_head *req_list; /* list of pending reqs */ | 472 | struct list_head *req_list; /* list of pending reqs */ |
449 | spinlock_t req_list_lock; /* request list lock */ | 473 | spinlock_t req_list_lock; /* request list lock */ |
450 | struct zfcp_qdio_queue req_q; /* request queue */ | ||
451 | spinlock_t req_q_lock; /* for operations on queue */ | ||
452 | ktime_t req_q_time; /* time of last fill level change */ | ||
453 | u64 req_q_util; /* for accounting */ | ||
454 | spinlock_t qdio_stat_lock; | ||
455 | u32 fsf_req_seq_no; /* FSF cmnd seq number */ | 474 | u32 fsf_req_seq_no; /* FSF cmnd seq number */ |
456 | wait_queue_head_t request_wq; /* can be used to wait for | ||
457 | more avaliable SBALs */ | ||
458 | struct zfcp_qdio_queue resp_q; /* response queue */ | ||
459 | rwlock_t abort_lock; /* Protects against SCSI | 475 | rwlock_t abort_lock; /* Protects against SCSI |
460 | stack abort/command | 476 | stack abort/command |
461 | completion races */ | 477 | completion races */ |
@@ -478,13 +494,11 @@ struct zfcp_adapter { | |||
478 | struct zfcp_wka_ports *gs; /* generic services */ | 494 | struct zfcp_wka_ports *gs; /* generic services */ |
479 | struct zfcp_dbf *dbf; /* debug traces */ | 495 | struct zfcp_dbf *dbf; /* debug traces */ |
480 | struct zfcp_adapter_mempool pool; /* Adapter memory pools */ | 496 | struct zfcp_adapter_mempool pool; /* Adapter memory pools */ |
481 | struct qdio_initialize qdio_init_data; /* for qdio_establish */ | ||
482 | struct fc_host_statistics *fc_stats; | 497 | struct fc_host_statistics *fc_stats; |
483 | struct fsf_qtcb_bottom_port *stats_reset_data; | 498 | struct fsf_qtcb_bottom_port *stats_reset_data; |
484 | unsigned long stats_reset; | 499 | unsigned long stats_reset; |
485 | struct work_struct scan_work; | 500 | struct work_struct scan_work; |
486 | struct service_level service_level; | 501 | struct service_level service_level; |
487 | atomic_t qdio_outb_full; /* queue full incidents */ | ||
488 | struct workqueue_struct *work_queue; | 502 | struct workqueue_struct *work_queue; |
489 | }; | 503 | }; |
490 | 504 | ||