Re: pte-highmem-5

Linus Torvalds (torvalds@transmeta.com)
Wed, 16 Jan 2002 10:19:56 -0800 (PST)


Btw, some suggestions:

- why have those ugly special cases for bootup defines. kmap() is a no-op
on 1:1 pages, so all those "arch/i386/mm/init.c" games are totally
unnecessary if you just have the pages in low memory. That gets rid of
much of it.

- do the highmem pte bouncing only for CONFIG_X86_PAE: with less then 4GB
of RAM this doesn't seem to matter all that much (rule of thumb: we
need about 1% of memory for page tables). Again, this will simplify
things, as it will make other architectures not have to worry about the
change.

(And it's really CONFIG_X86_PAE that makes page tables twice as big, so
PAE increases the lowmem pressure for two independent reasons: twice as
much memory in page tables _and_ larger amounts of memory to map).

- please don't do that "pte_offset_atomic_irq()" have special support in
the header files: it is _not_ a generic operation, and it is only used
by the x86 page fault logic. For that reason, I would suggest moving
all that logic out of the header files, and into i386/mm/fault.c,
something along the lines of

pte = pte_offset_nokmap(..)
addr = kmap_atomic(pte, KM_VMFAULT);

instead of having special magic logic in the header files.

Other than that it looks fairly straightforward, I think.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/