LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 08-16-2012, 03:24 PM   #1
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 307
Blog Entries: 1

Rep: Reputation: 30
Kernel mem= boot param limit at 3.2Gb RAM?


I've got a Linux Box running Debian Wheezy (but I think this question is more kernel related):

My box has 4Gb RAM
I'm running i386 kernel (32 bit) with Physical Addr. Extension enable: this is the version:

3.2.0-2-686-pae

I'm trying (due to a problem I found with suspend to ram ( http://www.linuxquestions.org/questi...zy-4175414542/ ) to set a maximum amount of memory to use through mem= kernel parameter at boot time.

If I don't set mem= parameter free command tells there's 4Gb RAM.
I started setting mem= but if I set for example mem=3600m free doesn't sticks in 3.2Gb.

Is that right? With mem isn't possible to surpass 3.2 gb limit?

Regards,
Matías
 
Old 08-17-2012, 08:02 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 12,146
Blog Entries: 2

Rep: Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874Reputation: 2874
Just a guess: The address range about 3.2-4GB (first number depends on your hardware) is always blocked for the peripheral devices. Accessing the full memory with PAE is done by a trick, Memory Remapping. Simply said it is a mechanism to get access to the blocked RAM with mapping it to an address-space above 4GB. This must be supported by the mainboard and the kernel.
I would guess that setting a mem limit is blocking that mechanism somehow.
 
Old 08-17-2012, 10:22 AM   #3
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 307
Blog Entries: 1

Original Poster
Rep: Reputation: 30
Thanks for your kind explanation.
I tend to think there's some kind of problem with motherboard/BIOS (despite its apparent support for up to 8Gb). Cos' if I use all 4Gb (setting no limit) features like suspend to ram fails, as I described in other thread.
I think I'll stick with 3.2 Gb limit and think to upgrade to amd-64 kernel in the future.

Regards,
Matías
 
Old 08-17-2012, 10:24 AM   #4
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 307
Blog Entries: 1

Original Poster
Rep: Reputation: 30
Sorry I forgot to say: do you know if is there any way of testing if the mobo (Asus M3A) does support for PAE?
 
Old 08-17-2012, 11:00 AM   #5
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 307
Blog Entries: 1

Original Poster
Rep: Reputation: 30
Within mobo user manual I found there's a bios option called "Memory Hole Remapping" enable/disable. The name of that feature is quite cryptic I'll check when I get home how is setted.
 
Old 08-17-2012, 06:24 PM   #6
johnsfine
Senior Member
 
Registered: Dec 2007
Distribution: Mepis, Centos
Posts: 4,672

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
Quote:
Originally Posted by matiasar View Post
Within mobo user manual I found there's a bios option called "Memory Hole Remapping" enable/disable. The name of that feature is quite cryptic I'll check when I get home how is setted.
If that were disabled then even with PAE you couldn't use more than 3.2 GB.

I don't have any insight into your problem with suspend to disk. But it seems plausible that the memory you need PAE to access is the memory that isn't working right for suspend to disk.

Under control of the BIOS, the memory controller on the motherboard maps chunks of physical ram (identified by "row" and "column" select signals) to ranges of physical addresses. Since a big block of physical addresses under 4GB are reserved for things other than ram, the BIOS must either leave that much ram unmapped or map it above 4GB. (The remapping is not really a re mapping. No ram inherently has a physical address. Any chunk of ram has an address only because the BIOS sets up the memory controller to map it that way. The ram mapped above 4GB is mapped the same way as the ram below 4GB, but to a higher address).

When you tell the kernel to limit memory, it is limiting by physical address, not by quantity of memory. So if you wanted approx 3600MB of ram enabled, you could use
mem=4400m getting about 3.2GB with addresses below 4GB plus about 0.4GB with address above 4GB, which if I understand you correctly is less ram than having no mem= at all, which is letting you use close to 0.8GB of the ram above 4GB.

If the same ram that needs PAE (anything above 4GB physical) is the ram that breaks suspend to disk, then splitting the difference is just an interesting experiment, not a solution.

Maybe you just want to simplify to a non PAE kernel.

A few device drivers need code that has special support for use of ram above 4GB. I expect the disk driver is one of those. But if there were a bug in that support, I would expect there to always be a bug, not just for suspend to disk.

Such bugs in device drivers were a major source of the original idea that PAE is unstable or often incompatible. But Linux never had many real problems in that area. Windows has a much uglier boundary between kernel and device driver, so it is much harder to make 32 bit drivers compatible with ram use above 4GB. But that Windows issue was never a big deal in Linux.

Edit: I see (from your other thread) I didn't read carefully enough. You have suspend to disk working and to ram not working. So I have even less understanding why using memory above the 4GB boundary seems to make it fail. Maybe a BIOS bug in the way the memory controller is reconfigured for low power mode?

Anyway, you seem to have verified that enabling all the ram above 4GB triggers the failure and enabling none of the ram above 4GB is OK. As I described above, you could try enabling half of the ram above 4GB as you seem to have wanted to try, but I'd be amazed if that did not also break suspend.

As long as you can't get benefits from PAE, I think you should get a non PAE kernel.

Last edited by johnsfine; 08-17-2012 at 06:46 PM.
 
2 members found this post helpful.
Old 08-21-2012, 07:40 AM   #7
matiasar
Member
 
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 307
Blog Entries: 1

Original Poster
Rep: Reputation: 30
Johnsfine,

Thanks for such a detailed answer. I learned a lot with it about memory management. As soon as I have a little time at home to do some test you adviced me I'll do and I'll let you know the results.
I'm not 100% sure, but I think I had tried with a non PAE kernel, but of course I'll test again.

Thanks again and regards,
Matías
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how kernel figure out DDR RAM size when bootargs's mem not specified? gluo88 Linux - Kernel 6 08-16-2012 09:20 AM
ReiserFS 2Gb maximum file size limit? Cannot copy files bigger than 2Gb ihtus Suse/Novell 2 10-26-2007 09:21 AM
How to overcome the 2GB Ftp limit in redhat 7.2 running kernel 2.4.7-10 Ryleco Linux - Software 0 09-07-2004 09:23 AM
kernel recompiled with highmem-- still can't use all 2GB RAM nknowles Linux - General 0 12-04-2003 07:35 PM
2.4.20 Kernel has file size limit=2GB?? How can this be! digizer0 Linux - General 7 01-14-2003 10:00 PM


All times are GMT -5. The time now is 04:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration