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

Abierto
#11,999 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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).

Lenguaje dominante
Verilog
Estrellas
3.4k
Forks
1.1k
Merge medio
3 d 11 h
PR fusionados (30 d)
245

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de The-OpenROAD-Project/OpenROAD

Todos los issues de The-OpenROAD-Project/OpenROAD

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.