Skip to content

KFunc scx_bpf_get_idle_smtmask_node

v6.15

Get a referenced kptr to the idle-tracking, per-physical-core cpumask of a target NUMA node.

Definition

Can be used to determine if an entire physical core is free.

Parameters

node: target NUMA node

Returns

An empty cpumask if idle tracking is not enabled, if node is not valid, or running on a UP kernel. In this case the actual error will be reported to the BPF scheduler via scx_ops_error.

Signature

const struct cpumask *scx_bpf_get_idle_smtmask_node(int node)

Note

This kfunc returns a pointer to a refcounted object. The verifier will then ensure that the pointer to the object is eventually released using a release kfunc, or transferred to a map using a referenced kptr (by invoking bpf_kptr_xchg). If not, the verifier fails the loading of the BPF program until no lingering references remain in all possible explored states of the program.

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Program types

The following program types can make use of this kfunc:

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome