Skip to content

Commit

Permalink
Merge pull request sched-ext#229 from sched-ext/padding
Browse files Browse the repository at this point in the history
rusty: Remove explicit padding
  • Loading branch information
htejun authored Apr 12, 2024
2 parents 5404303 + ffced1f commit 50391b8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions scheds/rust/scx_rusty/src/bpf/main.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ struct pcpu_ctx {
u32 dom_id;
u32 nr_node_doms;
u32 node_doms[MAX_DOMS];

/* libbpf-rs does not respect the alignment, so pad out the struct explicitly */
u8 _padding[CACHELINE_SIZE - ((3 + MAX_DOMS) * sizeof(u32) % CACHELINE_SIZE)];
} __attribute__((aligned(CACHELINE_SIZE)));

struct pcpu_ctx pcpu_ctx[MAX_CPUS];
Expand Down

0 comments on commit 50391b8

Please sign in to comment.