Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: use roundown_pow_of_two() in zone_batchsize()

Use roundown_pow_of_two(N) in zone_batchsize() rather than (1 <<
(fls(N)-1)) as they are equivalent, and with the former it is easier to
see what is going on.

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Lanttor Guo <lanttor.guo@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Howells and committed by
Linus Torvalds
9155203a 74614f8d

+1 -1
+1 -1
mm/page_alloc.c
··· 2706 2706 * of pages of one half of the possible page colors 2707 2707 * and the other with pages of the other colors. 2708 2708 */ 2709 - batch = (1 << (fls(batch + batch/2)-1)) - 1; 2709 + batch = rounddown_pow_of_two(batch + batch/2) - 1; 2710 2710 2711 2711 return batch; 2712 2712 }