(Follow-up, not a regression) A task woken by an IRQ handler on CPU 0 can still wait until the sleep ends
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust
- Bereich
- operating-systems
Rechercherichtung
Read kernel/src/lib.rs:109-136 and awkernel_lib/src/cpu/sleep_cpu_no_std.rs, focusing on sleep and wake_up; trace how an IRQ that enqueues a task affects the current CPU while its tag is Active. Check the existing model and identify what must change so this wake path is covered. Done means the task does not wait for the sleep timeout after that IRQ, with a model update covering the path.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
File: kernel/src/lib.rs:109-136, awkernel_lib/src/cpu/sleep_cpu_no_std.rs
(sleep, wake_up).
The primary CPU runs with interrupts disabled except in the IRQ window at the
top of the loop and inside sleep_cpu(). An IRQ that arrives during
wake_task() or wake_workers() is handled right after
InterruptEnable::new() in sleep(), while the tag is still Active. If the
handler wakes a task:
wake_cpu(0)targets the current CPU and does nothing.reset_wakeup_timer()does nothing, because the tag isActive.- The CPU then moves to
Waitingand halts until the timeout (up to 1 second),
withNUM_TASK_IN_QUEUE > 0and possibly all workers asleep.
This window existed before, and it was wider in the old order. But the
saturated counter kept the primary CPU spinning, which hid the delay; with an
exact counter it becomes visible, in the same way as the timer case that this
PR fixes.
One possible fix is to let wake_up() on the current CPU change Active to
Continue, so that the next sleep() returns at once. The current model does
not cover this path, because its interrupt handlers do not enqueue tasks, so
such a change should come with a model update.
- Vorherrschende Sprache
- Rust
- Sterne
- 282
- Forks
- 12
- Ø Merge
- 2 T. 9 Std.
- Gemergte PRs (30 T.)
- 28
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus tier4/awkernel
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Deadlock in ixgbeOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
Maintainer antworten meist innerhalb von 2 Tagen
Ähnliche Issues
-
bug ui
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
userFRM/egui-charts#3363 ·
Maintainer antworten meist innerhalb von 1 Tag
-
ada documentation mobile report
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 86/100
physicsdolphin/nv-uefi-unlocker#254 · 2 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
kindraywind/rustnarok-client#1382 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:accessibility bug good first issue help wanted priority:p3-low size:small
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
NecturaLabs/Canopy#209 ·
-
CLI config custom-model enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag