kernel: define RUN_QUEUE_COUNT in context/mod.rs

Pre-flight for Phase 0c. The P8-percpu-sched and P8-percpu-wiring
patches both reference crate::context::RUN_QUEUE_COUNT but none of
the kernel P5–P9 patches define it (verified by grep). The downstream
patches have an incomplete dependency: they need this constant at
the module level but no patch supplies it.

Add 'pub const RUN_QUEUE_COUNT: usize = 40;' here, matching the
historical 40-priority DWRR queue count. The P7-cache-affine-context
patch separately defines 'pub const SCHED_PRIORITY_LEVELS: usize = 40;'
in context/context.rs which is a duplicate; both being 40 keeps the
existing SCHED_PRIO_TO_WEIGHT and quantum tables valid.
This commit is contained in:
2026-07-02 06:33:08 +03:00
parent ed3f0e1e64
commit 5fb42fcaa1
+8
View File
@@ -29,6 +29,14 @@ pub use self::{
pub type ContextLock = RwLock<L4, Context>;
pub type ArcContextLockWriteGuard = ArcRwLockWriteGuard<L4, Context>;
/// Number of priority queues in the per-CPU run queue (DWRR priority
/// count). Kept at 40 to match the historical global `RunContextData.set`
/// length and the existing `SCHED_PRIO_TO_WEIGHT` table in
/// `context/switch.rs`. Each `PerCpuSched.run_queues` entry is one
/// DWRR priority level. Consumers: `crate::percpu::PerCpuSched`,
/// `crate::context::switch`.
pub const RUN_QUEUE_COUNT: usize = 40;
#[cfg(target_arch = "aarch64")]
#[path = "arch/aarch64.rs"]
mod arch;