platform

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package platform provides OS-level helpers for CPU pinning and NUMA distribution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DistributeWorkers

func DistributeWorkers(numWorkers, numCPU, _ int) []int

DistributeWorkers returns CPU IDs for numWorkers across available NUMA nodes. Falls back to round-robin across numCPU cores when NUMA info is unavailable.

func PinToCPU

func PinToCPU(cpu int) error

PinToCPU pins the calling OS thread to the given CPU core via sched_setaffinity.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL