From: Tejun Heo <htejun@gmail.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
James Steward <james.steward@dynamicratings.com>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: [PATCH] ide: add dcache flushing after PIO
Date: Wed, 21 Dec 2005 23:43:09 +0900 [thread overview]
Message-ID: <43A969FD.3090106@gmail.com> (raw)
In-Reply-To: <20051221140344.GA1736@flint.arm.linux.org.uk>
Russell King wrote:
> On Wed, Dec 21, 2005 at 11:00:22PM +0900, Tejun Heo wrote:
>
>>Block drivers are responsible for cache coherency before and after IO.
>>When using DMA, DMA API takes care of it but drivers should do manual
>>flushing with PIO.
>
>
> Are you sure you need the ones in the write path? No other driver
> seems to do this.
>
Unfortunately, I'm not. I was trying to be on the safe side.
Are the page caches guaranteed to have no dirty alias on entry to block
layer for write? I can see that aliases are handled for read(2)s and
write(2)s but I don't know much about mmap writebacks.
Another question is whether or not it's guaranteed that there's no
user-mapped dirty cachelines on entry to block layer for read. DMA API
clears all cpu caches before IO and, as DMA IO doesn't touch any cpu
caches, it doesn't do anything after IO. The previous patch adds a
flush_dcache_page after IO which makes sure that the kernel cache line
is gone, but it doesn't do anything to make sure that there's no dirty
user-mapped cachelines hanging around before IO.
I couldn't find an exemplary driver doing this kind of things with page
caches. Most other flush_dcache_page usages I looked at didn't deal
with user mapped page caches.
--
tejun
next prev parent reply other threads:[~2005-12-21 14:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-19 0:47 Execute from CF causes segmentation faults James Steward
2005-12-20 12:52 ` Tejun Heo
2005-12-20 16:23 ` Bartlomiej Zolnierkiewicz
2005-12-21 9:48 ` Tejun Heo
2005-12-21 14:00 ` [PATCH] ide: add dcache flushing after PIO Tejun Heo
2005-12-21 14:03 ` Russell King
2005-12-21 14:43 ` Tejun Heo [this message]
2005-12-21 15:57 ` Bartlomiej Zolnierkiewicz
2005-12-21 16:00 ` Tejun Heo
2005-12-21 17:54 ` Russell King
2006-01-07 17:06 ` Russell King
2006-01-07 20:17 ` Bartlomiej Zolnierkiewicz
2006-01-07 21:22 ` Russell King
2006-01-07 22:41 ` Bartlomiej Zolnierkiewicz
2006-01-08 0:50 ` james
2006-01-09 9:08 ` Russell King
2006-01-09 9:16 ` Tejun Heo
2005-12-21 15:01 ` Execute from CF causes segmentation faults Russell King
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=43A969FD.3090106@gmail.com \
--to=htejun@gmail.com \
--cc=bzolnier@gmail.com \
--cc=james.steward@dynamicratings.com \
--cc=linux-ide@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
/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).