Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#318863 - 05/02/2009 19:55 Cap memory available to Linux kernel
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3996
Loc: Manchester UK
I've got a kernel module for a video output expansion card that seems to fail when running on a machine with more than 4GB installed. Until the vendor issues a patch for this I want to cap the amount of memory available to the kernel to avoid having to pull the extra memory out of my machine when I do development work on it. I run a lot of VMs the rest of the time so 8GB of main memory comes in handy.

A quick google yielded an article that says appending mem=4G to the boot parameters will do the trick. Is this all I need to do? Is this as good as pulling the memory out?
_________________________
Cheers,

Andy M

Top
#318867 - 05/02/2009 20:10 Re: Cap memory available to Linux kernel [Re: andym]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Should do. The kernel will ignore everything above 4GB and act as if it just wasn't installed.

Top
#318868 - 05/02/2009 20:14 Re: Cap memory available to Linux kernel [Re: andym]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Quote:
A quick google yielded an article that says appending mem=4G to the boot parameters will do the trick. Is this all I need to do? Is this as good as pulling the memory out?

Not quite. A big chunk (up to 2GB) of the base 4GB of RAM will still end up mapped above the 32-bit boundary, so the card (or driver) will still have issues with pointers that don't fit into 32-bits.

mem=2G is pretty much guaranteed to work, though.

EDIT: /proc/mtrr provides useful feedback on this kind of thing

Cheers


Edited by mlord (05/02/2009 20:16)

Top
#318869 - 05/02/2009 20:15 Re: Cap memory available to Linux kernel [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
If you give a link to the source code for the driver, I can probably fix it in a few minutes or less..

Cheers


Edited by mlord (05/02/2009 20:18)

Top
#318870 - 05/02/2009 20:56 Re: Cap memory available to Linux kernel [Re: mlord]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3996
Loc: Manchester UK
PM sent....
_________________________
Cheers,

Andy M

Top