On Monday 05 Mar 2018 at 20:36:18 (+0530), Viresh Kumar wrote:
On 5 March 2018 at 18:01, Quentin Perret quentin.perret@arm.com wrote:
So, if we want to start from little CPUs for boosted and non-prefer-idle tasks, what about just changing: cpu = start_cpu(boosted); by cpu = start_cpu(prefer_idle);
Well, in the prefer-idle case we really want to pick a big idle CPU instead of a little idle CPU (I am not very sure why) and so the order plays a role.
It's because the prefer-idle flag basically means "this task is latency sensitive". What we want is to wakeup the task ASAP (that's why we pick an idle CPU) and to complete it quickly (that's why we favor big CPUs, and why all prefer idle tasks are boosted).
In the non-prefer-idle case I think the code was designed to work irrespective of the order in which CPUs are parsed and just that we have a bug there which wouldn't let us select a little idle CPU. So, order shouldn't matter in that case and that's what this patch is trying to do.
A regular android system doesn't have such non-prefer-idle boosted tasks for now AFAIK, so the right thing to do isn't clear yet. Ionela is currently looking into those things, so I'd like to see her results before we decide what to do :) Maybe the simplest fix will be to simply start the iteration from the littlest CPU for all non-prefer-idle tasks, even if they're boosted. I think that should also fix the issue Leo noticed. Let's see :)
Thanks, Quentin