diff options
author | Vasu Dev <vasu.dev@intel.com> | 2011-09-28 00:38:08 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-02 13:56:50 -0400 |
commit | e17b4af7c7a6f5c24b0e6b856bb45a1a22be75f5 (patch) | |
tree | 19487ec0ae0599c2999368aec1c20b96e6021191 /drivers/scsi/libfc/fc_exch.c | |
parent | 49a198898e889038c6601288cd2b0e037edada24 (diff) |
[SCSI] libfc: cache align fc_exch_pool
fix holes and better cache aligned fields.
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libfc/fc_exch.c')
-rw-r--r-- | drivers/scsi/libfc/fc_exch.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 01ff082dc34c..a78655b86cb7 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c | |||
@@ -65,16 +65,15 @@ static struct workqueue_struct *fc_exch_workqueue; | |||
65 | * assigned range of exchanges to per cpu pool. | 65 | * assigned range of exchanges to per cpu pool. |
66 | */ | 66 | */ |
67 | struct fc_exch_pool { | 67 | struct fc_exch_pool { |
68 | spinlock_t lock; | ||
69 | struct list_head ex_list; | ||
68 | u16 next_index; | 70 | u16 next_index; |
69 | u16 total_exches; | 71 | u16 total_exches; |
70 | 72 | ||
71 | /* two cache of free slot in exch array */ | 73 | /* two cache of free slot in exch array */ |
72 | u16 left; | 74 | u16 left; |
73 | u16 right; | 75 | u16 right; |
74 | 76 | } ____cacheline_aligned_in_smp; | |
75 | spinlock_t lock; | ||
76 | struct list_head ex_list; | ||
77 | }; | ||
78 | 77 | ||
79 | /** | 78 | /** |
80 | * struct fc_exch_mgr - The Exchange Manager (EM). | 79 | * struct fc_exch_mgr - The Exchange Manager (EM). |
@@ -91,13 +90,13 @@ struct fc_exch_pool { | |||
91 | * It manages the allocation of exchange IDs. | 90 | * It manages the allocation of exchange IDs. |
92 | */ | 91 | */ |
93 | struct fc_exch_mgr { | 92 | struct fc_exch_mgr { |
93 | struct fc_exch_pool *pool; | ||
94 | mempool_t *ep_pool; | ||
94 | enum fc_class class; | 95 | enum fc_class class; |
95 | struct kref kref; | 96 | struct kref kref; |
96 | u16 min_xid; | 97 | u16 min_xid; |
97 | u16 max_xid; | 98 | u16 max_xid; |
98 | mempool_t *ep_pool; | ||
99 | u16 pool_max_index; | 99 | u16 pool_max_index; |
100 | struct fc_exch_pool *pool; | ||
101 | 100 | ||
102 | /* | 101 | /* |
103 | * currently exchange mgr stats are updated but not used. | 102 | * currently exchange mgr stats are updated but not used. |