libgomp: Add tests and documentation for GOMP_DYNAMIC_POLICY
Documentation and tests for the new GOMP_DYNAMIC_POLICY environment variable, enabling Juunansei's phantom-guided DoP adaptation.
This patch adds documentation and DejaGNU test cases for the new GOMP_DYNAMIC_POLICY environment variable. This variable extends OpenMP’s dynamic degree-of-parallelism (DoP) adaptation to include the Juunansei policy, which uses host-side scheduling metrics (phantom_average, idle_average) to adjust the number of threads used. The tests cover various scenarios, including case-insensitivity and fallback to default behavior.
- proposer
Submits documentation and test cases for the GOMP_DYNAMIC_POLICY environment variable, detailing its behavior and verifying its functionality through DejaGNU tests.
“This patch adds documentation and DejaGNU test cases for GOMP_DYNAMIC_POLICY, a new GCC-specific environment variable extending OMP_DYNAMIC to support Juunansei's phantom-guided degree-of-parallelism (DoP) adaptation (GOMP_DYNAMIC_POLICY=pvsched), as well as the default online-CPU-count-minus- loadavg policy. The test cases in libgomp/testsuite/libgomp.c/ verify: - GOMP_DYNAMIC_POLICY=pvsched re…”
In Details
This RFC provides the necessary documentation and test suite for GOMP_DYNAMIC_POLICY, a new environment variable for libgomp. It allows OpenMP applications to dynamically adjust their degree of parallelism (DoP) based on paravirtualized scheduling metrics (phantom_average, idle_average) gathered from the host via eBPF. The Juunansei policy leverages these metrics to mitigate performance issues in oversubscribed cloud VMs by reducing thread count during host contention.
- GOMP_DYNAMIC_POLICY
- A GCC-specific environment variable that controls how libgomp dynamically adjusts the number of threads used in parallel regions, influenced by host system load.
- Juunansei
- A specific policy for GOMP_DYNAMIC_POLICY that uses paravirtualized scheduling metrics (phantom_average, idle_average) to adapt the degree of parallelism.
- degree of parallelism (DoP)
- The number of threads that can execute simultaneously in a parallel region.
- phantom_average
- A paravirtualized scheduling metric indicating the extent of host scheduling contention affecting guest vCPUs.
- idle_average
- A paravirtualized scheduling metric representing the average number of idle physical CPUs on the host.
- DejaGNU
- A testing framework used for GNU software, providing a way to write portable tests that can be run across different platforms and configurations.