From: Dev Jain <dev.jain@arm.com>
To: Yang Shi <yang@os.amperecomputing.com>,
Ryan Roberts <ryan.roberts@arm.com>,
will@kernel.org, catalin.marinas@arm.com,
Miko.Lenczewski@arm.com, scott@os.amperecomputing.com,
cl@gentwo.org
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] arm64: mm: support large block mapping when rodata=full
Date: Thu, 24 Jul 2025 17:13:37 +0530 [thread overview]
Message-ID: <c77aa9e4-2209-4dbd-904e-daace1c929b6@arm.com> (raw)
In-Reply-To: <3b3be4db-4f8e-4d81-8e52-dadad23dcd24@os.amperecomputing.com>
On 24/07/25 2:21 am, Yang Shi wrote:
>
>
> On 7/23/25 10:38 AM, Dev Jain wrote:
>>
>> On 23/06/25 6:56 pm, Ryan Roberts wrote:
>>> [...]
>>>
>>>>> +
>>>>> +int split_leaf_mapping(unsigned long addr)
>>>> Thanks for coming up with the code. It does help to understand your
>>>> idea. Now I
>>>> see why you suggested "split_mapping(start); split_mapping(end);"
>>>> model. It does
>>>> make the implementation easier because we don't need a loop
>>>> anymore. But this
>>>> may have a couple of problems:
>>>> 1. We need walk the page table twice instead of once. It sounds
>>>> expensive.
>>> Yes we need to walk twice. That may be more expensive or less
>>> expensive,
>>> depending on the size of the range that you are splitting. If the
>>> range is large
>>> then your approach loops through every leaf mapping between the
>>> start and end
>>> which will be more expensive than just doing 2 walks. If the range
>>> is small then
>>> your approach can avoid the second walk, but at the expense of all
>>> the extra
>>> loop overhead.
>>>
>>> My suggestion requires 5 loads (assuming the maximum of 5 levels of
>>> lookup).
>>> Personally I think this is probably acceptable? Perhaps we need some
>>> other
>>> voices here.
>>
>> Hello all,
>>
>> I am starting to implement vmalloc-huge by default with BBML2
>> no-abort on arm64.
>> I see that there is some disagreement related to the way the
>> splitting needs to
>> be implemented - I skimmed through the discussions and it will
>> require some work
>> to understand what is going on :) hopefully I'll be back soon to give
>> some of
>> my opinions.
>
> Hi Dev,
>
> Thanks for the heads up.
>
> In the last email I suggested skip the leaf mappings in the split
> range in order to reduce page table walk overhead for
> split_mapping(start, end). In this way we can achieve:
> - reuse the most split code for repainting (just need
> NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS flag for repainting to split page
> table to PTEs)
> - just walk page table once
> - have similar page table walk overhead with
> split_mapping(start)/split_mapping(end) if the split range is large
>
> I'm basically done on a new spin to implement it and solve all the
> review comments from v4. I should be able to post the new spin by the
> end of this week.
Great! As Catalin notes on my huge-perm change series, that series
doesn't have any user so it does not make sense for that to go in
without your
series - can you merge that series into your work for the new version?
>
> Regards,
> Yang
>
>>
>>>
>>>
>
next prev parent reply other threads:[~2025-07-24 11:44 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-31 2:41 [v4 PATCH 0/4] arm64: support FEAT_BBM level 2 and " Yang Shi
2025-05-31 2:41 ` [PATCH 1/4] arm64: cpufeature: add AmpereOne to BBML2 allow list Yang Shi
2025-05-31 2:41 ` [PATCH 2/4] arm64: mm: make __create_pgd_mapping() and helpers non-void Yang Shi
2025-06-16 10:04 ` Ryan Roberts
2025-06-17 21:11 ` Yang Shi
2025-06-23 13:05 ` Ryan Roberts
2025-05-31 2:41 ` [PATCH 3/4] arm64: mm: support large block mapping when rodata=full Yang Shi
2025-06-16 11:58 ` Ryan Roberts
2025-06-16 12:33 ` Ryan Roberts
2025-06-17 21:01 ` Yang Shi
2025-06-16 16:24 ` Ryan Roberts
2025-06-17 21:09 ` Yang Shi
2025-06-23 13:26 ` Ryan Roberts
2025-06-23 19:12 ` Yang Shi
2025-06-26 22:39 ` Yang Shi
2025-07-23 17:38 ` Dev Jain
2025-07-23 20:51 ` Yang Shi
2025-07-24 11:43 ` Dev Jain [this message]
2025-07-24 17:59 ` Yang Shi
2025-05-31 2:41 ` [PATCH 4/4] arm64: mm: split linear mapping if BBML2 is not supported on secondary CPUs Yang Shi
2025-06-23 12:26 ` Ryan Roberts
2025-06-23 20:56 ` Yang Shi
2025-06-13 17:21 ` [v4 PATCH 0/4] arm64: support FEAT_BBM level 2 and large block mapping when rodata=full Yang Shi
2025-06-16 9:09 ` Ryan Roberts
2025-06-17 20:57 ` Yang Shi
2025-07-24 22:11 [v5 " Yang Shi
2025-07-24 22:11 ` [PATCH 3/4] arm64: mm: support " Yang Shi
2025-07-29 12:34 ` Dev Jain
2025-08-05 21:28 ` Yang Shi
2025-08-06 0:10 ` Yang Shi
2025-08-01 14:35 ` Ryan Roberts
2025-08-04 10:07 ` Ryan Roberts
2025-08-05 18:53 ` Yang Shi
2025-08-06 7:20 ` Ryan Roberts
2025-08-07 0:44 ` Yang Shi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c77aa9e4-2209-4dbd-904e-daace1c929b6@arm.com \
--to=dev.jain@arm.com \
--cc=Miko.Lenczewski@arm.com \
--cc=catalin.marinas@arm.com \
--cc=cl@gentwo.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ryan.roberts@arm.com \
--cc=scott@os.amperecomputing.com \
--cc=will@kernel.org \
--cc=yang@os.amperecomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®