From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC/PATCH 1/1] ARM: Handle user space mapped pages in flush_kernel_dcache_page
Date: Mon, 28 May 2012 14:21:00 +0800 [thread overview]
Message-ID: <20120528062057.GA10380@mbp> (raw)
In-Reply-To: <20120528053559.GA25047@schnuecks.de>
On Mon, May 28, 2012 at 06:35:59AM +0100, Simon Baatz wrote:
> On Mon, May 28, 2012 at 12:32:44PM +0800, Catalin Marinas wrote:
> > On Mon, May 28, 2012 at 12:11:58AM +0100, Simon Baatz wrote:
> > ...
> > > +void __flush_kernel_dcache_page(struct page *page)
> > > +{
> > > + struct address_space *mapping;
> > > +
> > > + mapping = page_mapping(page);
> > > +
> > > + if (!mapping || mapping_mapped(mapping))
> > > + __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE);
> > > +}
> > > +EXPORT_SYMBOL(__flush_kernel_dcache_page);
> >
> > I wonder whether the above condition isn't always true after
> > get_user_pages().
>
> Not sure about corner cases, but I would assume that yes, this is the
> case. However, the block layer sees the pages from get_user_pages()
> directly only in the O_DIRECT case. Usually (read fault for page
> cache), flush_kernel_dcache_page() gets pages with mapping != NULL
> and mapping_mapped() == NULL (i.e. no user space mapping (yet)).
And we can probably assume that this is only for new pages with the
PG_dcache_clean bit already cleared (i.e. no need to set it again in
flush_kernel_dcache_page for the lazy case).
--
Catalin
next prev parent reply other threads:[~2012-05-28 6:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-27 23:11 [RFC/PATCH 0/1] ARM: Handle user space mapped pages in flush_kernel_dcache_page Simon Baatz
2012-05-27 23:11 ` [RFC/PATCH 1/1] " Simon Baatz
2012-05-28 4:32 ` Catalin Marinas
2012-05-28 5:35 ` Simon Baatz
2012-05-28 6:21 ` Catalin Marinas [this message]
2012-05-28 7:59 ` Simon Baatz
2012-06-17 19:13 ` [RFC/PATCH 0/1] " Simon Baatz
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=20120528062057.GA10380@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;
as well as URLs for NNTP newsgroup(s).