All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Rik van Riel <riel@redhat.com>
Cc: rwhitton@iee.org, linux-kernel@vger.kernel.org
Subject: Re: Background memory scrubbing
Date: Sun, 24 Apr 2011 22:47:25 +0200	[thread overview]
Message-ID: <20110424204447.GA2467@ucw.cz> (raw)
In-Reply-To: <4DAF1DA7.9040705@redhat.com>

Hi!

> >>>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.
> 
> I can think of only a few ways in which that could cause a
> kernel page fault.
> 
> One of the more obvious causes would be running into an
> area of kernel memory that is mapped read-only.  Writing
> to a page that is mapped read-only would cause a page
> fault :)

...also... you are actually making kernel use "self modifying code"
here. There  are CPU bugs in that area...  for example on K6.
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2011-04-25 11:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 17:05 Background memory scrubbing Robert Whitton
2011-04-20 17:53 ` Rik van Riel
2011-04-24 20:47   ` Pavel Machek [this message]
  -- 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-20 16:01   ` Borislav Petkov
2011-04-25 16:53   ` Chris Friesen
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=20110424204447.GA2467@ucw.cz \
    --to=pavel@ucw.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@redhat.com \
    --cc=rwhitton@iee.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 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.