Re: [RFC PATCH v2] mm/vmalloc: fix incorrect __vmap_pages_range_noflush() if vm_area_alloc_pages() from high order fallback to order0

Hailong Liu
2024-07-30T03:24:54Z

On Mon, 29. Jul 09:48, Baoquan He wrote:
[...]
> Hi Hailong,
>
> Please feel free to collect them to post formal patch, maybe two
> patches, one is to allow non-nofail to fallback to order-0 in
> vm_area_alloc_pages(), the other is passing out the fallbacked
> page_order to vmap_pages_range() if it's OK.
Sorry for late response. I personally prefer to revert part of
the problematic patch. There are several reasons:
- Save memory usage if high order allocation failed.
- If nofail and fallback to order0 in vmalloc huge allocation,
actually the allocation is alighed with PMD_SIZE or not PAGE_SHIFT.

You might be concerned about performance issues. But IMO,
- If we fallback to order0, we can make use of bulk allocator.
- Maybe we can remove VM_ALLOW_HUGE_VMAP in kvmalloc.

I am not sure if I have misunderstood anything. If I have, please
let me know.
>
> Thanks
> Baoquan
>
>

--
help you, help me,
Hailong.