linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@conectiva.com.br>
To: bcrl@redhat.com
Cc: Kanoj Sarcar <kanoj@google.engr.sgi.com>,
	linux-mm@kvack.org, torvalds@transmeta.com
Subject: Re: [PATCH] workaround for lost dirty bits on x86 SMP
Date: Mon, 11 Sep 2000 22:56:43 -0300 (BRST)	[thread overview]
Message-ID: <Pine.LNX.4.21.0009112253490.1323-100000@duckman.distro.conectiva> (raw)
In-Reply-To: <Pine.LNX.3.96.1000911210010.7937B-100000@kanga.kvack.org>

On Mon, 11 Sep 2000 bcrl@redhat.com wrote:
> On Mon, 11 Sep 2000, Kanoj Sarcar wrote:
> 
> > One of the worst races is in the page stealing path, when the stealer
> > thread checks whether the page is dirty, decides to pte_clear(), and
> > right then, the user dirties the pte, before the stealer thread has done
> > the flush_tlb. Are you trying to handle this situation?
> 
> That's the one.  It also crops up in msync, munmap and such.

And (IMHO the worst one) in try_to_swap_out...

     55         if (pte_young(pte)) {
     56                 /*
     57                  * Transfer the "accessed" bit from the page
     58                  * tables to the global page map.
     59                  */
     60                 set_pte(page_table, pte_mkold(pte));

Imagine what would happen if the CPU would mark a page
dirty while we are here...

CPU#0:			CPU#1:
(kswapd)		(user process)

read pte
...
			replace TLB entry / write dirty bit
set_pte()


And we've lost the dirty bit ...

regards,

Rik
--
"What you're running that piece of shit Gnome?!?!"
       -- Miguel de Icaza, UKUUG 2000

http://www.conectiva.com/		http://www.surriel.com/

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

  reply	other threads:[~2000-09-12  1:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-12  0:43 Ben LaHaise
2000-09-12  0:59 ` Kanoj Sarcar
2000-09-12  1:36   ` bcrl
2000-09-12  1:56     ` Rik van Riel [this message]
2000-09-12  2:34     ` Kanoj Sarcar
2000-09-12  3:39       ` Benjamin C.R. LaHaise
2000-09-12  6:13         ` Kanoj Sarcar
2000-09-12 10:24     ` Stephen C. Tweedie
2000-09-12 16:54       ` Ben LaHaise
2000-09-15 19:56 ` Linus Torvalds

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.4.21.0009112253490.1323-100000@duckman.distro.conectiva \
    --to=riel@conectiva.com.br \
    --cc=bcrl@redhat.com \
    --cc=kanoj@google.engr.sgi.com \
    --cc=linux-mm@kvack.org \
    --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