sta: write_timing_model stops scaling at 8 threads; search tag locks contended

未关闭
#11,999 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
cpp

调研方向

Start with the reported Search::findTag and Search::findTagGroup paths, then inspect Search::mutateTag and the tag locks in the timing analysis code; the issue provides a reproducer in the attached wtm_contention.zip and run-me.sh. Measure write_timing_model across thread counts and check that contention falls while the generated .lib remains identical. The issue describes the bottleneck but does not name source files or tests.

由索引模型根据 Issue 内容生成。

描述

Runtime sta

write_timing_model on a 64 x 256 register file macro at global route (68k instances, asap7, the platform SDC's set_max_delay and group_path on [all_registers]) stops scaling at 8 threads: 77 s on 1 thread, 29 s on 8 and 28 s on 48. The .lib it writes is identical at every thread count.

wtm_contention.zip

Unzip and run (openroad 6ea4ca224f3589dd91809933f50f39af66053634 on PATH; the archive, wtm_contention.zip, is attached):

unzip wtm_contention.zip
./wtm_contention/run-me.sh

Reproduces in about 2.5 minutes on a 24-core machine:

write_timing_model, 1 threads: 76.7 s
write_timing_model, 8 threads: 28.72 s
write_timing_model, 48 threads: 28.209 s
regfile_1.lib and regfile_8.lib are identical

perf record -g at 48 threads: 32 % of samples are in futex syscalls and 25 % in the kernel's queued spin lock. The first STA frame above the spin-lock samples is Search::mutateTag (1440 samples), Search::findTag (1075), ArrivalVisitor::visit (802), Search::setVertexArrivals (784), Graph::visitFanouts (329) and Search::findTagGroup (243). Search::findTag takes tag_lock_ for every lookup in tag_set_ that the thread's tag cache misses, not only to insert a new tag; Search::findTagGroup takes tag_group_lock_ the same way.

The register files of a XiangShan core, built as macros of 270k to 370k instances, spend 4 to 6 minutes writing each abstract, write_timing_model being nearly all of it, with 400 to 870 s of system time per run.

Related: #11752 (the number of propagations, fixed) and #11933 (the -to [all_registers] lookup inside mutateTag, 22 % of the samples here).

主要语言
Verilog
星标
3.4k
派生
1.1k
平均合并
3 天 11 小时
30 天内合并 PR
245

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

The-OpenROAD-Project/OpenROAD 的其他 Issue

查看 The-OpenROAD-Project/OpenROAD 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。