diff options
author | mav <mav@FreeBSD.org> | 2012-02-27 10:31:54 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2012-02-27 10:31:54 +0000 |
commit | 8a35bc6c4fda7b720a969d6cb7122d1667a826d5 (patch) | |
tree | c3a5070bbf16f5f703be065fa803c42820969c8f /Makefile.mips | |
parent | 58cf798c0b168cd3d02de3f7585865a7773279be (diff) | |
download | FreeBSD-src-8a35bc6c4fda7b720a969d6cb7122d1667a826d5.zip FreeBSD-src-8a35bc6c4fda7b720a969d6cb7122d1667a826d5.tar.gz |
Rework CPU load balancing in SCHED_ULE:
- In sched_pickcpu() be more careful taking previous CPU on SMT systems.
Do it only if all other logical CPUs of that physical one are idle to avoid
extra resource sharing.
- In sched_pickcpu() change general logic of CPU selection. First
look for idle CPU, sharing last level cache with previously used one,
skipping SMT CPU groups. If none found, search all CPUs for the least loaded
one, where the thread with its priority can run now. If none found, search
just for the least loaded CPU.
- Make cpu_search() compare lowest/highest CPU load when comparing CPU
groups with equal load. That allows to differentiate 1+1 and 2+0 loads.
- Make cpu_search() to prefer specified (previous) CPU or group if load
is equal. This improves cache affinity for more complicated topologies.
- Randomize CPU selection if above factors are equal. Previous code tend
to prefer CPUs with lower IDs, causing unneeded collisions.
- Rework periodic balancer in sched_balance_group(). With cpu_search()
more intelligent now, make balansing process flat, removing recursion
over the topology tree. That fixes double swap problem and makes load
distribution more even and predictable.
All together this gives 10-15% performance improvement in many tests on
CPUs with SMT, such as Core i7, for number of threads is less then number
of logical CPUs. In some tests it also gives positive effect to systems
without SMT.
Reviewed by: jeff
Tested by: flo, hackers@
MFC after: 1 month
Sponsored by: iXsystems, Inc.
Diffstat (limited to 'Makefile.mips')
0 files changed, 0 insertions, 0 deletions