[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <612940d2-4c8e-459c-8d7d-4ccec08fce0a@os.amperecomputing.com>
Date: Tue, 2 Sep 2025 17:50:33 -0700
From: Yang Shi <yang@...amperecomputing.com>
To: Ryan Roberts <ryan.roberts@....com>, Dev Jain <dev.jain@....com>,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Ard Biesheuvel <ardb@...nel.org>, scott@...amperecomputing.com, cl@...two.org
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH v7 0/6] arm64: support FEAT_BBM level 2 and large block
mapping when rodata=full
>>>
>>>
>>> I am wondering whether we can just have a warn_on_once or something
>>> for the case
>>> when we fail to allocate a pagetable page. Or, Ryan had
>>> suggested in an off-the-list conversation that we can maintain a
>>> cache of PTE
>>> tables for every PMD block mapping, which will give us
>>> the same memory consumption as we do today, but not sure if this is
>>> worth it.
>>> x86 can already handle splitting but due to the callchains
>>> I have described above, it has the same problem, and the code has
>>> been working
>>> for years :)
>> I think it's preferable to avoid having to keep a cache of pgtable
>> memory if we
>> can...
>
> Yes, I agree. We simply don't know how many pages we need to cache,
> and it still can't guarantee 100% allocation success.
This is wrong... We can know how many pages will be needed for splitting
linear mapping to PTEs for the worst case once linear mapping is
finalized. But it may require a few hundred megabytes memory to
guarantee allocation success. I don't think it is worth for such rare
corner case.
Thanks,
Yang
>
> Thanks,
> Yang
>
>>
>> Thanks,
>> Ryan
>>
>>
>
Powered by blists - more mailing lists