Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
BadRAM - patch and badram-sources
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
masterdriverz
Retired Dev
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

PostPosted: Wed Oct 11, 2006 3:51 pm    Post subject: BadRAM - patch and badram-sources Reply with quote

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 11:18 am; edited 3 times in total
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2135
Location: Rochester/Buffalo, NY

PostPosted: Wed Oct 11, 2006 8:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
seren
Guru
Guru


Joined: 27 Aug 2005
Posts: 448
Location: Wisconsin

PostPosted: Thu Oct 12, 2006 8:35 pm    Post subject: Reply with quote

Does this work?
Back to top
View user's profile Send private message
masterdriverz
Retired Dev
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

PostPosted: Thu Oct 12, 2006 8:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
zietbukuel
Guru
Guru


Joined: 30 Dec 2005
Posts: 594
Location: /dev/peru/lima

PostPosted: Sat Oct 14, 2006 8:23 am    Post subject: Reply with quote

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
750GB HDD
Nvidia 8600GT 512MB Ram DDR2
Cooler Master CM690
Back to top
View user's profile Send private message
masterdriverz
Retired Dev
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

PostPosted: Sat Oct 14, 2006 8:32 am    Post subject: Reply with quote

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. :oops:
_________________
Solutions to misc kde problems
Back to top
View user's profile Send private message
zietbukuel
Guru
Guru


Joined: 30 Dec 2005
Posts: 594
Location: /dev/peru/lima

PostPosted: Sat Oct 14, 2006 3:06 pm    Post subject: Reply with quote

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. :oops:


Seems very interesting... ;) good job.
_________________
AMD Phenom X4 9850 Black Edition
4GB OCZ Nvidia SLI-ready Memory DDR2
ASUS M3N-HD/HDMI
750GB HDD
Nvidia 8600GT 512MB Ram DDR2
Cooler Master CM690
Back to top
View user's profile Send private message
masterdriverz
Retired Dev
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

PostPosted: Sat Oct 14, 2006 3:11 pm    Post subject: Reply with quote

zietbukuel wrote:
Seems very interesting... ;) good job.


Thanks. Have you got it working?
_________________
Solutions to misc kde problems
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 3714
Location: india

PostPosted: Sat Oct 14, 2006 3:29 pm    Post subject: Reply with quote

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 advocate part under my user name)
Back to top
View user's profile Send private message
zietbukuel
Guru
Guru


Joined: 30 Dec 2005
Posts: 594
Location: /dev/peru/lima

PostPosted: Sat Oct 14, 2006 3:38 pm    Post subject: Reply with quote

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. 8)
_________________
AMD Phenom X4 9850 Black Edition
4GB OCZ Nvidia SLI-ready Memory DDR2
ASUS M3N-HD/HDMI
750GB HDD
Nvidia 8600GT 512MB Ram DDR2
Cooler Master CM690
Back to top
View user's profile Send private message
masterdriverz
Retired Dev
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

PostPosted: Sat Oct 14, 2006 8:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 3714
Location: india

PostPosted: Sun Oct 15, 2006 1:05 am    Post subject: Reply with quote

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 advocate part under my user name)
Back to top
View user's profile Send private message
masterdriverz
Retired Dev
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

PostPosted: Sun Oct 15, 2006 11:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5077
Location: France, Old Europe

PostPosted: Sun Oct 15, 2006 10:08 pm    Post subject: Reply with quote

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 8)
_________________
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.32-hh1 : portage ~x86
Back to top
View user's profile Send private message
vipernicus
Veteran
Veteran


Joined: 17 Jan 2005
Posts: 1462
Location: Your College IT Dept.

PostPosted: Mon Oct 16, 2006 12:49 am    Post subject: Reply with quote

@masterdriverz

Are you the creator of the original BadRAM patch?
_________________
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Back to top
View user's profile Send private message
masterdriverz
Retired Dev
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

PostPosted: Mon Oct 16, 2006 5:14 am    Post subject: Reply with quote

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
View user's profile Send private message
cheater1034
Veteran
Veteran


Joined: 09 Sep 2004
Posts: 1551

PostPosted: Mon Oct 16, 2006 3:21 pm    Post subject: Reply with quote

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.
_________________
JOIN IRC!: #zen-sources on irc.rizon.net
zen-kernel.org
Zen bugs/requests?: http://zen-kernel.org/issues
--
Join: ARCFPWDLVEFOTTSBNA - Anti-Rice club for people who don't like volcanoes except for on the TVs sometimes but not always
Back to top
View user's profile Send private message
masterdriverz
Retired Dev
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

PostPosted: Tue Oct 24, 2006 8:56 am    Post subject: Reply with quote

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
View user's profile Send private message
[xaero]
n00b
n00b


Joined: 05 Feb 2005
Posts: 13
Location: Italy

PostPosted: Thu Apr 19, 2007 7:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum