linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Benjamin C.R. LaHaise" <blah@kvack.org>
To: Kanoj Sarcar <kanoj@google.engr.sgi.com>
Cc: linux-mm@kvack.org, torvalds@transmeta.com
Subject: Re: [PATCH] workaround for lost dirty bits on x86 SMP
Date: Mon, 11 Sep 2000 23:39:31 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.3.96.1000911231400.11709A-100000@kanga.kvack.org> (raw)
In-Reply-To: <200009120234.TAA39381@google.engr.sgi.com>

On Mon, 11 Sep 2000, Kanoj Sarcar wrote:

> Not really, I thought I had it in a state where the bare minimum
> was being done. Of course, this was the non-PAE version ...

PAE already has to do the atomic updates, and could possibly withstand a
couple of tweaks: eg clear_pte should be okay if it is a locked clear of
the present bit and non-atomic clear of the high bits.

[...]
> With the above type of apps, you do not need too high a _memory_ pressure
> to trigger this, just compute pressure. Each time you come in to drop in
> the "dirty" bit, you would need to do establish_pte(), which does a 
> flush_tlb_page(), which gets costly when you have higher cpu counts. 

If the process is active, it will be updating the accessed bit on a
regular basis, so there will be no need to clear the dirty bit.  Also, we
mark mappings dirty early, so there is no extra fault on the typical case
of writing to data.  If the process was sharing the page read only (ie
zero page), it would still have had to do the tlb flush anyways.  As for
the tlb flushing in establish_pte, we should be avoiding the cross cpu tlb
flush since any other processor would take a write fault, at which it
would update its tlb.  establish_pte is only called from 3 places, two of
which are passing in the same page with either the accessed, dirty or
write bits enabled.

> This of course depends on how smart flush_tlb_page is, and the processor
> involved.

We're only talking about x86 SMP. =)  I think it and m68k SMP (which isn't
implemented afair) are the only vulnerable platforms to this problem
(since all others implement dirty bits in software).

		-ben

--
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  3:39 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
2000-09-12  2:34     ` Kanoj Sarcar
2000-09-12  3:39       ` Benjamin C.R. LaHaise [this message]
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.3.96.1000911231400.11709A-100000@kanga.kvack.org \
    --to=blah@kvack.org \
    --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