Re: CFS vs. cpufreq/cstates vs. latency
From: Chris Friesen
Date: Tue Jul 17 2012 - 13:56:27 EST
On 07/17/2012 08:23 AM, Rik van Riel wrote:
> Specifically, waking up some process requires that the CPU
> which is running the wakeup is already in C0 state. If the
> CPU on which the to-be-woken task ran last is in a deep C
> state, it may make sense to simply run the woken up task
> on the local CPU, not the CPU where it was originally.
While it sounds interesting, I can see possible issues with this:
1) If we're using NUMA there will be additional cost to running a task with memory on a remote node. It might make sense to try and run the task on a CPU on that node if possible.
2) It might not make sense to migrate if the local cpu is close to capacity.
Presumably the scheduler could take into account the expected delay for coming out of the C state (which we should know) as well as the expected cost of migrating the task to the running CPU and the expected run-length of the task in order to decide if this makes sense or not.
> I seem to remember some scheduling code that (for power
> saving reasons) tried running all the tasks on one CPU,
> until that CPU got busy, and then spilled over onto other
> CPUs.
I suspect you're thinking of
/sys/devices/system/cpu/sched_mc_power_savings
/sys/devices/system/cpu/sched_smt_power_savings
> I do not seem to be able to find that code in recent kernels,
> but I have the feeling that a policy like that (related to
> WAKE_AFFINE scheduling?) could improve this issue.
Looks like it was removed in 8e7fbcb because it was broken.
Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/