Re: Memory Management - BSD vs Linux

Linus Torvalds (torvalds@transmeta.com)
13 Aug 1997 04:12:30 GMT


In article <199708130101.SAA22928@connectnet1.connectnet.com>,
Darin Johnson <darin@connectnet.com> wrote:
>
> > Linux is able to handle the RS6000 hash tables quite well, thank you
> > very much. They exist on the PowerPC too, and there is already a native
> > port to that.
>
>A quick glance at the code, and it seems like they're just
>ignored once initialized. If so, they have no impact on the
>OS design. Am I wrong?

Look closer (I think most of the work is actually done in the low-level
trap handler, which is as it should be: low latency TLB refill, no need
to go to C code just to look up page tables).

You'll see similar approaches in some other architectures - one of the
cleanest ones is the UltraSparc that has a very nice software TLB
refill. The Alpha software TLB refill is also very nice (clever virtual
page tables and two-level faulting), but you can't see it because it's
hidden in the PAL-code and not part of the kernel proper.

>Just what do "pgd/pmd/pte" stand for? (I've got good guesses for
>pgd and pte, but I'm at a blank for what pmd might stand for, and
>this makes me always forget which comes first in the mapping)

"pgd" is "PaGe Directory", while "pte" is "Page Table Entry". The names
are certainly influenced by intel naming conventions, but if you
overlook that they still make some sense.

"pmd" is "Page Mid Directory". I'm sorry. And I'm going to be even
sorrier if we move to a four-level tree any time in the near future
(with the new third level being called a "pntld" for "Page Next To Last
Directory"? ;)

But I still claim it's better than hungarian notion!

(And remembering that "m" stands for "mid" certainly helps keep track of
the ordering)

Linus