// SPDX-License-Identifier: GPL-2.0 /* * A scheduler that validates the behavior of the NUMA-aware * functionalities. * * The scheduler creates a separate DSQ for each NUMA node, ensuring tasks * are exclusively processed by CPUs within their respective nodes. Idle * CPUs are selected only within the same node, so task migration can only * occurs between CPUs belonging to the same node. * * Copyright (c) 2025 Andrea Righi <arighi@nvidia.com>
*/
/* * We could just use __COMPAT_scx_bpf_pick_any_cpu_node() here, * since it already tries to pick an idle CPU within the node * first, but let's use both functions for better testing coverage.
*/
cpu = __COMPAT_scx_bpf_pick_idle_cpu_node(p->cpus_ptr, node,
__COMPAT_SCX_PICK_IDLE_IN_NODE); if (cpu < 0)
cpu = __COMPAT_scx_bpf_pick_any_cpu_node(p->cpus_ptr, node,
__COMPAT_SCX_PICK_IDLE_IN_NODE);
if (is_cpu_idle(cpu, node))
scx_bpf_error("CPU %d should be marked as busy", cpu);
if (__COMPAT_scx_bpf_cpu_node(cpu) != node)
scx_bpf_error("CPU %d should be in node %d", cpu, node);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.