Skip to content

Commit

Permalink
[Linux/aarch64] Move page size ceiling to 16k
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=236564

Patch by Gustavo Noronha Silva <gustavo@noronha.dev.br> on 2022-02-14
Reviewed by Yusuke Suzuki.

On Apple Silicon, Linux needs to use 16k pages to be as fast as possible. This change has no
visible impact on binary size for release builds, so apply it to all of aarch64 Linux.

* wtf/PageBlock.h:


Canonical link: https://commits.webkit.org/247233@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
kov authored and webkit-commit-queue committed Feb 14, 2022
1 parent ece567a commit 0a4a03d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions Source/WTF/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2022-02-14 Gustavo Noronha Silva <gustavo@noronha.dev.br>

[Linux/aarch64] Move page size ceiling to 16k
https://bugs.webkit.org/show_bug.cgi?id=236564

Reviewed by Yusuke Suzuki.

On Apple Silicon, Linux needs to use 16k pages to be as fast as possible. This change has no
visible impact on binary size for release builds, so apply it to all of aarch64 Linux.

* wtf/PageBlock.h:

2022-02-13 Matt Woodrow <mattwoodrow@apple.com>

Add support for parsing 'subgrid' in grid-template-columns/row
Expand Down
5 changes: 3 additions & 2 deletions Source/WTF/wtf/PageBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ namespace WTF {
// and recompiled. Sorry.
//
// macOS x86_64 uses 4 KiB, but Apple's aarch64 systems use 16 KiB. Use 16 KiB on all Apple systems
// for consistency.
// for consistency. Linux on Apple Silicon also needs to use 16KiB for best performance, so use that
// for Linux on aarch64 as well.
//
// Most Linux and Windows systems use a page size of 4 KiB.
//
// On Linux, Power systems normally use 64 KiB pages.
//
// Use 64 KiB for any unknown CPUs to be conservative.
#if OS(DARWIN) || PLATFORM(PLAYSTATION) || CPU(MIPS) || CPU(MIPS64)
#if OS(DARWIN) || PLATFORM(PLAYSTATION) || CPU(MIPS) || CPU(MIPS64) || (OS(LINUX) && CPU(ARM64))
constexpr size_t CeilingOnPageSize = 16 * KB;
#elif CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(UNKNOWN)
constexpr size_t CeilingOnPageSize = 64 * KB;
Expand Down

0 comments on commit 0a4a03d

Please sign in to comment.