[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>
This commit is contained in:
committed by
James Bottomley
parent
49a198898e
commit
e17b4af7c7
@@ -65,16 +65,15 @@ static struct workqueue_struct *fc_exch_workqueue;
|
|||||||
* assigned range of exchanges to per cpu pool.
|
* assigned range of exchanges to per cpu pool.
|
||||||
*/
|
*/
|
||||||
struct fc_exch_pool {
|
struct fc_exch_pool {
|
||||||
|
spinlock_t lock;
|
||||||
|
struct list_head ex_list;
|
||||||
u16 next_index;
|
u16 next_index;
|
||||||
u16 total_exches;
|
u16 total_exches;
|
||||||
|
|
||||||
/* two cache of free slot in exch array */
|
/* two cache of free slot in exch array */
|
||||||
u16 left;
|
u16 left;
|
||||||
u16 right;
|
u16 right;
|
||||||
|
} ____cacheline_aligned_in_smp;
|
||||||
spinlock_t lock;
|
|
||||||
struct list_head ex_list;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct fc_exch_mgr - The Exchange Manager (EM).
|
* struct fc_exch_mgr - The Exchange Manager (EM).
|
||||||
@@ -91,13 +90,13 @@ struct fc_exch_pool {
|
|||||||
* It manages the allocation of exchange IDs.
|
* It manages the allocation of exchange IDs.
|
||||||
*/
|
*/
|
||||||
struct fc_exch_mgr {
|
struct fc_exch_mgr {
|
||||||
|
struct fc_exch_pool *pool;
|
||||||
|
mempool_t *ep_pool;
|
||||||
enum fc_class class;
|
enum fc_class class;
|
||||||
struct kref kref;
|
struct kref kref;
|
||||||
u16 min_xid;
|
u16 min_xid;
|
||||||
u16 max_xid;
|
u16 max_xid;
|
||||||
mempool_t *ep_pool;
|
|
||||||
u16 pool_max_index;
|
u16 pool_max_index;
|
||||||
struct fc_exch_pool *pool;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* currently exchange mgr stats are updated but not used.
|
* currently exchange mgr stats are updated but not used.
|
||||||
|
Reference in New Issue
Block a user