public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* Page sizes supported by RISC-V
@ 2024-09-28 16:35 Florian Weimer
  2024-09-29  3:29 ` [External] " Xu Lu
  2024-09-29 14:51 ` Jeff Law
  0 siblings, 2 replies; 14+ messages in thread
From: Florian Weimer @ 2024-09-28 16:35 UTC (permalink / raw)
  To: linux-riscv; +Cc: Jeff Law, Palmer Dabbelt, Xu Lu

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

I found a previous proposal for kernel support of 64 KiB pages:

  [RFC PATCH V1 00/11] riscv: Introduce 64K base page
  <https://lore.kernel.org/linux-riscv/20231123065708.91345-1-luxu.kernel@bytedance.com/>

Is this something we should consider today?

I'm leaning towards teaching glibc that the RISC-V page size is always
4 KiB because given the current toolchain defaults, it's necessary
to rebuild the world anyway if supported page sizes ever change.

Thanks,
Florian


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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-01-15 14:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox