public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Florian Weimer <fweimer@redhat.com>,
	"Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: linux-riscv@lists.infradead.org,
	Palmer Dabbelt <palmer@rivosinc.com>,
	Xu Lu <luxu.kernel@bytedance.com>
Subject: Re: Page sizes supported by RISC-V
Date: Wed, 15 Jan 2025 07:58:30 -0700	[thread overview]
Message-ID: <971d5cd3-f7fc-47d6-93da-be8f8a101901@gmail.com> (raw)
In-Reply-To: <87msfsldl8.fsf@oldenburg.str.redhat.com>



On 1/15/25 12:51 AM, Florian Weimer wrote:
> * Maciej W. Rozycki:
> 
>> On Tue, 14 Jan 2025, Jeff Law wrote:
>>
>>>>> I understand that not making a call in the specifications avoids the
>>>>> need to resolve these conflicts.  But if you don't define a maximum page
>>>>> size there, it is effectively specified as 4096 bytes.  This will cause
>>>>> problems if distributions targeting large systems want a larger page
>>>>> size because it better aligns with the kind of hardware they target.
>>>>> It's really bad for cross-distribution binary compatibility, something
>>>>> that's important outside the embedded space and probably necessary for
>>>>> mainstreaming.
>>>>>
>>>>> (Of course you know all this. 8-)
>>>> Yup.  Once it's baked into one significant distro, it's doing to be
>>>> bloody hard to change.  I'm sure we both remember the PPC pagesize stuff
>>>> from a few years back ;(
>>>>
>>>> I strongly suspect the lack of specification here is mean to give
>>>> degrees of freedom to the implementors, but sometimes those writing the
>>>> specs don't really understand the implication of leaving things like
>>>> this unspecified and how much pain it really causes in the end.
>>> So resurrecting this discussion.
>>>
>>> Is there any realistic chance of bumping the minimum pagesize for risc-v
>>> at this point?  Xu Lu and his team have some compelling data that
>>> indicates moving forward to 64k could be highly profitable.  That work
>>> was done on aarch64, but should be generally applicable to riscv as well.
>>
>> Can't we simply make a reasonable guess/assumption just for the purpose
>> of tooling?
> 
> That reasonable default exists today and is 4096.  Some effort is
> required to change that.
Right.  Any change in this value is a rebuild-the-world effort with a 
flag day for binary compatibilty.  Plus there's issues for cross distro 
compatibility and even questions about whether or not any existing 
systems could support anything but 4k pagesizes.



> 
>> Based on the experience with MIPS/AArch64 shared here there should be no
>> disagreement as to going for at least 64KiB I suppose.  Then shall we go
>> beyond to leave room for some expansion, such as for 256KiB?
> 
> The alternative would be to fix Linux so that it supports multiple page
> sizes.  Then from an application perspective (and dynamic linker
> perspective), the page size could remain at 4096 bytes.  I understand
> this is difficult because once you have multiple page sizes, there are
> concerns regarding fragmentation.
So essentially break the hard tie between the kernel and usercode and 
allow them to vary independently...  Hmm....

jeff

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

      parent reply	other threads:[~2025-01-15 14:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-28 16:35 Page sizes supported by RISC-V Florian Weimer
2024-09-29  3:29 ` [External] " Xu Lu
2024-09-29  5:04   ` Florian Weimer
2024-09-29  5:18     ` Xu Lu
2024-09-29 14:51 ` Jeff Law
2024-09-29 15:08   ` Florian Weimer
2024-09-29 15:18     ` Jeff Law
2024-09-29 15:49       ` Maciej W. Rozycki
2024-10-02 15:25         ` Palmer Dabbelt
2025-01-15  2:00       ` Jeff Law
2025-01-15  6:51         ` Maciej W. Rozycki
2025-01-15  7:51           ` Florian Weimer
2025-01-15  9:03             ` Maciej W. Rozycki
2025-01-15 14:58             ` Jeff Law [this message]

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=971d5cd3-f7fc-47d6-93da-be8f8a101901@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=luxu.kernel@bytedance.com \
    --cc=macro@orcam.me.uk \
    --cc=palmer@rivosinc.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