| View previous topic :: View next topic |
| Author |
Message |
masterdriverz Retired Dev

Joined: 28 Mar 2006 Posts: 391 Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the galaxy
|
Posted: Wed Oct 11, 2006 10:51 am Post subject: BadRAM - patch and badram-sources |
|
|
I'm preparing to submit BadRAM for inclusion into -mm, but before I do I would like to do some more testing on it. If you want to try it out, you can either patch the latest -mm (2.6.19_rc1-mm1) with this patch, or use my ebuild for badram-sources.
| http://rick.vanrein.org/linux/badram/ wrote: |
Objective
My objective is to patch the Linux kernel in such a way that it can handle defective RAM modules. With defective RAM, I mean RAM which has some bits wrong at some (known) addresses. Normally, such RAM is considered useless and thrown away; the larger RAMs get, the higher the chances of failing addresses. With ever growing RAM sizes, it would therefore be pleasant to have an alternative to discarding of defective RAM chips.
How to do it?
The technology behind this idea relies on the memory allocation approach inside the Linux kernel, as well as the memory swapping mechanisms. The kernel distinguishes kernel allocated memory from user allocated memory, by never swapping kernel memory out of RAM. Furthermore, it is possible (as needed for some hardware boards) to allocate fixed phycical address to a kernel process. I want to exploit this to allocate precisely the defective parts of RAM before they are made available to anyone else. By allocating them for the kernel, and never freeing them, the RAM at that part of memory is effectively disabled. Furthermore, this need not be done a memory page at a time, since the kernel allocates blocks of 4, 8, 16, 32, ... bytes each to itself, making it possible to enclose a defective address quite closely. A memory module with one bit wrong would perhaps miss 4 bytes out of 128 MB. Would it not be a waste to throw away such a RAM module? |
BadRAM is automatically enabled under Processor type and features -> Work around bad spots in RAM (or CONFIG_BADRAM)
To test BadRAM capabilities, add the following snippet to end of your boot line
| Code: | | badram=0x008042f4,0xff805fff |
E.g.
| Code: | | kernel (hd1,0)/boot/vmlinuz video=intelfb:1024x768-32@85,hwcursor=0 vga=792 splash=silent,theme:emergence fbcon=sbcon=scrollback:128K CONSOLE=/dev/tty1 root=/dev/sda3 resume2=swap:/dev/sdb3 badram=0x008042f4,0xff805fff |
Then, on reboot, you should see this
| Code: | chaza@Mars ~ $ sudo grep -i badram /var/log/messages
Password:
Oct 11 17:27:21 Mars Memory: 381196k/391632k available (2522k kernel code, 7284k reserved, 826k data, 172k init, 0k highmem, 2048k BadRAM) |
More information can be found in Documentation/badram.txt, or http://rick.vanrein.org/linux/badram/
Feedback welcome! _________________ Solutions to misc kde problems
Last edited by masterdriverz on Sun Oct 15, 2006 6:18 am; edited 3 times in total |
|
| Back to top |
|
 |
rmh3093 Veteran


Joined: 06 Aug 2003 Posts: 2113 Location: Rochester/Buffalo, NY
|
Posted: Wed Oct 11, 2006 3:10 pm Post subject: |
|
|
you need to fix your ebuild
| Code: | * checking badram-2.6.19-rc1-badram1.patch.bz2 ;-) ... [ ok ]
>>> Preparing to unpack ...
>>> Unpacking source...
>>> Unpacking linux-2.6.18.tar.bz2 to /var/tmp/portage/badram-sources-2.6.19_rc1-r1/work
* FATAL: unable to locate:
* /var/tmp/portage/badram-sources-2.6.19_rc1-r1/distdir/2.6.19-rc1-badram1.bz2
* for read-only. The file either has incorrect permissions
* or does not exist.
!!! ERROR: sys-kernel/badram-sources-2.6.19_rc1-r1 failed.
Call stack:
ebuild.sh, line 1546: Called dyn_unpack
ebuild.sh, line 708: Called src_unpack
ebuild.sh, line 1255: Called kernel-2_src_unpack
kernel-2.eclass, line 994: Called unipatch '/var/tmp/portage/badram-sources-2.6.19_rc1-r1/distdir/patch-2.6.19-rc1.bz2 /var/tmp/portage/badram-sources-2.6.19_rc1-r1/distdir/2.6.19-rc1-badram1.bz2 /var/tmp/portage/badram-sources-2.6.19_rc1-r1/distdir/badram-2.6.19-rc1-badram1.patch.bz2'
kernel-2.eclass, line 766: Called die
!!! Unable to locate /var/tmp/portage/badram-sources-2.6.19_rc1-r1/distdir/2.6.19-rc1-badram1.bz2
!!! If you need support, post the topmost build error, and the call stack if relevant.
|
_________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
| Back to top |
|
 |
seren Guru


Joined: 27 Aug 2005 Posts: 443 Location: Wisconsin
|
Posted: Thu Oct 12, 2006 3:35 pm Post subject: |
|
|
| Does this work? |
|
| Back to top |
|
 |
masterdriverz Retired Dev

Joined: 28 Mar 2006 Posts: 391 Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the galaxy
|
Posted: Thu Oct 12, 2006 3:39 pm Post subject: |
|
|
| seren wrote: | | Does this work? |
The patch does, but I'm still having some issues with the ebuild I'm hoping to have it working by the weekend, as my freetime is severly impacted by coursework during the week. _________________ Solutions to misc kde problems |
|
| Back to top |
|
 |
zietbukuel Guru


Joined: 30 Dec 2005 Posts: 579 Location: /dev/peru/lima
|
Posted: Sat Oct 14, 2006 3:23 am Post subject: |
|
|
What is the purpose of this patchset? There's nothing about it... _________________ AMD Phenom X4 9850 Black Edition
4GB OCZ Nvidia SLI-ready Memory DDR2
ASUS M3N-HD/HDMI
320GB HDD
Nvidia 8600GT 512MB Ram DDR2 |
|
| Back to top |
|
 |
masterdriverz Retired Dev

Joined: 28 Mar 2006 Posts: 391 Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the galaxy
|
Posted: Sat Oct 14, 2006 3:32 am Post subject: |
|
|
http://rick.vanrein.org/linux/badram/
Sorry, I've been so caught up in preparation for submitting it to -mm (this is my first kernel submission, and its not even mine) and real life, I didn't notice I didn't put any info about the patch at the top.  _________________ Solutions to misc kde problems |
|
| Back to top |
|
 |
zietbukuel Guru


Joined: 30 Dec 2005 Posts: 579 Location: /dev/peru/lima
|
Posted: Sat Oct 14, 2006 10:06 am Post subject: |
|
|
| masterdriverz wrote: | http://rick.vanrein.org/linux/badram/
Sorry, I've been so caught up in preparation for submitting it to -mm (this is my first kernel submission, and its not even mine) and real life, I didn't notice I didn't put any info about the patch at the top.  |
Seems very interesting... good job. _________________ AMD Phenom X4 9850 Black Edition
4GB OCZ Nvidia SLI-ready Memory DDR2
ASUS M3N-HD/HDMI
320GB HDD
Nvidia 8600GT 512MB Ram DDR2 |
|
| Back to top |
|
 |
masterdriverz Retired Dev

Joined: 28 Mar 2006 Posts: 391 Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the galaxy
|
Posted: Sat Oct 14, 2006 10:11 am Post subject: |
|
|
| zietbukuel wrote: | Seems very interesting... good job. |
Thanks. Have you got it working? _________________ Solutions to misc kde problems |
|
| Back to top |
|
 |
padoor Veteran


