linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@e-mind.com>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: linux-kernel@vger.rutgers.edu, linux-mm@kvack.org,
	Linus Torvalds <torvalds@transmeta.com>
Subject: Re: PG_clean for shared mapping smart syncing
Date: Sat, 19 Dec 1998 17:37:03 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.3.96.981219173054.756A-100000@laser.bogus> (raw)
In-Reply-To: <Pine.LNX.3.96.981219172526.648A-100000@laser.bogus>

On Sat, 19 Dec 1998, Andrea Arcangeli wrote:

>The only reason to add a bitflag in the page->flags field is to avoid
>us to play with the pte. Now the pte is used only to set the page readonly
>to allow us to remove the clean flag at the first page fault.

Ah but I just found a problem... When we set the PG_clean flag on the page
we should set the pte readonly for that page in all process vm and not
only in the process running. But if we must play with the page table it's
easier to directly set the page as clean as I was used to do with my
previous update_shared_mappings() patch. So I think we could drop
completly my last patch and return to my old code and solve the problem to
handle the mmap_sem locking right...

To get the locking right I think we could do something like:

if (sharedmapping)
{

	for_each_process_that_shares_the_mmap(p)
		down(&p->mm->mmap_sem);
} else {
	down(&current->mm->mmap_sem);
}

for_each_process_that_shares_the_mmap() will return processes always in
the same order relative to how the mappings are ordered in the the inode.

comments?

Andrea Arcangeli

--
This is a majordomo managed list.  To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org

  reply	other threads:[~1998-12-19 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-19 16:04 Andrea Arcangeli
1998-12-19 16:17 ` Stephen C. Tweedie
1998-12-19 16:27   ` Andrea Arcangeli
1998-12-19 16:37     ` Andrea Arcangeli [this message]
1998-12-19 16:46       ` Andrea Arcangeli
1998-12-19 17:10       ` Stephen C. Tweedie
1998-12-19 16:23 ` Andrea Arcangeli
1998-12-19 16:36   ` Stephen C. Tweedie

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=Pine.LNX.3.96.981219173054.756A-100000@laser.bogus \
    --to=andrea@e-mind.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    --cc=sct@redhat.com \
    --cc=torvalds@transmeta.com \
    /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