From: Catalin Marinas <catalin.marinas@arm.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Will Deacon <will.deacon@arm.com>,
Inki Dae <inki.dae@samsung.com>,
Russell King <rmk+kernel@arm.linux.org.uk>
Subject: Re: [RFC 2/2] arm64: compat: cacheflush syscall: process only pages that are in the memory
Date: Fri, 26 Jan 2018 17:41:45 +0000 [thread overview]
Message-ID: <20180126174145.6gtfjjoxb57d7qwt@armageddon.cambridge.arm.com> (raw)
In-Reply-To: <20180126111441.29353-2-m.szyprowski@samsung.com>
On Fri, Jan 26, 2018 at 12:14:41PM +0100, Marek Szyprowski wrote:
> @@ -32,23 +33,36 @@
> static long
> __do_compat_cache_op(unsigned long start, unsigned long end)
[...]
> + if (follow_page(vma, start, 0)) {
> + ret = __flush_cache_user_range(start, start + chunk);
> + if (ret)
> + goto done;
> + }
This looks pretty expensive for pages already in memory. Could we do
some tricks with the AT instruction in __flush_cache_user_range() so
that we skip the flushing if the page isn't there? We know that when a
page is mapped, the cache will get cleaned/invalidated via set_pte_at()
+ sync_icache_dcache(), so the only problem of a race is flushing the
caches twice for a page. If a page gets unmapped after AT, we may bring
it back through the cache ops.
--
Catalin
next prev parent reply other threads:[~2018-01-26 17:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180126111453eucas1p1330d8561386c3cf2bb457bc22c0d99a8@eucas1p1.samsung.com>
2018-01-26 11:14 ` [RFC 1/2] arm: " Marek Szyprowski
[not found] ` <CGME20180126111453eucas1p178663ac7b17d0c92cc889a42b3f5bcec@eucas1p1.samsung.com>
2018-01-26 11:14 ` [RFC 2/2] arm64: compat: " Marek Szyprowski
2018-01-26 17:41 ` Catalin Marinas [this message]
2018-01-26 18:02 ` Catalin Marinas
2018-01-26 11:32 ` [RFC 1/2] arm: " Russell King - ARM Linux
2018-01-26 13:30 ` Marek Szyprowski
2018-01-26 21:39 ` Russell King - ARM Linux
2018-01-31 6:03 ` Inki Dae
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=20180126174145.6gtfjjoxb57d7qwt@armageddon.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=b.zolnierkie@samsung.com \
--cc=inki.dae@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=rmk+kernel@arm.linux.org.uk \
--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®