Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1579580

Re: [PATCH/RFC] arm64: defconfig: Enlarge CMA alignment to 2 MiB

From Geert Uytterhoeven <geert@linux-m68k.org>
Newsgroups linux.kernel
Subject Re: [PATCH/RFC] arm64: defconfig: Enlarge CMA alignment to 2 MiB
Date 2017-02-13 11:30 +0100
Message-ID <tam3n-2qv-3@gated-at.bofh.it> (permalink)
References <t4hpL-6ni-1@gated-at.bofh.it> <t63sm-6Bo-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Magnus,

On Wed, Feb 1, 2017 at 2:45 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> On Sat, Jan 28, 2017 at 1:03 AM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
>> Some IOMMUs (e.g. Renesas IPMMU/VMSA) support only page sizes of 4 KiB,
>> 2 MiB, and 1 GiB.
>>
>> With the default setting of CONFIG_CMA_ALIGNMENT = 8, allocations larger
>> than 1 MiB are aligned to a 1 MiB boundary only.  Hence a 2 MiB
>> allocation may not be aligned, leading to a mapping of 512 4 KiB pages.
>>
>> Increase CONFIG_CMA_ALIGNMENT to allow mapping a 2 MiB buffer using a
>> single PTE, decreasing memory usage and TLB pressure.
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> ---
>> Is this useful?
>>
>> Should there instead be different defaults in Kconfig, depending on
>> enabled platform support?
>
> I think there is a dependency on the kernel page size configuration as
> well. In case of 16 KiB or 64 KiB page size configuration other large
> page sizes may be required.

This is about IOMMU pages, not (CPU)MMU pages?

Still, there is indeed some dependency, as CONFIG_CMA_ALIGNMENT is a
shift relative to PAGE_SHIFT (i.e. CONFIG_ARM64_PAGE_SHIFT = 12 in
arm64_defconfig).

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH/RFC] arm64: defconfig: Enlarge CMA alignment to 2 MiB Magnus Damm <magnus.damm@gmail.com> - 2017-02-01 14:50 +0100
  Re: [PATCH/RFC] arm64: defconfig: Enlarge CMA alignment to 2 MiB Robin Murphy <robin.murphy@arm.com> - 2017-02-01 15:10 +0100
    Re: [PATCH/RFC] arm64: defconfig: Enlarge CMA alignment to 2 MiB Simon Horman <horms@verge.net.au> - 2017-02-02 10:30 +0100
    Re: [PATCH/RFC] arm64: defconfig: Enlarge CMA alignment to 2 MiB Geert Uytterhoeven <geert@linux-m68k.org> - 2017-02-13 11:40 +0100
  Re: [PATCH/RFC] arm64: defconfig: Enlarge CMA alignment to 2 MiB Geert Uytterhoeven <geert@linux-m68k.org> - 2017-02-13 11:30 +0100

csiph-web