[PATH V3] arm64: mm: Create gigabyte kernel logical mappings where possible

Jungseok Lee jays.lee at samsung.com
Tue May 6 20:10:37 PDT 2014


On Tuesday, May 06, 2014 10:02 PM, Steve Capper wrote:
> We have the capability to map 1GB level 1 blocks when using a 4K
> granule.
> 
> This patch adjusts the create_mapping logic s.t. when mapping physical
> memory on boot, we attempt to use a 1GB block if both the VA and PA
> start and end are 1GB aligned. This both reduces the levels of lookup
> required to resolve a kernel logical address, as well as reduces TLB
> pressure on cores that support 1GB TLB entries.
> 
> Signed-off-by: Steve Capper <steve.capper at linaro.org>

I've tried it on top of 3.15-rc4 with A57 Fastmodel. It works well.

Tested-by: Jungseok Lee <jays.lee at samsung.com>

> ---
> Changed in V3: added awareness of 1GB blocks to kern_addr_valid.
> This was tested via gdb:
> gdb ./vmlinux /proc/kcore
> disassemble kern_addr_valid
> 
> The output looked valid.
> In V2 of the patch, I got an oops.
> 
> I've defined constants with pgdval_t type. Ideally, I would like to
> define pudval_t types, but due to the way folding works this does not
> exist for <4 levels. I'm not sure if it would be better to define
> pudval_t for <4 levels or leave this as is?

I got the same question when I wrote 4 level patches.
Although my choice was pgdval_t, I still cannot tell which one
is better.

- Jungseok Lee




More information about the linux-arm-kernel mailing list