Re: Sharing page tables for shared memory

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Tue, 15 Dec 1998 01:43:04 +0000


On Mon, Dec 14, 1998 at 05:01:58PM +0530, Muthu wrote:
> Is creating Shared memory of greater or closer to 4MB creates page table
> entries in all processes sharing it?

Yes.

> I think, it will be good to allocate a single page-table and share it
> across process than creating 1024 PTE's in all processes sharing it. Is this
> taken care in 2.1.x kernel?

Perhaps it would be good; no it isn't done. It would complicate many
things, to save 4k of memory. And only for >4MB shared mappings at the
same virtual address. These are very rare.

0.1% memory saving in rare cases at great complexity.
In my humble opinion, not worth it.

Shared page tables for fork() may be worth it, but that's a very
different thing (requires COW page tables, complications in the fault
handlers etc.)

-- 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/