5–7 Oct 2026
Europe/Prague timezone

sparsemask: the missing generic plumbing and next step forward

Not scheduled
20m
Scheduler and Real-Time MC Scheduler and Real-Time MC

Speaker

Prateek Nayak (AMD Inc.)

Description

As CPU counts grow, Linux scheduler scalability suffers from contention on global cpumasks — frequent atomic updates to shared cachelines become a measurable bottleneck on large core-count systems.

Two proposals address this: Steve Sistare's sparsmask, which distributes a cpumask across multiple cachelines to reduce contention [1], and Peter Zijlstra's sbm (sparse bitmap) [2], a simpler, topology-aware evolution of the same idea. While sbm effectively eliminates cacheline ping-pong, its generic infrastructure falls short in one critical area: CPU hotplug handling, where topological information for offline CPUs may be unavailable.

This talk covers:

  • The gap: shortcomings in the generic sbm layer for hotplug scenarios
  • Peter's proposal for x86 to address the challenges with offline CPUs, and what's still needed to make sparsemask truly generic
  • A scheduler-native alternative: an orthogonal sbm implementation scoped to the scheduler, leveraging hotplug callbacks to dynamically size sbm allocations.

Previous version of this work was posted at [3] and was discussed at LPC2025.

References:

[1] https://lore.kernel.org/lkml/1541767840-93588-2-git-send-email-steven.sistare@oracle.com/
[2] https://lore.kernel.org/lkml/20260324120008.GB3738010@noisy.programming.kicks-ass.net/
[3] https://lore.kernel.org/lkml/20251208083602.31898-1-kprateek.nayak@amd.com/

Author

Prateek Nayak (AMD Inc.)

Presentation materials

There are no materials yet.