diff options
author | Ingo Molnar <mingo@kernel.org> | 2024-03-08 13:58:52 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2024-03-12 13:03:39 +0300 |
commit | 214c1b7f13954559cf09d5d04b934bf32ba4d618 (patch) | |
tree | 8846628aab4dcae1cb8a9517b5d4f82baa3e4449 /tools/perf/scripts/python/libxed.py | |
parent | 855684c7d938c2442f07eabc154e7532b4c1fbf9 (diff) | |
download | linux-214c1b7f13954559cf09d5d04b934bf32ba4d618.tar.xz |
sched/balancing: Switch the 'DEFINE_SPINLOCK(balancing)' spinlock into an 'atomic_t sched_balance_running' flag
The 'balancing' spinlock added in:
08c183f31bdb ("[PATCH] sched: add option to serialize load balancing")
... is taken when the SD_SERIALIZE flag is set in a domain, but in reality it
is a glorified global atomic flag serializing the load-balancing of
those domains.
It doesn't have any explicit locking semantics per se: we just
spin_trylock() it.
Turn it into a ... global atomic flag. This makes it more
clear what is going on here, and reduces overhead and code
size a bit:
# kernel/sched/fair.o: [x86-64 defconfig]
text data bss dec hex filename
60730 2721 104 63555 f843 fair.o.before
60718 2721 104 63543 f837 fair.o.after
Also document the flag a bit.
No change in functionality intended.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
Cc: Shrikanth Hegde <sshegde@linux.ibm.com>
Link: https://lore.kernel.org/r/20240308105901.1096078-2-mingo@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions