lkml.org 
[lkml]   [2019]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectOptimization in pick_next_task
Date
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

\
 
 \ /
  Last update: 2019-11-28 08:47    [W:0.024 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site