GCC Newspaper
NOVEMBER 30, 2026
gcc — Proposed

Libgomp optimizations for scheduler-guided OpenMP execution in cloud VMs

Progress report on libgomp scheduler optimizations, including pv-barrier-sync, Degree of Parallelism (DoP) implementation, and eBPF for CPU load monitoring.

This is a progress report on ongoing libgomp optimizations for OpenMP execution in cloud VMs. The author has been working on the pv-barrier-sync implementation and the Degree of Parallelism (DoP) implementation, with patches for the former to be posted soon. Additionally, an eBPF-based approach has been developed to monitor host CPU load by sampling the number of runnable tasks on each CPU, addressing previous drift issues.

In the Thread 1 participant
  1. Roy Fru <royfru44@gmail.com> proposer

    Reports on progress in implementing pv-barrier-sync for libgomp, including new tests and documentation, and the ongoing Degree of Parallelism (DoP) implementation. Details a refined eBPF approach for host CPU load monitoring using per-CPU runqueue data and BPF timers, which resolves previous issues with drift.

    “I then changed my approach and used bpf_per_cpu_ptr() to directly read the nr_running field from each CPU's runqueue. I sample this value on each sched_switch event and calculate a time-weighted average using a BPF timer. I then use this average to calculate the idle average which is to be shared with the guest.”

In Details

This discussion concerns optimizations within libgomp, GCC's OpenMP runtime library. The work involves a new pv-barrier-sync implementation and the Degree of Parallelism (DoP) for scheduler-guided execution, likely targeting dynamic task scheduling. A significant part is the use of eBPF to monitor host CPU load by directly accessing per-CPU runqueue information (nr_running) via bpf_per_cpu_ptr and using BPF timers for time-weighted averaging. This data is then exposed to guests, possibly for power or performance management.

Filed Under: gcclibgompOpenMPeBPFcloud