[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <43192985-584e-4d6a-86b6-5299638d9fb1@arm.com>
Date: Tue, 18 Feb 2025 11:58:05 +0000
From: Ryan Roberts <ryan.roberts@....com>
To: Yang Shi <yang@...amperecomputing.com>, catalin.marinas@....com,
will@...nel.org
Cc: cl@...two.org, scott@...amperecomputing.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC v2 PATCH 0/2] arm64: support FEAT_BBM level 2 and large
block mapping when rodata=full
On 13/02/2025 21:27, Yang Shi wrote:
>>> 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
Powered by blists - more mailing lists