Re: Large pages

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Wed, 14 Nov 2012 04:19:37 +0000 (UTC)
Message-ID: <pan.2012.11.14.04.19.39_at_gmail.com>



On Tue, 13 Nov 2012 17:24:32 +0000, Jonathan Lewis wrote:

> However,
> a) he does mention Solaris and intimate shared memory - and explains
that
> shared page tables are possible
> b) the article is dated Dec 2007 - so things may have changed
>
> Do you have any specific versions of Unix in mind when you state that
the
> page table for a shared memory segment is automatically shared ? Is
this,
> perhaps a specific default for OEL.

Jonathan, I don't see any results and the articles about Linux page tables are surprisingly hard to find. I was unable to find the conclusive proof. The best I was able to find are the following articles:

http://appcrawler.com/wordpress/2010/05/11/686/
http://lwn.net/Articles/149888/
http://lwn.net/Articles/149804/


However, logic tells me that it is not possible for every process to have its own, independently maintained page table because there would be no way to ensure coherence. If process A experiences a page fault and gets frame 1234 into its page table, it wouldn't be possible for the process B to see that event without sharing page tables. And shared memory means not only the same content but also the same addresses and sequence number. There would be no way to ensure that without sharing page tables. The proof can be seen from the fact that shared memory is only counted once when you are doing sum of memory consumption per process. It would be absolutely impossible to coordinate access if each process was operating its own map of the shared memory. That is why shared memory is a separate part of kernel, very expensive to implement. One needs exceedingly complex, segment based memory management.

-- 
Mladen Gogala
The Oracle Whisperer
http://mgogala.byethost5.com
Received on Wed Nov 14 2012 - 05:19:37 CET

Original text of this message