Commit 801a573
committed
mm/percpu: micro-optimize pcpu_is_populated()
bitmap_next_clear_region() calls find_next_zero_bit() and find_next_bit()
sequentially to find a range of clear bits. In case of pcpu_is_populated()
there's a chance to return earlier if bitmap has all bits set.
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Dennis Zhou <dennis@kernel.org>1 parent 749443d commit 801a573
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1070 | 1070 | | |
1071 | 1071 | | |
1072 | 1072 | | |
1073 | | - | |
| 1073 | + | |
1074 | 1074 | | |
1075 | | - | |
1076 | | - | |
| 1075 | + | |
| 1076 | + | |
1077 | 1077 | | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
| 1078 | + | |
| 1079 | + | |
1081 | 1080 | | |
1082 | 1081 | | |
1083 | | - | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
1084 | 1085 | | |
1085 | 1086 | | |
1086 | 1087 | | |
| |||
0 commit comments