From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: tlbi: Set MAX_TLBI_OPS to PTRS_PER_PTE
Date: Tue, 27 Nov 2018 18:57:04 +0000 [thread overview]
Message-ID: <20181127185703.zbpl2uketmgyfpjk@mbp> (raw)
In-Reply-To: <1543251667-30520-1-git-send-email-will.deacon@arm.com>
On Mon, Nov 26, 2018 at 05:01:07PM +0000, Will Deacon wrote:
> In order to reduce the possibility of soft lock-ups, we bound the
> maximum number of TLBI operations performed by a single call to
> flush_tlb_range() to an arbitrary constant of 1024.
>
> Whilst this does the job of avoiding lock-ups, we can actually be a bit
> smarter by defining this as PTRS_PER_PTE. Due to the structure of our
> page tables, using PTRS_PER_PTE means that an outer loop calling
> flush_tlb_range() for entire table entries will end up performing just a
> single TLBI operation for each entry. As an example, mremap()ing a 1GB
> range mapped using 4k pages now requires only 512 TLBI operations when
> moving the page tables as opposed to 262144 operations (512*512) when
> using the current threshold of 1024.
To be more precise, we'd have 512 TLBI ASIDE1IS vs 262144 TLBI VAE1IS
(or VALE1IS). But since it only affects the given ASID, I don't think it
matters.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
prev parent reply other threads:[~2018-11-27 18:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 17:01 [PATCH] arm64: tlbi: Set MAX_TLBI_OPS to PTRS_PER_PTE Will Deacon
2018-11-27 18:57 ` Catalin Marinas [this message]
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=20181127185703.zbpl2uketmgyfpjk@mbp \
--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