ref count alignment
Move ref counts to their own cacheline - otherwise they pollute and cause false sharing to fields nearby and cause a lot of cache bouncing between physical CPUs. Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
This commit is contained in:
parent
fd2fd335a0
commit
642527d72a
@ -91,12 +91,12 @@ struct ocf_cache {
|
||||
|
||||
struct {
|
||||
/* cache get/put counter */
|
||||
struct ocf_refcnt cache;
|
||||
struct ocf_refcnt cache __attribute__((aligned(64)));
|
||||
/* # of requests potentially dirtying cachelines */
|
||||
struct ocf_refcnt dirty;
|
||||
struct ocf_refcnt dirty __attribute__((aligned(64)));
|
||||
/* # of requests accessing attached metadata, excluding
|
||||
* management reqs */
|
||||
struct ocf_refcnt metadata;
|
||||
struct ocf_refcnt metadata __attribute__((aligned(64)));
|
||||
} refcnt;
|
||||
|
||||
ocf_pipeline_t stop_pipeline;
|
||||
|
@ -32,7 +32,7 @@ struct ocf_volume {
|
||||
unsigned discard_zeroes:1;
|
||||
/* true if reading discarded pages returns 0 */
|
||||
} features;
|
||||
struct ocf_refcnt refcnt;
|
||||
struct ocf_refcnt refcnt __attribute__((aligned(64)));
|
||||
} __attribute__((aligned(64)));
|
||||
|
||||
int ocf_volume_type_init(struct ocf_volume_type **type,
|
||||
|
Loading…
Reference in New Issue
Block a user