The following commit by Chen Feng introduces cached page pools to
improve the allocation perfromance of system heap types.
'commit
e7f63771b60e ("ION: Sys_heap: Add cached pool to spead up
cached buffer alloc")'
But it has a logical problem assigning gfp mask for page allocation
from the kernel page allocator. low_order_gfp_flags should be applied
to the low order page allocations but is is actually not because
high_order_gfp_flags overwrites the gfp_flags at the first iteration
of page pool creation and there is no chance to get back to
low_order_gfp_flags.
Change-Id: I4fb10bfc9f517e660e2f78661d67146380441ecb
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
bool cached)
{
int i;
- gfp_t gfp_flags = low_order_gfp_flags;
+ gfp_t gfp_flags = high_order_gfp_flags;
for (i = 0; i < NUM_ORDERS; i++) {
struct ion_page_pool *pool;
- if (orders[i] > 4)
- gfp_flags = high_order_gfp_flags;
+ if (orders[i] < 4)
+ gfp_flags = low_order_gfp_flags;
pool = ion_page_pool_create(gfp_flags, orders[i], cached);
if (!pool)