From: kanoj@google.engr.sgi.com (Kanoj Sarcar)
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Manfred Spraul <manfreds@colorfullife.com>,
linux-kernel@vger.rutgers.edu, linux-mm@kvack.org,
torvalds@transmeta.com, davem@redhat.com
Subject: Re: zap_page_range(): TLB flush race
Date: Sat, 8 Apr 2000 16:54:32 -0700 (PDT) [thread overview]
Message-ID: <200004082354.QAA62699@google.engr.sgi.com> (raw)
In-Reply-To: <E12e4mo-0003Pn-00@the-village.bc.nu> from "Alan Cox" at Apr 09, 2000 12:37:05 AM
>
> > > Yes, establish_pte() is broken. We should reverse the calls:
> > >
> > > set_pte(); /* update the kernel page tables */
> > > update_mmu(); /* update architecture specific page tables. */
> > > flush_tlb(); /* and flush the hardware tlb */
> > >
> >
> > People are aware of this too, it was introduced during the 390 merge.
> > I tried talking to the IBM guy about this, I didn't see a response from
> > him ...
>
> Strange since I did and it included you
Yes, I did get the first mail from the IBM guy (was he from Denmark, seem
to have seen ibm.de in his email?) explaining why the 390 wanted this
ordering ... In response, I pointed out that the 390 was either prone
to other races then, or was doing something in its low level handlers,
and could he please confirm what is the case?
Let me remember: he mentioned the old pte must be around for the ipte(?)
instruction to flush the tlb. If the new pte is dropped in before, the
flush fails, the stale tlb entry stays, problems happen. So I pointed out
other places which do set_pte, then flush_tlb. I also wanted to know
whether the flush_tlb somehow makes sure that other threads/cpus can not
pull in the old translation till the set_pte completes (something like
what freeze_pte_* does in my patch). I did not receive a response to this.
>
> > I think what we now need is a critical mass, something that will make us
> > go "okay, lets just fix these races once and for all".
>
> Basically establish_pte() has to be architecture specific, as some processors
> need different orders either to avoid races or to handle cpu specific
> limitations.
Even if you did that, wouldn't it just mean that the 390 would still be
prone to races, but other platforms are not? Of course, that's much
better than having all platforms be prone to the race!
And we should also handle the generic races with clones and ptes, an
example of which Manfred just demonstrated.
Kanoj
>
> Alan
>
> --
> 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/
>
--
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/
next prev parent reply other threads:[~2000-04-08 23:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-08 20:06 zap_page_range(): TLB flush race Manfred Spraul
2000-04-08 21:11 ` Kanoj Sarcar
2000-04-08 22:46 ` Manfred Spraul
2000-04-08 23:31 ` Kanoj Sarcar
2000-04-08 23:37 ` Alan Cox
2000-04-08 23:54 ` Kanoj Sarcar [this message]
2000-04-09 9:10 ` Manfred Spraul
2000-04-09 9:19 ` David S. Miller
2000-04-10 22:21 ` Stephen C. Tweedie
2000-04-10 23:12 ` David S. Miller
2000-04-11 9:14 ` Stephen C. Tweedie
2000-04-11 14:41 ` Manfred Spraul
2000-04-11 16:40 ` Andrea Arcangeli
2000-04-11 17:45 ` Manfred Spraul
2000-04-11 18:14 ` Kanoj Sarcar
2000-04-12 10:02 ` Jamie Lokier
2000-04-11 11:56 ` Alan Cox
2000-04-08 23:44 ` David S. Miller
2000-04-09 0:20 ` Kanoj Sarcar
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=200004082354.QAA62699@google.engr.sgi.com \
--to=kanoj@google.engr.sgi.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=manfreds@colorfullife.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