From: ebiederm+eric@ccr.net (Eric W. Biederman)
To: Colin Plumb <colin@nyx.net>
Cc: linux-mm@kvack.org
Subject: Re: Why don't shared anonymous mappings work?
Date: 06 Jan 1999 13:51:00 -0600 [thread overview]
Message-ID: <m1d84sgoyj.fsf@flinx.ccr.net> (raw)
In-Reply-To: Colin Plumb's message of "Wed, 6 Jan 1999 08:23:35 -0700 (MST)"
>>>>> "CP" == Colin Plumb <colin@nyx.net> writes:
>> Take a page map it into two processes.
>> Swap the page out from both processes to disk.
>> The swap address is now in the pte's.
>> Bring that page into process 1.
>> Dirty the page, thus causing a new swap entry to be allocated.
>> ( The write once rule)
>> Swap the page out of process 1.
>>
>> Oops process 1 and process 2 have different pte's for the same
>> page.
>>
>> Since we don't have any form of reverse page table entry
>> preventing that last case is difficult to do effciently.
CP> Um, but what if, as I was suggesting, we *don't* allocate a new swap
CP> entry when the page is dirtied? That is, when do_wp_page sees that the
CP> page is in the swap cache, it looks at swap_map, sees that is greater
CP> than 2, and leaves it as a writeable swap-cached page.
Sorry I must have misread that part.
I guess the final trick would be to make sure we always bring a shared
memory area into a processes address space because so that we can ensure
it will get swapped out, and the pte put in the processes address space.
Currently vma's won't merge unless your offsets are contigous, which
we can't garantee for swap space, and having multiple vmas would be a real pain.
Handling /proc/self/mem mappings into the same process correctly
could be interesting however. Because the definition of private and
shared gets a little muddled....
The only reason remaining that I can think of why it isn't there
is that
a) no one wrote the code
b) It is very close to 2.2
Eric
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
next parent reply other threads:[~1999-01-06 19:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <199901061523.IAA14788@nyx10.nyx.net>
1999-01-06 19:51 ` Eric W. Biederman [this message]
1999-01-07 5:55 ` Eric W. Biederman
1999-01-13 20:21 ` Stephen C. Tweedie
1999-01-15 6:43 Colin Plumb
-- strict thread matches above, loose matches on Subject: below --
1999-01-14 3:07 Colin Plumb
1999-01-15 6:07 ` Benjamin C.R. LaHaise
1999-01-13 21:31 Colin Plumb
1999-01-19 14:32 ` Stephen C. Tweedie
1999-01-19 15:23 ` Eric W. Biederman
1999-01-05 12:51 Colin Plumb
1999-01-06 4:05 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1d84sgoyj.fsf@flinx.ccr.net \
--to=ebiederm+eric@ccr.net \
--cc=colin@nyx.net \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox