LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-16-2014, 05:05 AM   #1
kollianil
LQ Newbie
 
Registered: Jul 2009
Posts: 5

Rep: Reputation: 0
Linux HIGHMEM


Hello,

I am going through Memory Management chapter in Understanding Linux Kernel Book.

I have few questions:

1. What is the maximum amount of RAM that can be mapped via HIGHMEM?

2. If I map 256MB of physical memory mapped through HIGHMEM, Can I use whole 256MB from a single application using malloc()?

3. In a 32-bit system, I have 256MB RAM and 4KB page size, how many page table entries required to map whole physical memory into virtual memory?

Thanks & Regards,
Anil.
 
Old 08-17-2014, 01:57 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
These aren't exactly newbie questions, which is why I suspect you haven't gotten many responses. I'm not an expert on the Linux memory subsystem, but I can try to take a crack at this.

1. On 32 or 64 bit systems? I thought HIGHMEM went away in x86-64 land, but I'll admit I'm not at all sure about that/ Assuming you are talking about 32 bit systems the size of the virtual address space of a process is 4 GB, which was IIRC was mapped with the top 1 GB as kernel space and the bottom 3 GB as user space (i think there was an option for a 2 GB/2 GB split as well). In terms of physical memory, up to 4 GB could be used, unless PAE was enabled. With PAE, each process was still limited to 4 GB, but the kernel itself could map up to 64 GB IIRC of physical memory. In x86-64 land, the virtual address sizes are huge (64 bits - but virtual addresses tend to be only 48 bits at least in the chips I have), but the physical address lines are a bit smaller; e.g. on one of my servers with dial Intel X5650 processors (ca 2010-2011 era chips), the physical address bus is 40 bits, as reported by /proc/cpuinfo. This would be enough to address up to 1 TB of memory. Newer machines have larger buses; e.g. another machine I have with dual E5-2630 CPUs still have the 48 bit virtual address size, but a 47 bit physical address bus, sufficient to address up to 64 TB of RAM. I think hat the biggest quad or eight socjket server motherboards only support 4 or 8 TB of RAM, so this is probably good for now :-).

2. You could probably use most of it, and force a lot of swapping to disk to happen. But you could not use all of it. Some would have to be reserved for the OS.

3. I think this would be somewhat architecture dependent based on how the MMU lays out page table entries. At a basic level, how many 4 KB pages are there within 256 MB? This is a fairly simple math problem...
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel HIGHMEM performance clvic Linux - Kernel 3 02-14-2008 07:41 PM
Rebuilding kernel for highmem support? PocklingtonDan Mandriva 6 05-19-2007 04:25 PM
LXer: Linux: Using 1GB of RAM Without HighMem LXer Syndicated Linux News 0 01-14-2006 12:03 AM
Not all RAM is used - Highmem? Tim Johnson Slackware 6 05-05-2005 09:41 AM
How do I enable the kernel for HIGHMEM? Mike Healan Mandriva 5 05-19-2004 01:40 PM


All times are GMT -5. The time now is 08:50 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration