Skip to content
Commit cb2d1a8c authored by Beata Michalska's avatar Beata Michalska Committed by Deepak Kumar Mishra
Browse files

sched/topology: Rework CPU capacity asymmetry detection



Currently the CPU capacity asymmetry detection, performed through
asym_cpu_capacity_level, tries to identify the lowest topology level
at which the highest CPU capacity is being observed, not necessarily
finding the level at which all possible capacity values are visible
to all CPUs, which might be bit problematic for some asymmetric
topologies i.e.:

DIE             [                    ][           ]
MC              [                    ][           ]

CPU:             [0]  [1]   [2]   [3]   [4]   [5]
Capacity:        756  756  1024  1024  1024  1024

In this particular case, the asymmetric topology level will point at MC,
as all possible cpu masks for that level do cover the CPU with the highest
capacity. It will work just fine for the first cluster, not so much for
the second one though (consider the find_energy_efficient_cpu which might
end up attempting the energy aware wake-up for a domain that does not
see any asymmetry at all)

Rework the way the capacity asymmetry levels are being detected, to point
to the lowest topology level, where full range of available CPU capacities
is visible to all CPUs within given domain. As a result, the per-cpu
sd_asym_cpucapacity might differ across the domains. Additionally,
those levels, where any range of asymmetry (not necessarily full) is being
detected will get identified. The selected asymmetric topology level will
be denoted by SD_ASYM_CPUCAPACITY_FULL sched domain flag whereas the
'sub-levels' would receive the already used SD_ASYM_CPUCAPACITY flag.
This allows maintaining the current behaviour for asymmetric topologies,
with misfit migration operating correctly on lower levels, if applicable.

Signed-off-by: Beata Michalska's avatarBeata Michalska <beata.michalska@arm.com>
parent 46269e78
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment