The SPIN model `wake_workers_no_std` must follow the new loop order

Offen Anfängerfreundlich
#804 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
75/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
rust

Rechercherichtung

Lies specification/awkernel_async_lib/src/task/wake_workers_no_std/wake_workers.pml bei primary_main und vergleiche die Reihenfolge der Schleife mit kernel/src/lib.rs:109-114. Aktualisiere das Modell so, dass es wake_tasks, wake_workers und anschließend sleep ausführt; fertig ist die Aufgabe, wenn das Modell mit der Implementierung übereinstimmt und die betroffenen Ergebnisdateien der Commits neu generiert wurden. Im Issue steht, dass run.sh Suchläufe mit Speicherbeschränkung fälschlich als erfolgreich melden kann. Achte daher beim Neugenerieren der Ergebnisse auf die Warnung vor einer unvollständigen Suche.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

File: specification/awkernel_async_lib/src/task/wake_workers_no_std/wake_workers.pml
(primary_main), related to kernel/src/lib.rs:109-114.

The model still has the old order:

wake_tasks(time_to_wait)
sleep(0, time_to_wait)
wake_workers(0)

The loop has three steps, so wake_tasks; wake_workers; sleep is a different
cyclic order, and the 32 committed result files no longer describe the
implementation. Please update the model in this PR or in a follow-up:

wake_tasks(time_to_wait)
wake_workers(0)
sleep(0, time_to_wait)

I ran this reordered model locally. All 16 configurations of
CONCURRENT_WORK_CONSERVATION and EVENTUALLY_EXECUTE
(TIMER_EDGE/TIMER_LEVEL x IRQ_POS 0-3) completed a full state-space
(TIMER_EDGE/TIMER_LEVEL x IRQ_POS 0-3) completed a full state-space
search with errors: 0. I did not run the 16 CPU_WAKING_TO_ACTIVE_CPU0/1
configurations.

Notes for regenerating the results:

  • The state space grows by a few percent, and -DMEMLIM=55000 in the Makefile
    is no longer enough. EVENTUALLY_EXECUTE needs 50.7-52.8 GB for
    IRQ_POS 1-3 and more for IRQ_POS=0. EVENTUALLY_EXECUTE /
    TIMER_LEVEL / IRQ_POS=0 needed 55.5 GB, and it only completed with a
    smaller hash table (./pan -a -n -w26) and -DMEMLIM=56500.
  • run.sh only checks for a trail file, so a run that stops at the memory
    limit (Warning: Search not completed) is recorded as true. It should also
    check for that warning.
  • The README lists kernel/src/main.rs as a target, but the loop is in
    kernel/src/lib.rs.

Other parts of the model need no change:

  • spawn_task does run_queue++ and then wake_up(..., 0, ...). The
    implementation keeps this order; the notification only moved from
    ArcWake::wake into the schedulers.
  • wake_tasks has no wake_up, which matches wake_cpu(0) being a no-op on
    CPU 0.
  • The model uses run_queue both as the queue and as the counter, so it
    already assumes an exact counter. This PR makes the implementation match it.
  • The std model (wake_workers) has a two-step loop
    (select_wait; wake_workers), so the reorder does not change it after the
    first iteration.
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

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus tier4/awkernel

Alle Issues in tier4/awkernel

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.