[<prev] [next>] [day] [month] [year] [list]
Message-ID: <9af14b44-81c7-cdb1-ed4f-2f684f9fdbb3@rasmusvillemoes.dk>
Date: Thu, 28 Nov 2019 08:46:35 +0100
From: Rasmus Villemoes <linux@...musvillemoes.dk>
To: LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Optimization in pick_next_task
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
Powered by blists - more mailing lists