Re: 2.1.125 Show stopper list: Draft

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Tue, 13 Oct 1998 11:56:32 +0100


On Mon, Oct 12, 1998 at 11:52:12AM -0700, Perry Harrington wrote:
> What about the PGE/PTE problem? Any user can just mmap/munmap all
> possible (768 under x86) page tables for their process, then use up a
> lot of GFP_KERNEL memory. You end up crashing the machine because
> they can do this over and over. We need to either deallocate the page
> tables when we deallocate references to them, or we need to do that
> zero page trick, and refer to the VMA lists to properly handled GPFs
> vs MMAP.

There are three ways to fix this:

1. Process memory limits, and include page tables in the accounting.

Watch out for Slab/buddy/fragmentation overhead which is part of this.
(And architecture dependent).

2. Free page tables when they're emptied, by keeping up to date
per-page-directory counts of used entries.

Doesn't do anything about the overheads, but hopefully keeps them
bounded as a proportion of the actual page table memory used.

3. Pageable page tables.

I'm currently rustling up per-pte-table data right now to implement
discardable pages (see recent thread), so if the page table thing is
deemed critical I could be tempted to use the per-pte-table code to fix
it.

Then again I could be lazy and work on fun stuff instead :-)

-- Jamie

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