Commit f8c82188 authored by HATAYAMA Daisuke's avatar HATAYAMA Daisuke Committed by Atsushi Kumagai
Browse files

[PATCH] Use divideup() to calculate maximum required bitmap size.



Currently, check_cyclic_buffer_overrun() wrongly calculates maximum
bitmap size required to represent maximum block size managed by buddy
allocator with roundup(). Then, max_block_size is BITPERBYTE-time
larger than its correct size. As a result, although the bug never
affect free-page filtering since roundup(max_order_nr_pages,
BITPERBYTE) is a multiple of divideup(max_order_nr_pages, BITPERBYTE),
the following sanity check, (max_block_size > info->bufsize_cyclic),
and recalculation of info->bufsize_cyclic becomes BITPERBYTE-time
conservative and inefficient.

Signed-off-by: default avatarHATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
parent a785fa7d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment