CPPC: Potential performance feedback scaling mismatch with TIME CSR

オープン
#436 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
活発
技術スタック
c

調査の方向性

Start by reading commit bc7a78f and tracing how the RPMI CPPC driver emulates REFERENCE_CTR and DELIVERED_CTR, including its source of REFERENCE_PERF. Establish how the timer frequency and platform performance levels should relate, then agree on a representable scaling rule; the issue does not name files or tests, so the intended behavior needs clarification before implementation.

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

説明

Description

Since commit bc7a78f, the RPMI CPPC driver emulates REFERENCE_CTR and DELIVERED_CTR locally.

The reference counter uses sbi_timer_value(), while the delivered counter accumulates CPU cycles estimated from the current frequency and elapsed timer ticks.

However, REFERENCE_PERF is still provided by the RPMI backend, without an explicit relationship to the timer frequency used by OpenSBI.

Problem

Linux calculates delivered performance as:

delivered_perf = reference_perf *
                 delta_delivered / delta_reference

With the current OpenSBI implementation, this effectively becomes:

delivered_perf = reference_perf *
                 cpu_frequency / timer_frequency

For this result to match the platform's abstract CPPC performance scale, REFERENCE_PERF must be consistent with both the timer frequency and the mapping between CPU frequency and performance levels.

The RPMI backend may not know the timer frequency used by OpenSBI. Furthermore, performance levels are abstract values and are not necessarily equal to frequencies.

This could lead to incorrect performance feedback being reported to the OS.

Questions

  1. Is the RPMI backend expected to account for the OpenSBI timer frequency when providing REFERENCE_PERF?
  2. Should OpenSBI normalize the locally emulated counters using the platform's nominal frequency and performance level?
  3. How should platforms handle cases where the required reference performance value cannot be represented exactly as an integer?
主要言語
C
スター
1.6k
フォーク
734
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

riscv-software-src/opensbi のほかの issue

riscv-software-src/opensbi の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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