From: Tim Small <tim@buttersideup.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Doug Thompson <norsk5@yahoo.com>,
ncunningham-lkml@crca.org.au, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Chris Friesen <cfriesen@nortel.com>,
Pavel Machek <pavel@suse.cz>,
bluesmoke-devel@lists.sourceforge.net,
Arjan van de Ven <arjan@infradead.org>
Subject: Re: marching through all physical memory in software
Date: Sat, 31 Jan 2009 12:48:28 +0000 [thread overview]
Message-ID: <4984489C.8020309@buttersideup.com> (raw)
In-Reply-To: <m1iqnw1676.fsf@fess.ebiederm.org>
Eric W. Biederman wrote:
> At the point we are talking about software scrubbing it makes sense to assume
> a least common denominator memory controller, one that does not do automatic
> write-back of the corrected value, as all of the recent memory controllers
> do scrubbing in hardware.
>
I was just trying to clarify the distinction between the two processes
which have similar names, but aren't (IMO) actually that similar:
"Software Scrubbing"
Triggering a read, and subsequent rewrite of a particular RAM location
which has suffered a correctable ECC error(s) i.e. hardware detects an
error, then the OS takes care of the rewrite to "scrub" the error in the
case that the hardware doesn't handle this automatically.
This should be a very-occasional error-path process, and performance is
probably not critical..
"Background Scrubbing"
. This is a poor name, IMO (scrub infers some kind of write to me),
which applies to a process whereby you ensure that the ECC check-bits
are verified periodically for the whole of physical RAM, so that single
bit errors in a given ECC block don't accumulate and turn into
uncorrectable errors. It may also lead to improved data collection for
some failure modes. Again, many memory controllers implement this
feature in hardware, so we shouldn't do it twice where this is supported.
There is (AFAIK) no need to do any writes here, and in fact doing so is
only likely to hurt performance, I think.... The design which springs
to mind is of a background thread which (possibly at idle priority)
reads RAM at a user-configurable rate (e.g. consume a max of n% of
memory bandwidth, or read all of RAM at least once every x minutes).
Possible design issues:
. There will be some trade off between reducing impact on the system as
a whole, and making firm guarantees about how often memory is checked.
Difficult to know what the default would be, but probably
no-firm-guarantee of minimum time (idle processing only) is likely to
cause least problems for most users.
. An eye will need to be kept on the impact that this reading has on the
performance of the rest of the system (e.g. cache pollution, and NUMA,
as you previously mentioned), but my gut feeling is that for the
majority of systems it shouldn't be significant. If practical
mechanisms are available on some CPUs to read RAM without populating the
CPU cache, we should use those (but I've no idea if they exist or not).
Perhaps a good default would be to benchmark memory read bandwidth when
the feature is turned on, and then operate at (e.g.) 0.5% of that bandwidth.
Cheers,
Tim.
--
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>
next prev parent reply other threads:[~2009-01-31 12:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <715599.77204.qm@web50111.mail.re2.yahoo.com>
2009-01-30 19:32 ` Eric W. Biederman
2009-01-30 20:20 ` Tim Small
2009-01-31 3:54 ` Eric W. Biederman
2009-01-31 12:48 ` Tim Small [this message]
2009-01-31 13:43 ` Henrique de Moraes Holschuh
2009-01-31 21:27 ` Pavel Machek
2009-02-01 1:25 ` Henrique de Moraes Holschuh
2009-01-30 21:10 ` Nigel Cunningham
2009-02-02 18:29 ` Chris Friesen
2009-02-02 22:45 ` Valdis.Kletnieks
2009-02-03 14:31 ` Chris Friesen
2009-02-03 22:25 ` Pavel Machek
2009-02-04 16:03 ` Chris Friesen
2009-02-04 16:47 ` Dave Jiang
[not found] <497DD8E5.1040305@nortel.com>
[not found] ` <20090126075957.69b64a2e@infradead.org>
[not found] ` <497F5289.404@nortel.com>
2009-01-27 20:16 ` Eric W. Biederman
2009-01-28 19:38 ` Pavel Machek
2009-01-30 9:05 ` Nigel Cunningham
2009-01-30 9:13 ` Pavel Machek
2009-01-30 13:00 ` Nigel Cunningham
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=4984489C.8020309@buttersideup.com \
--to=tim@buttersideup.com \
--cc=arjan@infradead.org \
--cc=bluesmoke-devel@lists.sourceforge.net \
--cc=cfriesen@nortel.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ncunningham-lkml@crca.org.au \
--cc=norsk5@yahoo.com \
--cc=pavel@suse.cz \
/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