[gcc,libgomp] Validation for an approach to PR115367
Project / Subsystem
gcc / gcc
Date
2026-07-18
Proposer
Léo Hardt <leom.hardt@inf.ufrgs.br>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Memoizing load average reduces overhead but might lag behind sudden system load changes if the memoization window is too long.
- • Fetching load average during GOMP_parallel_end instead of start could improve parallel region performance but might make the decision lag behind the actual need for threads at the beginning of a block.
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- discussion_id
- 7b5f4947850a49419d77b0cb9fa5004b@inf.ufrgs.br
- source_type
- public_inbox
- title
- [gcc,libgomp] Validation for an approach to PR115367
- headline
- Validation for an approach to PR115367
- tldr
- Proposes improving libgomp's OMP_DYNAMIC thread spawning by memoizing load average and optimizing when it's fetched.
- proposer
- Léo Hardt <leom.hardt@inf.ufrgs.br>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Memoizing load average reduces overhead but might lag behind sudden system load changes if the memoization window is too long.
- • Fetching load average during GOMP_parallel_end instead of start could improve parallel region performance but might make the decision lag behind the actual need for threads at the beginning of a block.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • OpenMP
- • libgomp
- • threading
- • performance
- • runtime
- bugzilla_url
- —
- date
- 2026-07-18T00:00:00.000Z
[gcc,libgomp] Validation for an approach to PR115367
This discussion proposes improvements to the libgomp implementation of OMP_DYNAMIC for thread spawning on Linux. The current approach uses glibc’s getloadavg with a 15-minute average, which has been criticized for its potentially too-long or too-short averaging window. The proposer suggests memoizing the load average to reduce overhead on short-lived parallel blocks and fetching it during GOMP_parallel_end instead of GOMP_parallel_start. Additionally, it’s suggested that using the 1, 5, and 15-minute averages along with program runtime could lead to a more optimal thread count.