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

オープン 初心者向け
#804 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust

調査の方向性

specification/awkernel_async_lib/src/task/wake_workers_no_std/wake_workers.pml の primary_main を読み、ループの順序を kernel/src/lib.rs:109-114 と比較してください。モデルを更新し、wake_tasks、wake_workers、sleep の順に実行するようにします。モデルが実装と一致し、影響を受けるコミット済みの結果ファイルが再生成されたら完了です。issue によると、run.sh はメモリ制限で検索が不完全でも成功したと誤って報告することがあります。結果の再生成時に、不完全な検索を示す警告が出ていないか確認してください。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Rust
スター
282
フォーク
12
平均マージ
2日 9時間
マージ済み PR(30日)
28

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tier4/awkernel のほかの issue

tier4/awkernel の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。