Commit aefca998 authored by ying zuxin's avatar ying zuxin Committed by Treehugger Robot
Browse files

ANDROID: mm/memory.c: allow do_swap_page() to allocate from CMA

When __GFP_CMA was introduced in [1] it did not add __GFP_CMA for
swap cache allocations. Originally that was fixed as a separate
patch in [2], however in the later ACK kernels (6.1 and 6.6) this
fix was squashed with new a change introducing hooks in [3].
Combining such changes is wrong, so separating __GFP_CMA changes
into its own patch here.
By adding __GFP_CMA flags for do_swap_page() allocations we allow
swap-in page allocations to use CMA area.

[1] https://android-review.googlesource.com/c/kernel/common/+/3458307
[2] https://android-review.googlesource.com/c/kernel/common/+/2068987
[3] https://android-review.googlesource.com/c/kernel/common/+/3009322



Fixes: 9223cbec ("ANDROID: cma: redirect page allocation to CMA")
Bug: 417417101
Change-Id: I5f2249823cf0370c938794ad0f779c293565f2d5
Signed-off-by: default avatarying zuxin <11154159@vivo.com>
parent 14abb0c1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment