All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Assmann <sassmann@kpanic.de>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: linux-mm@kvack.org, tony.luck@intel.com, andi@firstfloor.org,
	mingo@elte.hu, hpa@zytor.com, rick@vanrein.org,
	akpm@linux-foundation.org, lwoodman@redhat.com, riel@redhat.com
Subject: Re: [RFC PATCH 3/3] Add documentation and credits for BadRAM
Date: Wed, 27 Apr 2011 22:05:30 +0200	[thread overview]
Message-ID: <4DB8770A.2080703@kpanic.de> (raw)
In-Reply-To: <20110427094953.57f01df1.rdunlap@xenotime.net>

On 27.04.2011 18:49, Randy Dunlap wrote:
> On Wed, 27 Apr 2011 18:16:47 +0200 Stefan Assmann wrote:
> 
>> Add Documentation/BadRAM.txt for in-depth information and update
>> Documentation/kernel-parameters.txt.
>>
>> Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
>> ---
>>  CREDITS                             |    9 +
>>  Documentation/BadRAM.txt            |  369 +++++++++++++++++++++++++++++++++++
>>  Documentation/kernel-parameters.txt |    5 +
>>  3 files changed, 383 insertions(+), 0 deletions(-)
>>  create mode 100644 Documentation/BadRAM.txt
> 
>> diff --git a/Documentation/BadRAM.txt b/Documentation/BadRAM.txt
>> new file mode 100644
>> index 0000000..67a7ccc
>> --- /dev/null
>> +++ b/Documentation/BadRAM.txt
>> @@ -0,0 +1,369 @@
> 

[snip]

Spelling errors will be fixed in next version. Thanks!

> I thought that /boot/grub/grub.conf was the current file name. (?)

Not sure about that, some distros use menu.lst others grub.conf for
GRUB. Also GRUB 2 uses /boot/grub/grub.cfg. Either of these would be
fine with me, /boot/grub/menu.lst sometimes is a symlink to
/boot/grub/grub.conf and I felt it's the most convenient one, but I have
no strong preference here.

> 
>> +
>> +When the kernel now boots, it should not give any trouble with RAM.
>> +Mind you, this is under the assumption that the kernel and its data
>> +storage do not overlap an erroneous part. If they do, and the
>> +kernel does not choke on it right away, BadRAM itself will stop the
>> +system with a kernel panic.  When the error is that low in memory,
>> +you will need additional bootloader magic, to load the kernel at an
>> +alternative address.
>> +
>> +Now look up your memory status with
>> +
>> +	cat /proc/meminfo |grep HardwareCorrupted
>> +
>> +which prints a single line with information like
>> +
>> +HardwareCorrupted:  2048 kB
>> +
>> +The entry HardwareCorrupted: 2048k represents the loss of 2MB
>> +of general purpose RAM due to the errors. Or, positively rephrased,
>> +instead of throwing out 32MB as useless, you only throw out 2MB.
>> +Note that 2048 kB equals 512 pages of 4kB.  The size of a page is
>> +defined by the processor architecture.
>> +
>> +If the system is stable (which you can test by compiling a few
>> +kernels, and a few file finds in / or so) you can decide to add
>> +the boot parameter to /boot/grub/menu.lst, in addition to any
> 
> file name?

See above comment.

> 
>> +other boot parameters that may already be there.  For example,
>> +
>> +	kernel /boot/vmlinuz root=/dev/sda1 ro
>> +
>> +would become
>> +
>> +	kernel /boot/vmlinuz root=/dev/sda1 ro badram=0x008042f4,0xff805fff
>> +
>> +Depending on how helpful your Linux distribution is, you may
>> +have to add this feature again after upgrading your kernel.  If
>> +your boot loader is GRUB, you can always do this manually if you
>> +rebooted before you remembered to make that adaption.
>> +
>> +
> ...
> 
> 
>> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
>> index f4a04c0..84f9ef5 100644
>> --- a/Documentation/kernel-parameters.txt
>> +++ b/Documentation/kernel-parameters.txt
>> @@ -373,6 +373,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
>>  
>>  	autotest	[IA64]
>>  
>> +	badram=		When CONFIG_MEMORY_FAILURE is set, this parameter
>> +			allows memory areas to be flagged as hwpoison.
> 
> hwpoison??  undefined.

BadRAM depends on hwpoison to be available. The code is located in
mm/memory-failure.c. That file is only compiled if CONFIG_MEMORY_FAILURE
is defined.
grep CONFIG_MEMORY_FAILURE mm/Makefile
obj-$(CONFIG_MEMORY_FAILURE) += memory-failure.o

So for your question, if hwpoison is not available BadRAM also won't be
available.

> 
>> +			Format: <addr>,<mask>[,...]
>> +			See Documentation/BadRAM.txt
>> +
> 
> 
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***

Thanks for the review Randy!

  Stefan

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2011-04-27 20:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 16:16 [RFC PATCH 0/3] support for broken memory modules (BadRAM) Stefan Assmann
2011-04-27 16:16 ` [RFC PATCH 1/3] Add string parsing function get_next_ulong Stefan Assmann
2011-04-27 16:28   ` Randy Dunlap
2011-04-27 16:16 ` [RFC PATCH 2/3] support for broken memory modules (BadRAM) Stefan Assmann
2011-04-27 21:12   ` Andi Kleen
2011-04-28  6:34     ` Stefan Assmann
2011-04-28 15:08       ` Andi Kleen
2011-04-28 15:51         ` Stefan Assmann
2011-04-28 17:44           ` Luck, Tony
2011-04-29  9:14           ` Stefan Assmann
2011-04-27 16:16 ` [RFC PATCH 3/3] Add documentation and credits for BadRAM Stefan Assmann
2011-04-27 16:49   ` Randy Dunlap
2011-04-27 20:05     ` Stefan Assmann [this message]

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=4DB8770A.2080703@kpanic.de \
    --to=sassmann@kpanic.de \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-mm@kvack.org \
    --cc=lwoodman@redhat.com \
    --cc=mingo@elte.hu \
    --cc=rdunlap@xenotime.net \
    --cc=rick@vanrein.org \
    --cc=riel@redhat.com \
    --cc=tony.luck@intel.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 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.