public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Whitton <rwhitton@iee.org>
To: "Rik van Riel" <riel@redhat.com>, <rwhitton@iee.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: Background memory scrubbing
Date: Wed, 20 Apr 2011 18:05:02 +0100	[thread overview]
Message-ID: <20131.1303319102@jupiter.eclipse.co.uk> (raw)


On Wed 20/04/11  6:45 PM , Rik van Riel <riel@redhat.com> wrote:

> On 04/20/2011 03:58 AM, Robert Whitton wrote:
> 
> > for each PFN from 256 to the highest valid PFN
> > {
> > if (pfn_valid(PFN))
> > {
> > page = pfn_to_page(PFN)
> > va = kmap(page)
> > atomic_scrub(va, PAGE_SIZE)
> > kunmap(page)
> > }
> >
> > sleep(for_a_while)
> > }
> 
> What exactly does atomic_scrub do?

atomic_scrub is part of the edac subsystem see arch/x86/include/asm/edac.h. It simply does a locked add of zero to each DWORD in the specified range.

(a shame that for 64 bit platforms it doesn't use QWORDS but that's just an optimisation)

> 
> > This code works absolutely fine up to a short distance beyond the 16MB
> boundary (specifically it seems to always fail on my hardware at PFN
> 4105). At this point despite the fact that kmap returns a valid virtual
> address (and it is the virtual address that I expect - 0xffff880001009000)
> I get the kernel oops - "unable to handle kernel paging request".
> 
> Looks like you might be making some of the kernel code that
> is running at that moment unreachable, leading to a kernel
> page fault.
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email [1] 
> ______________________________________________________________________
> 
> 
> 
> Links:
> ------
> [1]
> http://webmail.eclipse.net.uk/parse.php?redirect=http://www.messagelabs.com
> /email
> 

             reply	other threads:[~2011-04-20 17:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 17:05 Robert Whitton [this message]
2011-04-20 17:53 ` Background memory scrubbing Rik van Riel
2011-04-24 20:47   ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2011-04-20 15:46 Robert Whitton
2011-04-20 16:01 ` Borislav Petkov
2011-04-25 16:53   ` Chris Friesen
2011-04-20 14:40 Robert Whitton
2011-04-20 15:19 ` Clemens Ladisch
2011-04-20 15:35   ` Borislav Petkov
2011-04-20 15:46     ` Markus Trippelsdorf
2011-04-20 15:58       ` Borislav Petkov
2011-04-20 16:45         ` Markus Trippelsdorf
2011-04-20 16:55           ` Markus Trippelsdorf
2011-04-20 17:36             ` Borislav Petkov
2011-04-20 19:23   ` Bill Gatliff
2011-04-20  7:58 Robert Whitton
2011-04-20 13:30 ` Clemens Ladisch
2011-04-20 16:45 ` Rik van Riel

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=20131.1303319102@jupiter.eclipse.co.uk \
    --to=rwhitton@iee.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@redhat.com \
    /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