The patch titled Subject: mm/z3fold.c: allow __GFP_HIGHMEM in z3fold_alloc has been added to the -mm tree. Its filename is mm-z3foldc-allow-__gfp_highmem-in-z3fold_alloc.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-z3foldc-allow-__gfp_highmem-in-z3fold_alloc.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-z3foldc-allow-__gfp_highmem-in-z3fold_alloc.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Henry Burns <henryburns@xxxxxxxxxx> Subject: mm/z3fold.c: allow __GFP_HIGHMEM in z3fold_alloc One of the gfp flags used to show that a page is movable is __GFP_HIGHMEM. Currently z3fold_alloc() fails when __GFP_HIGHMEM is passed. Now that z3fold pages are movable, we allow __GFP_HIGHMEM. We strip the movability related flags from the call to kmem_cache_alloc() for our slots since it is a kernel allocation. Link: http://lkml.kernel.org/r/20190712222118.108192-1-henryburns@xxxxxxxxxx Signed-off-by: Henry Burns <henryburns@xxxxxxxxxx> Acked-by: Vitaly Wool <vitalywool@xxxxxxxxx> Reviewed-by: Shakeel Butt <shakeelb@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/z3fold.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/mm/z3fold.c~mm-z3foldc-allow-__gfp_highmem-in-z3fold_alloc +++ a/mm/z3fold.c @@ -196,7 +196,8 @@ static inline struct z3fold_buddy_slots gfp_t gfp) { struct z3fold_buddy_slots *slots = kmem_cache_alloc(pool->c_handle, - gfp); + (gfp & ~(__GFP_HIGHMEM + | __GFP_MOVABLE))); if (slots) { memset(slots->slot, 0, sizeof(slots->slot)); @@ -853,7 +854,7 @@ static int z3fold_alloc(struct z3fold_po enum buddy bud; bool can_sleep = gfpflags_allow_blocking(gfp); - if (!size || (gfp & __GFP_HIGHMEM)) + if (!size) return -EINVAL; if (size > PAGE_SIZE) _ Patches currently in -mm which might be from henryburns@xxxxxxxxxx are mm-z3foldc-allow-__gfp_highmem-in-z3fold_alloc.patch mm-z3foldc-remove-z3fold_migration-trylock.patch