LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* cache coherecy when working with cpu dcache write allocate
@ 2007-02-06 18:31 saeed bishara
  2007-02-06 20:55 ` Steven Newbury
  0 siblings, 1 reply; 2+ messages in thread
From: saeed bishara @ 2007-02-06 18:31 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel

Hi,
    I came across data corruption problem when using xfs, my system is
arm 926, the data cache is virtually tagged and virtually indexed and
with no hw cache coherency. my CPU features the data cache write
allocate-> when doing store, the cache line of the destination address
is loaded to data cache.
  when enabling the write allocate, I got data corruption with the
xfs. the scenario is that the xfs allocates large buffer (for reading
the log records) using vmalloc, and the low level driver (raid) copies
the data to the bio vectors using the linear address, since the write
allocate is enabled,  the correct data remains on the data cache with
the linear address tag, when the IO completes, the xfs access the data
with using the vmalloc virtual address, which is different than the
kernel linear address, thus it will get a stale data!.

how should I fix this problem? I thought that only the
copy/clean_user_pages() functions should be aware to the write
allocate.

saeed

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: cache coherecy when working with cpu dcache write allocate
  2007-02-06 18:31 cache coherecy when working with cpu dcache write allocate saeed bishara
@ 2007-02-06 20:55 ` Steven Newbury
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Newbury @ 2007-02-06 20:55 UTC (permalink / raw)
  To: saeed bishara, linux-kernel, linux-arm-kernel


--- saeed bishara <saeed.bishara@gmail.com> wrote:

> Hi,
>     I came across data corruption problem when using xfs, my system is
> arm 926, the data cache is virtually tagged and virtually indexed and
> with no hw cache coherency. my CPU features the data cache write
> allocate-> when doing store, the cache line of the destination address
> is loaded to data cache.
>   when enabling the write allocate, I got data corruption with the
> xfs. the scenario is that the xfs allocates large buffer (for reading
> the log records) using vmalloc, and the low level driver (raid) copies
> the data to the bio vectors using the linear address, since the write
> allocate is enabled,  the correct data remains on the data cache with
> the linear address tag, when the IO completes, the xfs access the data
> with using the vmalloc virtual address, which is different than the
> kernel linear address, thus it will get a stale data!.
> 
> how should I fix this problem? I thought that only the
> copy/clean_user_pages() functions should be aware to the write
> allocate.
I wonder if I'm seeing this with reiser4 on pxa27x as well???

Steve


		
___________________________________________________________ 
Now you can have your favourite RSS headlines come to you with the all new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-06 21:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-06 18:31 cache coherecy when working with cpu dcache write allocate saeed bishara
2007-02-06 20:55 ` Steven Newbury

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).