libgomp: Add tests and documentation for GOMP_WAIT_POLICY
Documentation and tests are added for GOMP_WAIT_POLICY, supporting pv-barrier-sync and other wait policies.
This patch introduces documentation and DejaGNU test cases for the new GOMP_WAIT_POLICY environment variable. This variable allows users to specify wait policies for OpenMP threads, including the paravirtualized ‘pv-barrier-sync’ policy, which adapts spinning behavior based on host contention. The tests cover parsing of different policies and fallback mechanisms.
- proposer
Provides documentation and test cases for the GOMP_WAIT_POLICY environment variable, ensuring its correct implementation and behavior, including the pv-barrier-sync policy.
“This patch adds documentation and DejaGNU test cases for GOMP_WAIT_POLICY, a new GCC-specific environment variable extending OMP_WAIT_POLICY to support the paravirtualized pv-barrier-sync policy (GOMP_WAIT_POLICY=pvsched), as well as ACTIVE and PASSIVE wait policies. The documentation in libgomp.texi describes the behavior of pv-barrier-sync: when no phantom vCPUs are detected (phantom_average =…”
In Details
This RFC provides documentation and test cases for GOMP_WAIT_POLICY, a libgomp environment variable designed to optimize thread synchronization in virtualized environments. The pv-barrier-sync policy, when enabled, dynamically adjusts whether threads spin or block at barriers based on phantom_average metric from the host, aiming to reduce wasted CPU cycles during contention and maximize parallelism when contention is absent.
- GOMP_WAIT_POLICY
- A GCC-specific environment variable that customizes how OpenMP threads behave when waiting at synchronization points (e.g., barriers), choosing between spinning or blocking.
- pv-barrier-sync
- A paravirtualized wait policy for libgomp that uses host-side scheduling metrics to dynamically decide whether threads should spin or block at barriers.
- phantom vCPUs
- Virtual CPUs experiencing host-side scheduling contention, hindering guest application progress.
- SystemTap SDT
- SystemTap Static Defined Tracing, a mechanism for instrumenting applications to provide probe points for dynamic tracing.
- USDT tracing probes
- User-level Statically Defined Tracing probes, allowing userspace applications to emit tracepoints that can be captured by tracing tools like SystemTap or DTrace.