ANDROID: mm: page_alloc: Use scaled batch size for PCP refills
In get_populated_pcp_list, a local batch variable is calculated by scaling down the per-cpu list's batch size (pcp->batch) relative to the allocation order. This is intended to prevent the allocator from aggressively draining the buddy freelists of high-order pages. However, due to a clerical error, the subsequent call to rmqueue_bulk mistakenly used the original, unscaled pcp->batch instead of the correctly scaled local batch variable. This bug leads to inefficient behavior, where the allocator requests an excessively large number of high-order pages. This can increase lock contention on the zone lock and contribute to memory fragmentation, making it harder for the buddy allocator to form large contiguous blocks. Fix this by passing the correctly scaled local batch variable to rmqueue_bulk. Bug: 442230877 Fixes: 433445e9 ("ANDROID: mm: add cma pcp list") Link: https://r.android.com/q/I9831eed113ec9e851b4f651755205ac9cf23b9be Change-Id: Ide0c27d7a2247d98e3f9265957ac761b4294e70e Signed-off-by:Kalesh Singh <kaleshsingh@google.com>
Loading