Re: [PATCH/RFC] Shared page tables

Dave McCracken
2006-01-24T00:51:21Z

--On Tuesday, January 24, 2006 01:39:46 +0100 Andi Kleen <ak@suse.de> wrote:

>> Oh, obviously that is not right as you have to share full pte pages.
>> So on x86_64 I'm guessing one needs 2MB alignment in order to get the
>> sharing to kick in, since a pte page maps 512 pages of 4 KB each.
>
> The new randomized mmaps will likely actively sabotate such alignment. I
> just added them for x86-64.

Given that my current patch requires memory regions to be mapped at the
same address, randomized mmaps won't really make it any worse. It's
unlikely mmap done independently in separate processes will land on the
same address. Most of the large OLTP applications use fixed address
mapping for their large shared regions.

This also should mean large text regions will be shared, which should be a
win for big programs.

I've been kicking around some ideas on how to allow sharing of mappings at
different addresses as long as the alignment is the same, but don't have
the details worked out. I figure it's more important to get the basic part
working first :)

Dave McCracken