Messages in this thread | | | From | Rasmus Villemoes <> | Subject | Optimization in pick_next_task | Date | Thu, 28 Nov 2019 08:46:35 +0100 |
| |
In kernel/sched/core.c, we have
/* * Optimization: we know that if all tasks are in the fair class we can * call that function directly,
But then the code goes on to do
p = fair_sched_class.pick_next_task(rq, prev, rf); ... if (unlikely(!p)) p = idle_sched_class.pick_next_task(rq, prev, rf);
which still loads a function pointer and calls pick_next_task_{fair,idle} through that. Should those be made extern and used here, or am I misinterpreting what "directly" refers to?
Rasmus
| |