lkml.org 
[lkml]   [2002]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Cache coherency and snooping
On Tue, Aug 13, 2002 at 06:00:43PM -0700, Imran Badr wrote:

> Please advise if following sequence of operations are going to help:
>
> alloc memory
> reserve the page
> flush every cache

That's an extremly expensive operation on some platforms and there's no
portable kernel API to do it.

Note that the flush_cache_*() functions are not suitable for I/O as you
want to do it. Many platforms such as i386 implement these functions
as empty functions.

> call ioremap_nocache

You said you intend to remap memory, that is RAM. The ioremap*() functions
will refuse to remap RAM; they're only suitable for other types of memory
such as PCI boards. If the latter was your intension then ioremap_nocache()
will work as intended.

Again, unless your hardware is fucked beyond recognition it'll do a better
job at keeping cache coherence than software.

Ralf
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.050 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site