Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


Closed Thread
  Search this Thread
Old 03-26-2010, 05:18 PM   #1
LQ Newbie
Registered: Mar 2010
Posts: 2

Rep: Reputation: 0
Question Linux kernel memory limitations


I am somewhat of a newbie to Linux apps / kernel / driver programming.
I have question related to kernel memory allocation which I am not able to clearly find an answer. I have Google'd around and found lot of incomplete threads without any solution. Here is what I have -
For x86_64 - Nehalem CPU 64 bit mode, I have a system with 6GB memory, with a PCIe device capable of performing 64 bit DMA.
I want to allocate 2GB or more of DMA memory via a kernel lkm module. Basically idea is to make memory allocation kernel aware.

1> Can the DMA memory beyond 4G address space be allocated by kernel ?
Are there any limitations with 2.6.x ?

2> I have a sample LKM which via an ioctl allocates memory using get_free_page, however after allocating around 65xxx pages (~256MB), the kernel OOM kicks in and kills the user process ? Is there a config anywhere to prevent his ? Is the user space process limited to certain amount memory ?

3> This is 64 bit mode kernel so technically there should be no restrictions right ? I am also aware about some of the allocate_bootmem options, but not quite clear on their usage for address space beyond 4Gb. Is this only choice ? What about DMA coherency ?

Thanks a bunch in advance.

Last edited by kd2000; 03-26-2010 at 05:20 PM. Reason: typo
Old 03-27-2010, 05:33 AM   #2
Registered: Aug 2009
Location: Zeewolde, Flevoland NL
Distribution: Debian squeeze (Gnome) on netbooks; Debian Lenny on servers and Debian wheezy (XFCE) on new laptops
Posts: 144

Rep: Reputation: 23
As far as I know the 64 bits kernels all have a limit of 64GB and also the 32 bits BigMem kernels do, with the difference that applications will get a maximum of 3008MB per application in the 32 bits BigMem kernels and in the 64 bits they will have all memory available per process.
Old 03-27-2010, 06:40 AM   #3
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Continue here:

Closed Thread

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory limitations umproko5 Linux - Enterprise 3 03-06-2009 05:37 AM
Memory limitations with FC6? ACDII Fedora 2 05-02-2007 02:19 PM
SoundFont memory limitations on Audigy 2? fyhuang Linux - Hardware 0 12-19-2005 05:01 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:46 AM.

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