Skip to content

KFunc scx_bpf_nr_online_cids

v7.2

Return current count of online CPUs in cid space.

Definition

Returns

Return num_online_cpus. The standard model restarts the scheduler on hot-plug, which lets schedulers treat [0, nr_online_cids) as the online range. Schedulers that prefer to handle hotplug without a restart should install a custom mapping via scx_bpf_cid_override and track onlining through the ops.cid_online / ops.cid_offline callbacks.

Signature

u32 scx_bpf_nr_online_cids()

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