Linus Torvards on 64 bit

P4Man

Distinguished
Feb 6, 2004
2,305
0
19,780
I found this a rather interesting post by Linus:
<A HREF="http://www.realworldtech.com/forums/index.cfm?action=detail&PostNum=2229&Thread=9&entryID=30176&roomID=11" target="_new">Realworldtech</A>

A quote:

The virtual address space needs to be at least an
order of magnitude bigger than the physical address space,
and in many cases you want it to be _many_ orders of
magnitude bigger.

This is also the reason why the Intels old argument that
"We don't need more than 4GB of RAM on the desktop for
a few years" was so totally bogus. The same way a 32-bit
virtual address space has _nothing_ to do with 4GB of
physical memory, a 64-bit virtual address space has very
little indeed to do with 2**64 bytes of physical RAM.

Basically, if your physical memory size is even _close_
to the size of your virtual address size span, you're in
trouble. For example, a 32-bit virtual memory limitation
starts getting painful not at 4GB of RAM, but at about
512 MB.

Hmmm.. sounds awfull lot like what I've been preaching here, If you read the rest of his post, you'll get some excellent technical arguments by the father of linux. Eden are you reading ?

:)

= The views stated herein are my personal views, and not necessarily the views of my wife. =
 

imgod2u

Distinguished
Jul 1, 2002
890
0
18,980
I actually did read the whole thread. His basic argument isn't that the virtual address space is too small, but the fact that having a big virtual address space (and not writing code that supports PAE) will "simplify" software framework and allow less buggy software.
This is a fallacious argument as even software that supports x86-64 and its larger address space *still* has code in it which supports PAE simply for compatibility reasons.

"We are Microsoft, resistance is futile." - Bill Gates, 2015.
 

P4Man

Distinguished
Feb 6, 2004
2,305
0
19,780
>This is a fallacious argument as even software that
>supports x86-64 and its larger address space *still* has
>code in it which supports PAE simply for compatibility
>reasons.

I'm not sure what your point is here; surely you know PAE is not evil because of the instructions used, or "PAE mode", but because of the segmented virtual memory address space. AMD64 does away with this and gives you a flat 64 bit virtual memory model, for which it is leaps and bounds easier to develop for, even if your code includes PAE instructions. The segmentation is gone, and that is what this is about. Sure PAE is still used to address physical memory (PAE=physical addressing extentions), and as such is still limited to 42 or however many bits a particular chip implements, but that is not the issue.

= The views stated herein are my personal views, and not necessarily the views of my wife. =
 

imgod2u

Distinguished
Jul 1, 2002
890
0
18,980
See, the assumption there is that an OS/framework made for x86-64 won't include code that supports PAE. I doubt this is the case since Microsoft will likely ship one version of Windows that will run on x86-64 systems and on older systems with PAE (which is quite a lot). This means that the PAE code has to be in there anyway, for reasons of backwards compatibility (in the same way Win98 still supported pre-protected mode). Until we get an entire new framework which gets rid of all x86 stuff before x86-64 (and that will not happen for a while), the benefits of "cleaner" code does not apply.

"We are Microsoft, resistance is futile." - Bill Gates, 2015.
 

P4Man

Distinguished
Feb 6, 2004
2,305
0
19,780
>See, the assumption there is that an OS/framework made for
>x86-64 won't include code that supports PAE.

What do you mean ? The OS will even support 32 bit and afaik even 16 bit code as well.. So what ? As a developper you'll still have a multi terrabyte virtual address space, which is the point here.

> I doubt this is the case since Microsoft will likely ship
>one version of Windows that will run on x86-64 systems and
>on older systems with PAE (which is quite a lot).

Hogwash. That is like saying it won't support AMD64/EM64T at all. Obviously windows for IA64 and iAMD64 will not run at all on 32 bit cpu's, so what are you saying here ??

> the benefits of "cleaner" code does not apply.

Of course it does. Its not the same code. In long mode you have an adress space of a few gazillon megabyte, and that applies to the OS developpers as well as the applications. If you are claiming MS does not make use of this in the way Linus described, that is obviously a fairly unsubstantiated speculation you will never be able to prove without the source code. I see no reason why they wouldnt, 64 bit windows for iAMD64 is based on the Itanium port which was 64 from the start. Even if MS for some obsure reason didnt, it still gives you this flexibility from a application development POV, which is what matters to everyone else. The current beta gives you by default 8 TB per process instead of the 4000x smaller per process address space on 32 bit windows. Surely you see the difference ?

= The views stated herein are my personal views, and not necessarily the views of my wife. =