+27
−7
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Currently there exists a path where cpupri_find could
return lowest_mask without removing isolated cpus. This
happened when __cpu_pri() didn't consider isolated
cpus and indicated that the lowest_mask was not empty.
Subsequently, cpupri_find_fitness() would find the
lowest_mask was empty, after removing isolated cpus.
This led to cpupri_find() being called again,
cpupri_find_fitness being re-entered, and this time,
since fitness_fn is NULL, returns true. This means there
is a case where lowest_mask only has isolated CPUs
and cpupri_find_fitness will indicate yes, cpus were found.
When invokved in the rt wakeup path through find_lowest_rq(),
this caused the pushes of rt tasks to be placed on
isolated cpus. This also causes the the wakeups of rt
tasks on isolated cpus, although this is a rare occurrence.
Fix it by ensuring __cpu_pri() removes isolated cpus from
lowest_mask, which in turn causes cpupri_find_fitness() to
skip the current task_pri index prior to making any other
decision. For the case where lowest_mask only has isolated
cpus left, this will result in no CPU being found, and
a return of false from cpupri_find_fitness().
Change-Id: I3e28b8366513ee51dc5c2d4eb0a2eb146c82f255
Signed-off-by:
Stephen Dickey <dickey@codeaurora.org>