ZXFoundation™ 26h2
Loading...
Searching...
No Matches
zxfoundation.sched.fair.core Module Reference

Data Structures

class  zxfoundation::sched::fair::fair_iterator
 Iterrator class for fair nodes. More...
class  zxfoundation::sched::fair::fair_range

Functions

auto zxfoundation::sched::fair::avg_vruntime (u64 cfs_min_vruntime, i64 avg_vruntime_acc, u64 avg_weight_acc) noexcept -> u64
 Compute the average vruntime across the queued entities.
auto zxfoundation::sched::fair::avg_vruntime_add (const sched_entity &se, u64 cfs_min_vruntime, i64 &avg_acc, u64 &avg_w_acc) noexcept -> void
 Update the running avg_vruntime accumulator when an entity is added to the cfs_rq.
auto zxfoundation::sched::fair::avg_vruntime_sub (const sched_entity &se, u64 cfs_min_vruntime, i64 &avg_acc, u64 &avg_w_acc) noexcept -> void
 Update the running avg_vruntime accumulator when an entity is removed from the cfs_rq.
auto begin () const noexcept -> fair_iterator
auto zxfoundation::sched::fair::calc_delta_fair (u64 delta, const sched_entity &se) noexcept -> u64
 Scaled delta for calc_delta_fair: weighted virtual time advance.
auto zxfoundation::sched::fair::dequeue (run_queue &rq, strand &s) noexcept -> void
auto end () const noexcept -> fair_iterator
auto zxfoundation::sched::fair::enqueue (run_queue &rq, strand &s) noexcept -> std::expected< void, lib::kernel_error >
 Enqueue a strand into the CFS fair scheduling tree.
auto zxfoundation::sched::fair::entity_eligible (const sched_entity &se, u64 avg_vruntime) noexcept -> bool
 Predicate returning whether se is eligible to run on this cfs_rq (i.e. its lag <= 0).
 fair_iterator (lib::rb_node *n) noexcept
 fair_range (const run_queue &rq) noexcept
auto zxfoundation::sched::fair::iter (const run_queue &rq) noexcept -> fair_range
 Range-for adapter for CFS fair tree traversal.
auto zxfoundation::sched::fair::migrate_entity (sched_entity &se, u64 src_min_vr, u64 dst_min_vr) noexcept -> void
 Recompute an entity's lag after a balancer migration.
auto operator* () const noexcept -> strand &
auto operator++ () noexcept -> fair_iterator &
auto operator++ (int) noexcept -> fair_iterator
auto operator-> () const noexcept -> strand *
auto zxfoundation::sched::fair::pick_next (run_queue &rq) noexcept -> strand *
auto zxfoundation::sched::fair::place_entity (sched_entity &se, u64 avg_vruntime, u64 min_vruntime, u32 nr_running, bool initial) noexcept -> void
 Place an entity into the cfs_rq, computing its initial vruntime.
auto zxfoundation::sched::fair::preempt (run_queue &rq, strand &waking) noexcept -> void
auto zxfoundation::sched::fair::rb_node_to_strand (lib::rb_node *node) noexcept -> strand *
 Extract strand from rb_node.
auto zxfoundation::sched::fair::sched_slice (const sched_entity &se, u32 nr_running) noexcept -> u64
 Compute the per-entity slice in vruntime units, calibrated to the number of queued entities (Linux's sched_slice).
auto zxfoundation::sched::fair::tick (run_queue &rq, strand &s) noexcept -> void
auto zxfoundation::sched::fair::update_curr (sched_entity &se, u64 &min_vr, u64 delta) noexcept -> void
 Debit the running entity by the elapsed wall-time delta.
auto zxfoundation::sched::fair::update_min_vruntime (u64 cfs_min_vruntime, u64 new_floor) noexcept -> u64
 Promote min_vruntime on every tick / dequeue to prevent the floor from dropping as entities age out.
auto zxfoundation::sched::fair::vtable_enqueue (run_queue &rq, strand &s) noexcept -> void
 Legacy vtable shim.
auto zxfoundation::sched::fair::yield_entity (sched_entity &se, u64 min_vr) noexcept -> void
 Yield: collapse se->vruntime to min_vruntime so the runner ages backward into the queue.
auto zxfoundation::sched::fair::yield_to_entity (sched_entity &yielding_se, const sched_entity &target_se, u64 min_vr) noexcept -> void
 Directed yield: move yielding_se ahead of target_se.

Variables

constexpr u64 zxfoundation::sched::fair::EEVDF_DEFAULT_SLICE_NS = 40'960'000ULL
 Default EEVDF slice in TOD ticks.
constexpr u32 zxfoundation::sched::fair::NICE_0_WEIGHT = 1024U
 Default nice-0 weight (1024).
constexpr u32 zxfoundation::sched::fair::WEIGHT_MAX = 1024U
 Maximum weight used in inverse-weight scaling (1024 == 1.0).

Files

file  zxfoundation/sched/fair.zcomponent/core.cxxm
file  zxfoundation/sched/fair.zcomponent/core.cxx