]> git.baikalelectronics.ru Git - kernel.git/commit
mm/vmstat: replace cpumask_weight with cpumask_empty where appropriate
authorYury Norov <yury.norov@gmail.com>
Sun, 23 Jan 2022 18:38:56 +0000 (10:38 -0800)
committerYury Norov <yury.norov@gmail.com>
Fri, 3 Jun 2022 13:52:57 +0000 (06:52 -0700)
commitd6cf39336e9293980e17323d393f8f9b6d261e01
treed24cf74d8214ffed9cd1d9d8c5f4407e6621cd4b
parent2bcb0f653d8c3188b5573f7c6e7e159ad659aec8
mm/vmstat: replace cpumask_weight with cpumask_empty where appropriate

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

Signed-off-by: Yury Norov <yury.norov@gmail.com>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
mm/vmstat.c