Skip to content

lkl: irq: atomically drain pending IRQs#640

Open
clingfei wants to merge 1 commit into
lkl:masterfrom
clingfei:master
Open

lkl: irq: atomically drain pending IRQs#640
clingfei wants to merge 1 commit into
lkl:masterfrom
clingfei:master

Conversation

@clingfei

Copy link
Copy Markdown

Pending IRQs can be published from host threads while the LKL CPU is owned elsewhere or while interrupts are disabled. Avoid checking the IRQ pending bitmaps with plain loads before the atomic fetch-and-clear, as that can race with concurrent updates and skip newly published work.

Also keep draining the index bitmap until it becomes empty, so IRQs queued while earlier pending IRQs are being handled are delivered in the same pass instead of waiting for a later run_irqs() invocation.

Pending IRQs can be published from host threads while the LKL CPU is
owned elsewhere or while interrupts are disabled. Avoid checking the IRQ
pending bitmaps with plain loads before the atomic fetch-and-clear, as
that can race with concurrent updates and skip newly published work.

Also keep draining the index bitmap until it becomes empty, so IRQs
queued while earlier pending IRQs are being handled are delivered in the
same pass instead of waiting for a later run_irqs() invocation.

Signed-off-by: clingfei <chenglingfei@foxmail.com>
@github-actions

Copy link
Copy Markdown

Test Results

106 files  ±0  106 suites  ±0   8m 51s ⏱️ + 2m 35s
205 tests ±0  194 ✅ ±0  11 💤 ±0  0 ❌ ±0 
789 runs  ±0  733 ✅ ±0  56 💤 ±0  0 ❌ ±0 

Results for commit 17a1086. ± Comparison against base commit 91ecb83.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant