LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 03-26-2010, 04:35 PM   #1
kd2000
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: 0
Question Linux kernel memory questions / limitations


Greetings!

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.
-DK
 
Old 03-26-2010, 10:45 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,125

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
The 4 Gig virtual address space is only relevant for 32-bit x86 - x86_64 has no concept of this. Zones still exist, but they are different; and of course bigger.
Are you using GFP_DMA32 ?
 
Old 03-28-2010, 09:05 PM   #3
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,227

Rep: Reputation: 167Reputation: 167
The pages are 64GB and not 4GB on 64bit.
 
Old 05-18-2010, 01:15 AM   #4
Brawn
LQ Newbie
 
Registered: Apr 2008
Posts: 1

Rep: Reputation: 0
Hello, sorry for jumping into the conversation but this posting is the closest I got to the answer I need.
Question: Does Ubuntu 10 or Fedora 12/13 32bit support 4gb RAM?

And yes I am a newbie; Need to install Linux because I need to stay legal

Thank you for your support.
 
Old 05-18-2010, 01:23 AM   #5
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,619
Blog Entries: 29

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
Hi Brawn,

Have a look at the following thread:
http://forums.fedoraforum.org/showthread.php?p=1331891
 
Old 05-18-2010, 02:44 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,125

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
Short answer - yes.
I would be surprised if Fedora even offered a PAE kernel these days. I would expect the default kernel to have all that support compiled in.
 
  


Reply

Tags
dma, kernel, memory


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


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


All times are GMT -5. The time now is 05:36 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 Google+: linuxquestions
Open Source Consulting | Domain Registration