MGS-4376 [#imx-1238] fix low performance with CMA allocator
authorXianzhong <xianzhong.li@nxp.com>
Fri, 9 Nov 2018 18:37:56 +0000 (02:37 +0800)
committerXianzhong <xianzhong.li@nxp.com>
Tue, 29 Oct 2019 15:31:27 +0000 (23:31 +0800)
commit85f0cea18c8aa790cfad836affb30ec0c20169c4
tree49d43ddd5b40606d8e018f4272b7fa883b2872c9
parent47abcf5d5fd4e6d187d63e695982ea9d85fffb92
MGS-4376 [#imx-1238] fix low performance with CMA allocator

there are lots of PFNs busy message when run GPU tests:
 [  622.370671] alloc_contig_range: [4ea70, 4ea7c) PFNs busy
 [  626.518072] alloc_contig_range: [4ea90, 4ea9c) PFNs busy

this problem is related with CMA migration for fragments,

move CMA allocator after GFP to avoid memory migration,
also fix CMA preempt for contiguous memory request.

can improve CTS and gpubench benchmarks on M850D.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit ad77ed61b72c8362b04361acd2deb685fee15436)
drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_array.h
drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c