From: Simon Horman <horms@verge.net.au>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Magnus Damm <magnus.damm@gmail.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Arnd Bergmann <arnd@arndb.de>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH/RFC] arm64: defconfig: Enlarge CMA alignment to 2 MiB
Date: Thu, 2 Feb 2017 10:22:03 +0100 [thread overview]
Message-ID: <20170202092203.GK21831@verge.net.au> (raw)
In-Reply-To: <a4e171b0-6403-9d88-3b8f-e63f3f050689@arm.com>
On Wed, Feb 01, 2017 at 02:06:45PM +0000, Robin Murphy wrote:
> On 01/02/17 13:45, Magnus Damm wrote:
> > Hi Geert,
> >
> > 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.
>
> I don't see the original patch (linux-arm-kernel doesn't look to have it
> archived either), but I think bumping the default up to 2MB to match our
> normal section size sounds generally reasonable - users can still
> override it manually in their config, right? For 16KB and 64KB granules,
> it is at least the size covered by contiguous-hinted pages; the actual
> section sizes there are far too big to be practical for alignment
> purposes anyway (32MB and 512MB respectively).
I am happy to take this patch on the strength of the above but an Ack or
similar tag from Robin would be nice. Geert, perhaps you could repost the
patch with Robin CCed?
next prev parent reply other threads:[~2017-02-02 9:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 16:03 Geert Uytterhoeven
2017-02-01 13:45 ` Magnus Damm
2017-02-01 14:06 ` Robin Murphy
2017-02-02 9:22 ` Simon Horman [this message]
2017-02-13 10:33 ` Geert Uytterhoeven
2017-02-13 10:29 ` Geert Uytterhoeven
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=20170202092203.GK21831@verge.net.au \
--to=horms@verge.net.au \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=geert+renesas@glider.be \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=magnus.damm@gmail.com \
--cc=robin.murphy@arm.com \
--cc=will.deacon@arm.com \
/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
all inboxes | Powered by JetHome®