linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: Christoph Lameter <cl@linux.com>
Cc: linux-kernel@vger.kernel.org, linux-mm <linux-mm@kvack.org>
Subject: Re: how to tell if arbitrary kernel memory address is backed by physical memory?
Date: Fri, 17 Apr 2009 10:15:13 -0600	[thread overview]
Message-ID: <49E8AB11.4000708@nortel.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0904161654480.7855@qirst.com>

Christoph Lameter wrote:
> On Thu, 16 Apr 2009, Chris Friesen wrote:

>> Is there a portable way to tell whether a particular virtual address in the
>> lowmem address range is backed by physical memory and is readable?
>>
>> For background...we have some guys working on a software memory scrubber for
>> an embedded board.  The memory controller supports ECC but doesn't support
>> scrubbing  in hardware.  What we want to do is walk all of lowmem, reading in
>> memory.  If a fault is encountered, it will be handled by other code.
> 
> Virtual address in the lowmem address range? lowmem address ranges exist
> for physical addresses.
> 
> If you walk lowmem (physical) then you will never see a missing page.

We have a mips board that appears to have holes in the lowmem mappings 
such that blindly walking all of it causes problems.  I assume the 
allocator knows about these holes and simply doesn't assign memory at 
those addresses.

We may have found a solution though...it looks like virt_addr_valid() 
returns false for the problematic addresses.  Would it be reasonable to 
call this once for each page before trying to access it?

Chris

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2009-04-17 16:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 15:37 Chris Friesen
2009-04-16 20:58 ` Christoph Lameter
2009-04-17 16:15   ` Chris Friesen [this message]
2009-04-17 16:27     ` Christoph Lameter

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=49E8AB11.4000708@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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