ANDROID: mm: Use intended order-adjusted batch size

Commit 44042b4498 ("mm/page_alloc: allow high-order pages to be stored
on the per-cpu lists") adjusts the pcp batch size __rmqueue_pcplist()
allocates from rmqueue_bulk() in proportion to the page order.

This line was not properly carried forward when porting
commit 37b2d597bb ("ANDROID: mm: add cma pcp list") to android 13-5.15.

Fixes: 37b2d597bb ("ANDROID: mm: add cma pcp list")
Bug: 260129859
Change-Id: I28b7c22c75596176fd951974d1dd682ee1014efb
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
(cherry picked from commit 4931d96eb36e955fe72eee53b1ce834e2894ab5c)
This commit is contained in:
Patrick Daly
2022-11-21 21:12:38 -08:00
committed by Todd Kjos
parent 6e161d9045
commit 46a1c28f37

View File

@@ -3264,7 +3264,7 @@ static struct list_head *get_populated_pcp_list(struct zone *zone,
*/
if (batch > 1)
batch = max(batch >> order, 2);
alloced = rmqueue_bulk(zone, order, pcp->batch, list, migratetype, alloc_flags);
alloced = rmqueue_bulk(zone, order, batch, list, migratetype, alloc_flags);
pcp->count += alloced << order;
if (list_empty(list))