On 13/02/2025 21:27, Yang Shi wrote:
quoted
quoted
I don't really understand how vmalloc is relevant here? vmalloc can already map
huge pages you use vmalloc_huge() and changing the permissions of vmalloc
mapping will only affect the ptes pertaining to that mapping; I don't see why
that would cause permissions to be changed on the linear map or for huge pages
in the linear map to be split?
I just uses vmalloc() API to emulate what modules loading does. Allocate memory
via vmalloc() then change permission to, for example, read-only, by calling
set_memory_ro(). So I can stress the page split by doing it on the most of
memory, for example, 80% of memory. It is more efficient than loading real modules.
Ahh I see. I hadn't previously appreciated that we change the linear map
permissions at the same time as changing the vmap permissions. Makes sense.
It is implemented by a patch against test_vmalloc. I don't include the patch in
this series, if you think it is useful, I can include it in v3 anyway.
I don't think it's necessary to include in this series. Although perhaps useful
as follow up patch to beef up the vmalloc perf tests.
Thanks,
Ryan