All of lore.kernel.org
 help / color / mirror / Atom feed
* Testing RAM from userspace / question about memmap= arguments
@ 2007-12-18 17:06 Matthew Bloch
  2007-12-20 12:33 ` Jon Masters
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Matthew Bloch @ 2007-12-18 17:06 UTC (permalink / raw)
  To: linux-kernel

Hi - I'm trying to come up with a way of thoroughly testing every byte
of RAM from within Linux on amd64 (so that it can be automated better
than using memtest86+), and came up with an idea which I'm not sure is
supported or practical.

The obvious problem with testing memory from user space is that you
can't mlock all of it, so the best you can do is about three quarters,
and hope that the rest of the memory is okay.

In order to test all of the memory, I'd like to run the user-space
memtester over two boots of the kernel.

Say we have a 1024MB machine, the first boot I'd not specify any
arguments and assume the kernel would start at the bottom of physical
memory and work its way up, so that the kernel & working userspace would
live at the bottom, and the rest would be testable from space.

On the second boot, could I then specify:

memmap=exact memmap=512M@512M memmap=512M@0

i.e. such that the kernel's idea of the usable memory started in the
middle of physical RAM, and that's where it would locate itself?  That
way, on the second boot, the same test in userspace would definitely
grab the previously inaccessible RAM at the start for testing.

I can see a few potential problems, but since my understanding of the
low-level memory mapping is muddy at best, I won't speculate; I'd just
appreciate any more expert views on whether this does work, or could be
made to work.

Thanks,

-- 
Matthew


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Testing RAM from userspace / question about memmap= arguments
@ 2007-12-20 17:01 Siva Prasad
  0 siblings, 0 replies; 20+ messages in thread
From: Siva Prasad @ 2007-12-20 17:01 UTC (permalink / raw)
  To: matthew; +Cc: linux-kernel

Hi Matthew,

I worked on some thing similar. For one of our customer product that 
goes to defense and security markets, we had to support maximum possible 
memory test. We implemented a mechanism of pre-test to test the memory 
with walking 1's and 0's just before Linux kernel starts allocating 
serious memory for its use. That way, coverage was almost 99%. Once 
Linux boots, we do a very through test using various algorithms, however 
as you said coverage of memory is little less when we test the system 
after Linux boots up completely.

memtest86+ started as a very good alternative, until customer's customer 
started complaining about memory issues. Then we had no choice but to 
take this route and implement it ourselves from the scratch.

If you want 100% coverage, it may not be possible unless you do it in 
BIOS early on. If you take the route of implementing some simple memory 
test in Linux kernel before it starts allocating memory, you get very 
good % of coverage. Good Luck.

- Siva


Date: Thu, 20 Dec 2007 14:17:10 +0000

From: Matthew Bloch <matthew@bytemark.co.uk>

Subject: Re: Testing RAM from userspace / question about memmap=

      arguments

To: linux-kernel@vger.kernel.org

Message-ID: <fkdth6$d7g$1@ger.gmane.org>

Content-Type: text/plain; charset=ISO-8859-1

 

Jon Masters wrote:

 > On Tue, 2007-12-18 at 17:06 +0000, Matthew Bloch wrote:

 >

 >> I can see a few potential problems, but since my understanding of the

 >> low-level memory mapping is muddy at best, I won't speculate; I'd just

 >> appreciate any more expert views on whether this does work, or could be

 >> made to work.

 >

 > Yo,

 >

 > I don't think your testing approach is thorough enough. Clearly (knowing

 > your line of business - as a virtual machine provider), you want to do

 > pre-production testing as part of your provisioning. I would suggest

 > instead of using mlock() from userspace of simply writing a kernel

 > module that does this for every page of available memory.

 

Yes this is to improve the efficiency of server burn-ins.  I would

consider a kernel module, but I still wouldn't be able to test the

memory in which the kernel is sitting, which is my problem.  I'm not

sure even a kernel module could reliably test the memory in which it is

residing (memtest86+ relocates itself to do this).  Also I don't see how

  userspace testing is any less thorough than doing it in the kernel; I

just need a creative way of accessing every single page of memory.

 

I may do some experiments with the memmap args, some bad RAM and

shuffling it between DIMM sockets when I have the time :)

 

-- 

Matthew

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

end of thread, other threads:[~2007-12-26 20:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-18 17:06 Testing RAM from userspace / question about memmap= arguments Matthew Bloch
2007-12-20 12:33 ` Jon Masters
2007-12-20 14:17   ` Matthew Bloch
2007-12-21 12:58 ` Pavel Machek
2007-12-22  8:12   ` Richard D
2007-12-22 13:46     ` Pavel Machek
2007-12-22 15:30       ` Richard D
2007-12-22 18:43         ` Pavel Machek
2007-12-22 16:06       ` David Newall
2007-12-22 18:47         ` Pavel Machek
2007-12-22 20:36           ` David Newall
2007-12-22 20:54             ` Pavel Machek
2007-12-23  7:35               ` David Newall
2007-12-23 11:17                 ` Pavel Machek
2007-12-22 20:48         ` Matthew Bloch
2007-12-22 20:09 ` Arjan van de Ven
2007-12-25 23:09   ` Pavel Machek
2007-12-26 10:17     ` Arjan van de Ven
2007-12-26 20:37       ` Maxim Levitsky
  -- strict thread matches above, loose matches on Subject: below --
2007-12-20 17:01 Siva Prasad

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.