Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
x86 Linux always uses memory mapping. 32 bit non PAE, 32 bit PAE and 64 bit all use similar mapping designs.
For user programs, sure. But, user programs in 32 bit mode PAE don't have a virtual address space above 4GB, so user programs don't really know anything about PAE.
The 32 bit kernel itself uses PAE to remap addresses above 4GB into 32 bit space so that it (the kernel) can see them. There is no such need in a 64 bit kernel, as the kernel can directly address this space.
Added (see later post):
And, it appears that AMD and Intel have brought the "Page Directory Pointer Table" concept forward into 64 bit mode, thus making PAE "obligatory" in 64 bit mode. Can it be that they are preparing for 128 bits, or maybe something like "68 bit mode"?
Last edited by Quakeboy02; 11-23-2009 at 05:39 PM.
For user programs, sure. But, user programs in 32 bit mode PAE don't have a virtual address space above 4GB, so user programs don't really know anything about PAE.
User programs work with virtual memory, not physical memory, so they have no reason to know or care about PAE.
Quote:
The 32 bit kernel itself uses PAE to remap addresses above 4GB into 32 bit space so that it (the kernel) can see them. There is no such need in a 64 bit kernel, as the kernel can directly address this space.
Try reading the relevant parts of one of the AMD or Intel manuals. I think you are missing the basic concepts of the virtual to physical translation.
You also seem to be confusing the highmem feature with the PAE feature.
There are occasions when an OS needs to access memory by its physical address. x86 Linux runs with virtual to physical translation always on. So the OS cannot actually "directly address" physical memory. As a workaround (almost as simple as direct access) Linux built without the highmem feature maps all of physical ram into a contiguous block of virtual address space.
On 32 bit systems, that limits you to 896MB of physical ram. It would limit you to 896MB with or without PAE, so of course you wouldn't build a non highmem 32 bit Linux with PAE.
The highmem alternative splits physical memory. There are certain uses of memory for which access based on physical address is important, so those uses must be limited to a portion of ram with permanent mapping. Most uses of memory don't make access based on physical address important, so those uses can use the physical ram that does not have permanent mapping. That means Linux will occasionally want access to memory that isn't mapped at the moment and will need to map it in order to access it. That is rare and trivial and not due to PAE but due to highmem.
Looking again at your claim:
Quote:
The 32 bit kernel itself uses PAE to remap addresses above 4GB into 32 bit space so that it (the kernel) can see them.
The kernel runs with certain of its own data and code (regardless of where they might be in physical ram) permanently mapped. It usually (not always) has the virtual address space of whatever process it is servicing mapped (again regardless of where that might be in physical ram). It always has a chunk of low physical ram (not more than 896MB) permanently mapped as described above.
If it needs access to a page of memory that is not any of the above already mapped types, then it must map it dynamically. That can occur both above and below the 4GB boundary and can occur both with and without PAE.
Of course not. It isn't enabled. It isn't disabled. CONFIG_X86_PAE isn't there at all. None of the CONFIG_HIGHMEM options are there either.
So far there is only one form of x86_64 mapping. There are no options like PAE or various HIGHMEM to turn on or off in building memory management for X86_64 Linux. It all works only one way, unlike the 32 bit x86 which evolved over a longer period accumulating build time and hardware options.
Do you think the absence of a build option named "PAE" says anything about the technical relationship between the way PAE works in 32 bits and the way the only (and non optional) mapping system works in X86_64?
On x86-64 processors, PAE is obligatory in native long mode; currently 48 bits are used out of 52 bits possible on AMD Phenom, older CPUs may use fewer bits.
From looking at the picture it appears that in 64 bit native long mode, they require the use of the "Page Directory Pointer Table", thus requiring PAE. Very strange.
I'm surprised you changed your mind based on that. From the exact same page you could have quoted the phrase:
Quote:
PAE is not a possible address translation scheme on an x64 processor running in "long mode,"
Terminology (do we call it "PAE", what exactly do we mean by "PAE") can lead to some messy disagreements, including apparently between the authors of that page.
If you want to understand it, the best choice is the AMD architecture documentation.
Quote:
From looking at the picture it appears that in 64 bit native long mode, they require the use of the "Page Directory Pointer Table"
I don't see any picture for long mode on that page. What picture are you looking at?
32 bit non PAE has 32 bit entries and a two level pointer structure.
32 bit PAE has 64 bit entries and a three level pointer structure.
long mode has 64 bit entries and a four level pointer structure. In the AMD documentation they call the level above the Directory Pointer Table the "Page Map Level 4".
The 32 bit entries allow for 32 bit physical addresses, plus a limited set of flags (page protection settings, etc.).
The 64 bit entries allow for 52 bit physical addresses, plus a larger set of flags, plus some reserved bits. The extra flags include the execute protection that can be used to defend against most data overrun exploits.
The 64 bit entry size and format, in my opinion, is the key feature of "PAE" and is shared by long mode.
I have read that 32 bit PAE only supports 36 physical address bits, even on 64 bit CPU's. I don't have a URL handy. But while checking an AMD manual for a detail for this thread, I noticed it says 32 bit PAE has the same (varying by CPU model) limit on physical address bits as long mode. I don't know whether that is a documentation error or whether the 64GB limit on 32 bit PAE is now only a software limit, or whether you could actually use over 64GB with 32 bit PAE. But I also can't think of a reason to want to push 32 bit PAE that high.
My understanding is that PAE was added just to get an additional 4 bits of address space. After all, PAE does stand for Physical Address Extension. Thus my surprise that the PAE architecture is carried forward to 64 bit flat model. I never would have guessed that in a million years. My assumption was that they would have just gone back to the same type of flat model addressing that vanilla 32 bit flat model uses. My mistake. But, like I added to my earlier post, perhaps they are merely positioning the architecture for a similar "68 bit mode" in the future. I dunno. I don't work there.
If you did not have a PAE kernel just recompile the kernel with support for it. Its a simple thing to implement really. I think its in processor features, support for large memory and you either select off ,4gb, or 64gb.
Last edited by exvor; 11-23-2009 at 07:23 PM.
Reason: grammer
I booted from my USB for Mint on my LT20 Gateway netbook and tried the uname -a command and got:
Liniux mint 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:12:00 UTC 2013 i686 i686 i686 GNU/Linux
So, being that I didn't understand very much of the previous material on this topic, I still have to ask "Do **I** have PAE?"
The i686 you quoted indicates you have a 32-bit Kernel, so the question of whether you have a PAE kernel is meaningful (unlike the OP of this thread, who had a 64-bit kernel, so the question didn't actually make sense).
In the long time since this thread was active, most Linux distributions changed such that all their 32-bit kernels are PAE. So my guess is that you have a PAE kernel.
Beyond guessing, I don't recall what you check to see whether your 32-bit kernel has PAE. It has been a long time since I used a 32-bit kernel.
You might want to search from some other old thread about PAE. There were a lot of them. This one got side tracked into a 64-bit side topic and never answered any 32-bit PAE question. But similar old threads contain your answer.
Meanwhile, why do you care? If you have less than 4GB of physical ram, it doesn't matter much whether you have a PAE kernel. If you have 4GB or more of RAM and Linux can use it all, you have a PAE kernel. If you have 4GB or more RAM installed but Linux only sees around 3.5GB, then you have a problem to diagnose (with several old threads giving details of the possibilities) and finding out whether you have a PAE kernel would be relevant. But short of that specific problem, why would you care?
Edit: After writing the above, I looked up the LT20. If I understand correctly, it can't use more than 3GB of RAM, so there is no advantage to having a PAE kernel.
I thought (If I can dignify my mental processes to that extent) from the original question that PAE was a characteristic of the computer itself. In fact, I had just run across a reference to installing Lubuntu needing to be on a machine that uses PAE. Much of the ensuing discussion didn't sound like anything that made sense to me based on my original assumption. If you have a any answer to my "How can I tell if my machine uses PAE?" I'd appreciate seeing it.
Your reply does make it clear that the "PAE kernel" mentioned in the various replies is a part of the distro, so I'm still in the dark about what I saw as the problem--how can I tell if my netbook will be able to run a distro. I started out thinking in terms of Mint with the Mate interface but many replies to my questions seem full of doubt about Mint and suggest Lubuntu as my best bet.
I'm plodding along on this but pretty soon I won't be able to go online with WindowsXP without very likely picking up malware of some kind. I, so far, haven't had success getting a download manager to work and direct downloads of the distros have been interrupted more often than not. Starting over from scratch really eats up my GB allowance quickly!
While LXDE is lighter than Mate it's not significantly so. My x64/Mate idles at 384mb x64/LXDE comes in at ~300 and you can knock off some more if you're running in i686. LXDE is nice but IMHO you won't notice a speed difference between Mate and LXDE I never have.
I booted from my USB for Mint on my LT20 Gateway netbook and tried the uname -a command and got:
Liniux mint 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:12:00 UTC 2013 i686 i686 i686 GNU/Linux
Since you got that far, there is no question the kernel is compatible with the hardware.
It would be just as compatible when installed on the hard drive as it would be when booted from USB.
Quote:
Originally Posted by Gene Falck
I thought ... from the original question that PAE was a characteristic of the computer itself.
Yes, PAE is both a characteristic of the CPU and the kernel. If both the CPU and Kernel have PAE, you might be able to access more than three and a fraction GB of ram. But on some computers you still can't (and I think that includes your computer).
If only the CPU, but not the kernel, has PAE things will run correctly, but you can't access more than three and a fraction GB of ram.
If only the kernel, but not the CPU, has PAE Linux won't start at all.
Quote:
In fact, I had just run across a reference to installing Lubuntu needing to be on a machine that uses PAE.
That tells you the Lubuntu kernel has PAE, so it won't start on a CPU that doesn't.
Quote:
If you have a any answer to my "How can I tell if my machine uses PAE?"
Since you didn't say "machine" I thought you were repeating the title question of the thread (knowing if your kernel has PAE and I have forgotten that answer).
Knowing if your CPU has PAE is easier.
Code:
grep pae /proc/cpuinfo
That command should output the flags line of each CPU core if your CPU has PAE and should output nothing if your CPU doesn't have PAE.
You wrote,
While LXDE is lighter than Mate it's not significantly so. My x64/Mate idles at 384mb x64/LXDE comes in at ~300 and you can knock off some more if you're running in i686. LXDE is nice but IMHO you won't notice a speed difference between Mate and LXDE I never have.
Except that all my questions concern the one project at hand, I'll just say that Lubuntu has been suggested as perhaps the one I should use because it might be the only one that will fit. Mint with Mate seems more like what I would like but that might not be OK for the hardware. Speed wasn't the reasoning behind that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.