Merge pull request #535 from mmkayPL/struct-alignment
Align structures to cacheline
This commit is contained in:
@@ -132,9 +132,11 @@ struct ocf_cache {
|
||||
|
||||
bool use_submit_io_fast;
|
||||
|
||||
struct ocf_trace trace;
|
||||
struct {
|
||||
struct ocf_trace trace;
|
||||
|
||||
struct ocf_async_lock lock;
|
||||
struct ocf_async_lock lock;
|
||||
} __attribute__((aligned(64)));
|
||||
// This should be on it's own cacheline ideally
|
||||
env_atomic last_access_ms;
|
||||
};
|
||||
|
||||
@@ -143,8 +143,6 @@ struct ocf_request {
|
||||
ctx_data_t *cp_data;
|
||||
/*!< Copy of request data */
|
||||
|
||||
ocf_req_cache_mode_t cache_mode;
|
||||
|
||||
uint64_t byte_position;
|
||||
/*!< LBA byte position of request in core domain */
|
||||
|
||||
@@ -196,6 +194,8 @@ struct ocf_request {
|
||||
uint8_t lock_idx : OCF_METADATA_GLOBAL_LOCK_IDX_BITS;
|
||||
/* !< Selected global metadata read lock */
|
||||
|
||||
ocf_req_cache_mode_t cache_mode;
|
||||
|
||||
log_sid_t sid;
|
||||
/*!< Tracing sequence ID */
|
||||
|
||||
|
||||
@@ -56,16 +56,19 @@ struct ocf_alock_waiters_list {
|
||||
};
|
||||
|
||||
struct ocf_alock {
|
||||
ocf_cache_t cache;
|
||||
env_mutex lock;
|
||||
env_atomic *access;
|
||||
env_atomic waiting;
|
||||
struct {
|
||||
ocf_cache_t cache;
|
||||
env_mutex lock;
|
||||
env_atomic waiting;
|
||||
} __attribute__((__aligned__(64)));
|
||||
|
||||
ocf_cache_line_t num_entries;
|
||||
env_atomic *access;
|
||||
env_allocator *allocator;
|
||||
struct ocf_alock_lock_cbs *cbs;
|
||||
struct ocf_alock_waiters_list waiters_lsts[_WAITERS_LIST_ENTRIES];
|
||||
|
||||
};
|
||||
} __attribute__((__aligned__(64)));
|
||||
|
||||
void ocf_alock_mark_index_locked(struct ocf_alock *alock,
|
||||
struct ocf_request *req, unsigned index, bool locked)
|
||||
|
||||
Reference in New Issue
Block a user