Skip to content

Commit

Permalink
Adjust cacheline padding for nemesis scheduler.
Browse files Browse the repository at this point in the history
  • Loading branch information
insertinterestingnamehere committed Sep 3, 2024
1 parent dd48e67 commit 9030bf6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/threadqueues/nemesis_threadqueues.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ struct _qt_threadqueue_node {
typedef struct {
/* The First Cacheline */
void *_Atomic head;
void *_Atomic tail;
uint8_t pad1[CACHELINE_WIDTH - (2 * sizeof(void *))];
uint8_t pad1[CACHELINE_WIDTH - sizeof(void*)];
/* The Second Cacheline */
void *_Atomic tail;
uint8_t pad2[CACHELINE_WIDTH - sizeof(void*)];
/* The Third Cacheline */
void *shadow_head;
/* the following is for estimating a queue's "busy" level, and is not
* guaranteed accurate (that would be a race condition) */
saligned_t nemesis_advisory_queuelen;
uint8_t pad2[CACHELINE_WIDTH - sizeof(void *) - sizeof(saligned_t)];
uint8_t pad3[CACHELINE_WIDTH - sizeof(void*) - sizeof(saligned_t)];
} NEMESIS_queue Q_ALIGNED(CACHELINE_WIDTH);

struct _qt_threadqueue {
Expand Down

0 comments on commit 9030bf6

Please sign in to comment.