From: Russell King <rmk@arm.linux.org.uk>
To: Andrew Morton <akpm@digeo.com>
Cc: Lothar Wassmann <LW@KARO-electronics.de>, linux-kernel@vger.kernel.org
Subject: Re: [patch] cache flush bug in mm/filemap.c (all kernels >= 2.5.30(at least))
Date: Fri, 23 May 2003 17:54:13 +0100 [thread overview]
Message-ID: <20030523175413.A4584@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20030523034551.0f80b17f.akpm@digeo.com>; from akpm@digeo.com on Fri, May 23, 2003 at 03:45:51AM -0700
On Fri, May 23, 2003 at 03:45:51AM -0700, Andrew Morton wrote:
> Given that there was no page at the virtual address before filemap_nopage
> was called I don't think any CPU cache writeback or invalidation need be
> performed. Perhaps a writeback or invalidate is missing somewhere in the
> unmap paths, or there is a problem in arch/arm somewhere.
No, I think there is a flush missing somewhere in this path.
What I think is happening is that Lothar is using the PXA with the cache
in write allocate write back mode (Xscale is the first ARM-arch cpu to
have allocate on write caches.)
This means that when IDE copies the data into the buffer using insw or
whatever, it ends up in the VIVT cache rather than memory. Since we
don't seem to be calling flush_dcache_page(), we never write this data
back to memory for user space to access it via their mapping.
If this is the case, its something I can't test, because I don't have
access to such hardware (I'm currently being kept a hardware pauper
as far as new ARM technologies go.)
> We have a no-op flush_icache_page() in do_no_page(), but I don't know what
> that thing ever did, not what it's doing in there. (What happens if you
> replace it with a flush_cache_page(vma, address)?)
I don't think this'll help - its asking the wrong bit of cache to be
flushed. I think we want to replace that flush_icache_page() with
a flush_dcache_page(), but shrug, I don't really know this code well
enough.
> Someone who understands these things better than I is going to have
> to work out where the bug really is, I'm afraid.
I suspect that there's very few people who really understand this area -
you need to know what the block drivers are doing, and everything in
between there and user space.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2003-05-23 16:41 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-22 12:34 [patch] cache flush bug in mm/filemap.c (all kernels >= 2.5.30(at least)) LW
2003-05-22 14:03 ` Russell King
2003-05-22 14:11 ` Russell King
2003-05-23 8:02 ` David S. Miller
2003-05-23 9:12 ` Andrew Morton
2003-05-23 9:49 ` David S. Miller
2003-05-23 10:04 ` Andrew Morton
2003-05-23 10:15 ` David S. Miller
2003-05-23 8:20 ` Lothar Wassmann
2003-05-23 9:24 ` Andrew Morton
2003-05-23 10:04 ` Lothar Wassmann
2003-05-23 10:45 ` Andrew Morton
2003-05-23 11:22 ` Paul Mackerras
2003-05-23 16:54 ` Russell King [this message]
2003-05-23 17:31 ` Hugh Dickins
2003-05-23 18:29 ` Andrew Morton
2003-05-23 18:34 ` Russell King
2003-05-26 3:19 ` David S. Miller
2003-05-26 5:07 ` Mika Penttilä
2003-05-26 5:08 ` David S. Miller
2003-05-26 5:36 ` Mika Penttilä
2003-05-26 5:36 ` David S. Miller
2003-05-26 13:18 ` Roman Zippel
2003-05-26 22:34 ` David S. Miller
2003-05-27 10:53 ` Roman Zippel
2003-05-27 21:22 ` David S. Miller
2003-05-28 16:35 ` Roman Zippel
2003-05-28 22:47 ` David S. Miller
2003-05-29 0:12 ` Roman Zippel
2003-05-29 1:37 ` David S. Miller
2003-05-29 7:13 ` Russell King
2003-05-29 7:15 ` David S. Miller
2003-05-29 17:49 ` Roman Zippel
2003-05-29 21:09 ` David S. Miller
2003-05-26 8:55 ` Russell King
2003-05-26 13:08 ` Lothar Wassmann
2003-05-26 22:19 ` Russell King
2003-05-26 13:25 ` Jens Axboe
2003-05-26 22:35 ` David S. Miller
2003-05-26 3:20 ` David S. Miller
2003-05-23 11:13 ` Russell King
2003-05-23 12:46 ` Lothar Wassmann
2003-05-23 15:42 ` Hugh Dickins
2003-05-25 17:10 ` David Woodhouse
2003-05-26 11:44 ` Lothar Wassmann
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=20030523175413.A4584@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=LW@KARO-electronics.de \
--cc=akpm@digeo.com \
--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