LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 11-23-2009, 12:46 PM   #16
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,277

Rep: Reputation: 126Reputation: 126

Quote:
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 06:39 PM.
 
Old 11-23-2009, 01:50 PM   #17
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by Quakeboy02 View Post
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.
 
Old 11-23-2009, 02:46 PM   #18
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,277

Rep: Reputation: 126Reputation: 126
John, does your 64 bit .config have PAE enabled?
 
Old 11-23-2009, 03:04 PM   #19
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by Quakeboy02 View Post
John, does your 64 bit .config have PAE enabled?
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?
 
Old 11-23-2009, 06:14 PM   #20
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,277

Rep: Reputation: 126Reputation: 126
I stand corrected, but I am very surprised.

From Wiki: http://en.wikipedia.org/wiki/Physica...xtension#Linux
Quote:
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.
 
Old 11-23-2009, 06:55 PM   #21
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by Quakeboy02 View Post
I stand corrected, but I am very surprised.
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.
 
Old 11-23-2009, 07:07 PM   #22
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,277

Rep: Reputation: 126Reputation: 126
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.
 
Old 11-23-2009, 07:11 PM   #23
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,277

Rep: Reputation: 126Reputation: 126
Quote:
I don't see any picture for long mode on that page. What picture are you looking at?
The picture I'm referring to is directly under the word "obligatory". I'm referring to the bottom half of the picture.
 
Old 11-23-2009, 08:22 PM   #24
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
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 08:23 PM. Reason: grammer
 
Old 04-06-2014, 08:19 PM   #25
Gene Falck
Member
 
Registered: Mar 2014
Location: Verona, WI
Distribution: None yet
Posts: 52

Rep: Reputation: Disabled
Hi anyone still with this topic,

I'm pretty ignorant about this.

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?"
 
Old 04-06-2014, 08:36 PM   #26
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by Gene Falck View Post
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.

Last edited by johnsfine; 04-06-2014 at 08:52 PM.
 
Old 04-06-2014, 09:06 PM   #27
Gene Falck
Member
 
Registered: Mar 2014
Location: Verona, WI
Distribution: None yet
Posts: 52

Rep: Reputation: Disabled
Hi johnsfine,

Thanks for your quick uptake in a stale topic.

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!
 
Old 04-07-2014, 04:11 AM   #28
Germany_chris
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Arch
Posts: 1,027

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
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.
 
Old 04-07-2014, 08:11 AM   #29
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by Gene Falck View Post
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 View Post
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.

Last edited by johnsfine; 04-07-2014 at 08:16 AM.
 
Old 04-07-2014, 12:51 PM   #30
Gene Falck
Member
 
Registered: Mar 2014
Location: Verona, WI
Distribution: None yet
Posts: 52

Rep: Reputation: Disabled
Hi Germany_chris,

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.
 
  


Reply

Tags
kernel, pae


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-PAE danospv Debian 20 11-13-2008 10:20 AM
KERNEL PANIC: Cannot execute a PAE-enabled kernel on a PAE-less CPU! ovais370 Linux - Laptop and Netbook 7 10-13-2007 06:49 PM
PAE Kernel stumpedguy_frustrate Fedora 5 07-22-2007 10:46 PM
New update Kernel-bigsmp-Kernel with PAE Support raylhm SUSE / openSUSE 2 07-15-2007 04:42 PM
Kernel-PAE stumpedguy_frustrate Fedora 0 04-08-2007 01:02 PM


All times are GMT -5. The time now is 09:11 PM.

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