Re: Large pages

From: Jonathan Lewis <>
Date: Wed, 14 Nov 2012 09:14:55 -0000
Message-ID: <>

"Mladen Gogala" <> wrote in message
| 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:
| 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
| 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
| --
| Mladen Gogala
| The Oracle Whisperer


Thanks for the comments and links. I'll be following this stuff up to see where I went wrong.

In passing - logic also dictates that I ask the question:

    What happens if I attached to a shared memory segment AFTER I've allocated a load of private memory and the (logical) addresses in the page table for the private memory overlap the logical addresses in the page table for the shared memory segment ? Clearly one can bypass the issue with a little thought - e.g. by allocating from high logical addresses downwards for shared and low upwards for private - but I hadn't previously thought that point through.)


Jonathan Lewis

Author: Oracle Core (Apress 2011) Received on Wed Nov 14 2012 - 10:14:55 CET

Original text of this message