public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Jeff Law <jeffreyalaw@gmail.com>
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: Sun, 29 Sep 2024 17:08:51 +0200	[thread overview]
Message-ID: <8734lixzss.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <e55950a2-beb0-4f2a-81da-1c66724116d7@gmail.com> (Jeff Law's message of "Sun, 29 Sep 2024 08:51:25 -0600")

* Jeff Law:

> On 9/28/24 10:35 AM, Florian Weimer wrote:
>> I'm working on adding a <sys/pagesize.h> header to glibc, so that
>> programmers can easily determine the range of possible page sizes for a
>> particular target, for things like pointer tagging and mapped file
>> alignment requirements.
>> Linux currently supports 4 KiB pages only.  I couldn't find anything
>> in
>> the RISC-V specifications that mandates a specific page size, but of
>> course the way ELF LOAD segments are constructed necessarily imposes a
>> maximum page size constraint for particular executables.  Today, the
>> toolchain assumes the maximum supported page size is 4 KiB, and this is
>> also reflected in arch/riscv/Kconfig in the Linux sources (as far as I
>> can read Kconfig).

> 4k is probably the most common in practice right now.  RISC-V
> generally seems to leave this kind of thing to the implementors to
> decide, so I wouldn't be at all surprised if there's nothing in the
> privileged spec other than specifying a minimum page size.

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-)

Thanks,
Florian


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

  reply	other threads:[~2024-09-29 15:09 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 [this message]
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

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=8734lixzss.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=luxu.kernel@bytedance.com \
    --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