gwsystems / gwsystems/sledge-serverless-framework

Fix cache alignment issues for software interrupt tracking

Open
#323 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
124
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Oh no! These are not cache aligned. This is a large amount of false sharing that will cause a big perf decrease on multicore.

We want to essentially have each atomic be 128 bytes apart (on 128-aligned boundaries). The typical way to accomplish this without blowing up the cache and memory consumption is to put the counters in a struct, and align the structs.

struct event_counts {
    _Atomic volatile sig_atomic_t software_interrupt_counts_sigalarm_reply;
    _Atomic volatile sig_atomic_t software_interrupt_counts_kernel;
    /* ... */     
} __attribute((aligned(128)));

struct event_counts software_interrupt_counts[runtime_worker_threads_count];

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the software_interrupt_counts entry point and the event_counts structure described in the issue. Verify how the counters are allocated and accessed, then confirm that each atomic counter is separated by 128 bytes on 128-aligned boundaries without changing software interrupt tracking behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.