Skip to content

Commit a4566c5

Browse files
Merge pull request #257 from insertinterestingnamehere/nemesis
Nemesis Cacheline Adjustment
2 parents f499495 + 7d671f1 commit a4566c5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/threadqueues/nemesis_threadqueues.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,16 @@ struct _qt_threadqueue_node {
4242
typedef struct {
4343
/* The First Cacheline */
4444
void *_Atomic head;
45-
void *_Atomic tail;
46-
uint8_t pad1[CACHELINE_WIDTH - (2 * sizeof(void *))];
45+
uint8_t pad1[CACHELINE_WIDTH - sizeof(void*)];
4746
/* The Second Cacheline */
47+
void *_Atomic tail;
48+
uint8_t pad2[CACHELINE_WIDTH - sizeof(void*)];
49+
/* The Third Cacheline */
4850
void *shadow_head;
4951
/* the following is for estimating a queue's "busy" level, and is not
5052
* guaranteed accurate (that would be a race condition) */
5153
saligned_t nemesis_advisory_queuelen;
52-
uint8_t pad2[CACHELINE_WIDTH - sizeof(void *) - sizeof(saligned_t)];
54+
uint8_t pad3[CACHELINE_WIDTH - sizeof(void*) - sizeof(saligned_t)];
5355
} NEMESIS_queue;
5456

5557
struct _qt_threadqueue {

0 commit comments

Comments
 (0)