]> git.baikalelectronics.ru Git - kernel.git/commit
arch/x86: replace nodes_weight with nodes_empty where appropriate
authorYury Norov <yury.norov@gmail.com>
Sun, 23 Jan 2022 18:38:57 +0000 (10:38 -0800)
committerYury Norov <yury.norov@gmail.com>
Fri, 3 Jun 2022 13:52:57 +0000 (06:52 -0700)
commitcce671d10cdf7ca8cff0806cfc66a0c2b1a2d46d
tree2d526eb0167d2efebc7dd1a5760c09436a6ca738
parentd6cf39336e9293980e17323d393f8f9b6d261e01
arch/x86: replace nodes_weight with nodes_empty where appropriate

mm code calls nodes_weight() to check if any bit of a given nodemask is
set. We can do it more efficiently with nodes_empty() because nodes_empty()
stops traversing the nodemask as soon as it finds first set bit, while
nodes_weight() counts all bits unconditionally.

Signed-off-by: Yury Norov <yury.norov@gmail.com>
arch/x86/mm/amdtopology.c
arch/x86/mm/numa_emulation.c