From: "Matt Reimer" <mattjreimer@gmail.com>
To: "David Miller" <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: D-cache aliasing issue in cow_user_page
Date: Wed, 6 Dec 2006 13:19:41 -0800 [thread overview]
Message-ID: <f383264b0612061319k16809e35tb04d04fa16f976b1@mail.gmail.com> (raw)
In-Reply-To: <20061205.165948.98864221.davem@davemloft.net>
On 12/5/06, David Miller <davem@davemloft.net> wrote:
> From: "Matt Reimer" <mattjreimer@gmail.com>
> Date: Tue, 5 Dec 2006 16:57:12 -0800
>
> > Right, but isn't he declaring that each architecture needs to take
> > care of this? So, say, on ARM we'd need to make kunmap() not a NOP and
> > call flush_dcache_page() ?
>
> No. He is only solving a problem that occurs on HIGHMEM
> configurations on systems which can have D-cache aliasing
> issues.
Are you sure? James specifically mentions "non-highmem architectures,"
and "all architectures with coherence issues," which would seem to
include ARM (which is my concern).
For your convenience I quote the whole commit message below.
Matt
[PATCH] update to the kernel kmap/kunmap API
Give non-highmem architectures access to the kmap API for the purposes of
overriding (this is what the attached patch does).
The proposal is that we should now require all architectures with coherence
issues to manage data coherence via the kmap/kunmap API. Thus driver
writers never have to write code like
kmap(page)
modify data in page
flush_kernel_dcache_page(page)
kunmap(page)
instead, kmap/kunmap will manage the coherence and driver (and filesystem)
writers don't need to worry about how to flush between kmap and kunmap.
For most architectures, the page only needs to be flushed if it was
actually written to *and* there are user mappings of it, so the best
implementation looks to be: clear the page dirty pte bit in the kernel page
tables on kmap and on kunmap, check page->mappings for user maps, and then
the dirty bit, and only flush if it both has user mappings and is dirty.
next prev parent reply other threads:[~2006-12-06 21:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-05 7:38 Matt Reimer
2006-12-05 21:24 ` David Miller
2006-12-06 0:57 ` Matt Reimer
2006-12-06 0:59 ` David Miller
2006-12-06 7:04 ` Matt Reimer
2006-12-06 21:19 ` Matt Reimer [this message]
2006-12-07 0:46 ` David Miller
2006-12-07 6:20 ` Matt Reimer
2006-12-07 7:22 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2006-10-17 9:15 [PATCH] mm:D-cache " Dmitriy Monakhov
2006-10-19 6:33 ` Andrew Morton
2006-10-19 7:00 ` David Miller
2006-10-19 7:17 ` Andrew Morton
2006-10-19 7:22 ` David Miller
2006-10-19 7:41 ` Andrew Morton
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=f383264b0612061319k16809e35tb04d04fa16f976b1@mail.gmail.com \
--to=mattjreimer@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®