lkml.org 
[lkml]   [1999]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Perform minimal RAM test at boot
Anton Ivanov wrote:
> > Adding a single `wbinvd' instruction at the right place is a simple
> > instruction that would actually work *according to the official docs* :-)
>
> But it is likely to slow down boot quite a bit. So if real cache invalidation
> is involved I would suggest that this be a boot parameter. You do not really
> need to do this unless you install, add hardware or are supsicious that bad
> things are happening.

I was making the point that Richard's code, though it works on many
processors, will not work on all.

The efficient way to do this kind of test involves turning off caching
data accesses for the test, but keep the cache on for the code.
PAGE_PCD can be used, and there are other mechanisms (though perhaps
less portable).

This may actually be faster than not disabling the data cache: it
prevents the memory accesses from doing a write-allocate line fill.

Total time is small. Assume ~100ns per uncached memory read (that's
pessimistic for most systems), and assume write time is relatively fast.
Multiply by 131,072 for a 128MB machine with tests at a 1k stride.

Total time: 13.1 milliseconds. No big deal.

enjoy,
-- Jamie

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

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