Joined: 29 Dec 2005 Posts: 2768 Location: india
|
Posted: Sat Oct 14, 2006 10:29 am Post subject: |
|
|
how do we determin bad block of mem? how this badram patch finds it?
we have to specify the bad blocks ? _________________ reach out a little bit more to catch it (DON'T BELIEVE the veteran part under my user name) |
|
| Back to top |
|
 |
zietbukuel Guru


Joined: 30 Dec 2005 Posts: 579 Location: /dev/peru/lima
|
Posted: Sat Oct 14, 2006 10:38 am Post subject: |
|
|
| masterdriverz wrote: | | zietbukuel wrote: | Seems very interesting... good job. |
Thanks. Have you got it working? |
Not, yet. I will try it when I get at home.  _________________ AMD Phenom X4 9850 Black Edition
4GB OCZ Nvidia SLI-ready Memory DDR2
ASUS M3N-HD/HDMI
320GB HDD
Nvidia 8600GT 512MB Ram DDR2 |
|
| Back to top |
|
 |
masterdriverz Retired Dev

Joined: 28 Mar 2006 Posts: 391 Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the galaxy
|
Posted: Sat Oct 14, 2006 3:56 pm Post subject: |
|
|
| padoor wrote: | how do we determin bad block of mem? how this badram patch finds it?
we have to specify the bad blocks ? |
Have you actually looked at the links provided or installed patch? Usage instructions are very detailed in Documentation/badram.txt _________________ Solutions to misc kde problems |
|
| Back to top |
|
 |
padoor Veteran


Joined: 29 Dec 2005 Posts: 2768 Location: india
|
Posted: Sat Oct 14, 2006 8:05 pm Post subject: |
|
|
nope i have not done so yet. similar ram management utils i read before.
i got the impression we have to make a bad ram address list and it will avoid loading those ram block while booting.
the docs u have mentioned i will read up first and get back
thanks. i have problems with ram which did not pass memtest. if i can get it working it will be very useful to me  _________________ reach out a little bit more to catch it (DON'T BELIEVE the veteran part under my user name) |
|
| Back to top |
|
 |
masterdriverz Retired Dev

Joined: 28 Mar 2006 Posts: 391 Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the galaxy
|
Posted: Sun Oct 15, 2006 6:15 am Post subject: |
|
|
| padoor wrote: | | i got the impression we have to make a bad ram address list and it will avoid loading those ram block while booting. |
Thats correct. _________________ Solutions to misc kde problems |
|
| Back to top |
|
 |
Gentree Veteran


Joined: 30 Jun 2003 Posts: 4729 Location: France, Old Europe
|
Posted: Sun Oct 15, 2006 5:08 pm Post subject: |
|
|
master..z ,
dont jump the gun on the kernel submittion. Let's do some testing first. You'll have lot more cred if you can post "here's a patched 2.6.19-mm with a bunch of users , tested on several systems, works well".
"I just rolled this at home and it seems to work" is going to get taken less seriously.
Did you fix the patch for no2 or do we need to wait for *19-no1 ?
Thx  _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
KX7-333 , AthlonXP1800+ @2.3GHz
AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.29-hh1 : portage ~x86 |
|
| Back to top |
|
 |
vipernicus Veteran


Joined: 17 Jan 2005 Posts: 1462 Location: Your College IT Dept.
|
|
| Back to top |
|
 |
masterdriverz Retired Dev

Joined: 28 Mar 2006 Posts: 391 Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the galaxy
|
Posted: Mon Oct 16, 2006 12:14 am Post subject: |
|
|
| Gentree wrote: | dont jump the gun on the kernel submission. Let's do some testing first. You'll have lot more cred if you can post "here's a patched 2.6.19-mm with a bunch of users , tested on several systems, works well".
|
Well thats what this is all about, though I appreciate your point.
| Quote: | | Did you fix the patch for no2 or do we need to wait for *19-no1 ? |
I haven't got a working patch for no2, I can make one if people will test it. The .19-mm1 patch is the only real supported one, as that's been reviewed by Rick, anything before it will get a "please reproduce with the latest patch" response if you have problems.
| vipernicus wrote: | @masterdriverz
Are you the creator of the original BadRAM patch? |
Nope. Rick van Rein wrote the original patch for 2.2.14. It was then updated by various people, with Rick occasionally updating it himself. The last person to update was Michal Schmidt. I've updated it over a couple of versions, but didn't really test it or submit it, as it was mainly for no-sources. I looked at the last time it was submitted for inclusion for mainline (a long time ago), and there were no serious objections raised, but BadRAM wasn't included. I emailed Rick, asking why, and was told that he hadn't the time to pursue getting BadRAM into mainline, though I was willing to try if I wanted. _________________ Solutions to misc kde problems |
|
| Back to top |
|
 |
cheater1034 Veteran


Joined: 09 Sep 2004 Posts: 1303
|
Posted: Mon Oct 16, 2006 10:21 am Post subject: |
|
|
When rc2-mm comes out, that will be the next no-sources release, so if you make a patch for that after it comes out I'll include it. _________________ #zen-sources on freenode
register --- zen-sources.org for support, etc
PFG (Portage Free Gentoo): http://zen-sources.org/project/Misc
--> Finally clean your soul! (or gentoo install, soul sounds better) |
|
| Back to top |
|
 |
masterdriverz Retired Dev

Joined: 28 Mar 2006 Posts: 391 Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the galaxy
|
Posted: Tue Oct 24, 2006 3:56 am Post subject: |
|
|
| cheater1034 wrote: | | When rc2-mm comes out, that will be the next no-sources release, so if you make a patch for that after it comes out I'll include it. |
Updated _________________ Solutions to misc kde problems |
|
| Back to top |
|
 |
[xaero] n00b


Joined: 05 Feb 2005 Posts: 13 Location: Italy
|
Posted: Thu Apr 19, 2007 2:11 pm Post subject: |
|
|
anyone experienced problems with badram-sources?
I have badram-sources-2.6.19_rc1-r1.ebuild, and after booting it, I need to reinstall kernel modules, but each time I try I get access violation errors (sandbox)
here is the content of /var/log/sandbox/*.log:
open_wr: /usr/src/linux-2.6.19-rc1-badram1/alsa-driver-1.0.14rc1.tar.bz2STMP
open_wr: /usr/src/linux-2.6.19-rc1-badram1/alsa-driver-1.0.14rc1.tar.bz2STMP
open_wr: /usr/src/linux-2.6.19-rc1-badram1/alsa-driver-1.0.14rc1.tar.bz2STMP
open_wr: /usr/src/linux-2.6.19-rc1-badram1/alsa-driver-1.0.14rc1.tar.bz2STMP
open_wr: /usr/src/linux-2.6.19-rc1-badram1/realtime-lsm-0.8.5.tar.gzSTMP
open_wr: /usr/src/linux-2.6.19-rc1-badram1/realtime-lsm-0.8.5.tar.gzSTMP
open_wr: /usr/src/linux-2.6.19-rc1-badram1/realtime-lsm-0.8.5.tar.gzSTMP
open_wr: /usr/src/linux-2.6.19-rc1-badram1/realtime-lsm-0.8.5.tar.gzSTMP
open_wr: /usr/src/linux-2.6.19-rc1-badram1/NVIDIA-Linux-x86-1.0-7184-pkg0.runSTMP
open_wr: /usr/src/linux-2.6.19-rc1-badram1/NVIDIA-Linux-x86-1.0-7184-pkg0.runSTMP
open_wr: /usr/src/linux-2.6.19-rc1-badram1/NVIDIA-Linux-x86-1.0-7184-pkg0.runSTMP
open_wr: /usr/src/linux-2.6.19-rc1-badram1/NVIDIA-Linux-x86-1.0-7184-pkg0.runSTMP |
|
| Back to top |
|
 |
|