Skip to content

Backport subject : RISC-V: Add steal-time support #215

@zhuzhenxxx-collab

Description

@zhuzhenxxx-collab

这组补丁为 RISC-V 虚拟化引入 “steal-time(被盗时间)” 支持:当 VCPU 因宿主机调度/超配而等待时,guest 能获取这段等待时间,用于解释“进度变慢”的原因,并改进性能观测与统计。
https://lore.kernel.org/all/20231220160012.40184-15-ajones@ventanamicro.com/

实现依赖 SBI STA 扩展,它为 guest 提供标准接口读取每个 VCPU 的 stolen time。

补丁分三部分:

  • 在 RISC-V Linux 中加入 paravirt 支持,并通过 SBI STA 实现 steal-time accounting。
  • 在 KVM 中实现 SBI STA 扩展,使 KVM guest(如启用 paravirt steal-time 的 Linux)可感知stolen时间。
  • 扩展 KVM selftests:为 RISC-V 增加 steal_time 测试,以及在 get-reg-list 测试中覆盖 SBI 扩展/寄存器(包括 STA 相关)。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions