From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] ARM64: 4 level page table translation for 4KB pages
Date: Wed, 2 Apr 2014 10:01:38 +0100 [thread overview]
Message-ID: <20140402090136.GA31892@arm.com> (raw)
In-Reply-To: <004b01cf4e27$d47da990$7d78fcb0$@samsung.com>
On Wed, Apr 02, 2014 at 04:58:39AM +0100, Jungseok Lee wrote:
> On Tuesday, April 01, 2014 10:23 PM, Catalin Marinas wrote:
> > On some previous patches I've seen posted for 4-levels I asked that 64K
> > and 4K page configurations are decoupled from the pgtable-?level.h
> > macros so that if we ever need 3-levels with 64K it's easy to enable.
>
> Is your request to decouple page size from the number of page tables?
> In other words, would you like to prepare 4 options, 1)4KB+3Level, 2)
> 4KB+4Level, 3)64KB+2Level and 4)64KB+3Level, as combining page size
> with page table levels in kernel configuration?
We can still use two options to make things less confusing: one for the
page size (4K/64K) and another for the size of the virtual address
space. From those two we can infer the number levels required. We can
limit the options to 39-bit, 42 (only fo 64K pages) and architecture
current maximum of 48 (for both 4K and 64K).
As for some code refactoring, for example, PTRS_PER_PTE etc. correspond
to the page size rather than the number of levels, so move them to
pgtable-{4k,64k}-hwdef.h. From the VA_BITS option above you can
calculate PTRS_PER_PGD (1 << (VA_BITS - PGDIR_SHIFT)). If this is too
large, you need a bigger PGDIR_SHIFT (another level). Some #ifdef's in
pgtable-hwdef.h and maybe create another pgtable-types.h. The
asm/memory.h file already defines the offsets in terms of VA_BITS, so
for the initial patches we should keep the same layout, make the
4-levels patches easier to review.
(and in the memory.txt doc I think we should make the end address
exclusive as it's easier to follow and can be compared with the kernel
virtual memory layout printed during boot)
--
Catalin
next prev parent reply other threads:[~2014-04-02 9:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 3:51 [RFC] ARM64: 4 level page table translation for 4KB pages Jungseok Lee
2014-03-31 6:56 ` Arnd Bergmann
2014-03-31 11:31 ` Catalin Marinas
2014-03-31 12:45 ` Catalin Marinas
2014-03-31 12:58 ` Arnd Bergmann
2014-03-31 15:00 ` Catalin Marinas
2014-03-31 12:53 ` Arnd Bergmann
2014-03-31 15:27 ` Catalin Marinas
2014-03-31 23:11 ` Arnd Bergmann
2014-04-01 13:23 ` Catalin Marinas
2014-04-02 3:58 ` Jungseok Lee
2014-04-02 9:01 ` Catalin Marinas [this message]
2014-04-02 15:24 ` Catalin Marinas
2014-04-02 22:41 ` Jungseok Lee
2014-04-03 2:15 ` Sungjinn Chung
2014-04-03 8:38 ` Catalin Marinas
2014-04-03 9:14 ` Sungjinn Chung
2014-04-03 9:17 ` Catalin Marinas
2014-04-01 0:44 ` 정성진
2014-04-01 9:46 ` Catalin Marinas
2014-04-01 10:13 ` 정성진
2014-04-01 11:22 ` Catalin Marinas
2014-04-01 23:35 ` Sungjinn Chung
2014-04-01 0:42 ` Jungseok Lee
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=20140402090136.GA31892@arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).