scheduler: make idle cpus steal work

This commit is contained in:
Matheus
2026-09-16 00:00:56 -03:00
parent 10cd22207d
commit 7a533242ad
4 changed files with 58 additions and 3 deletions
+1
View File
@@ -58,6 +58,7 @@ thread_t *sched_select_next_thread(void);
void sched_insert_in_cpu_queue(struct cpu_t *cpu, thread_t *thread);
void sched_preempt_cpu(struct cpu_t *cpu);
thread_t *sched_steal_work_from_cpu(struct cpu_t *cpu);
bool sched_idle_steal_work(void);
static inline int sched_thread_run_queue_index(int interactivity) {
return min(interactivity * SCHED_RUN_QUEUE_SIZE / SCHED_MAX_INTERACTIVITY, SCHED_RUN_QUEUE_SIZE - 1);