public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Zoltan Menyhart <Zoltan.Menyhart@bull.net>
To: linux-ia64@vger.kernel.org
Subject: Re: Fix race in the accessed/dirty bit handlers
Date: Fri, 10 Mar 2006 09:47:21 +0000	[thread overview]
Message-ID: <44114B29.7080805@bull.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0603071901420.2463@schroedinger.engr.sgi.com>

> CPU A        CPU B       | CPU A       CPU B     | cpu A    cpu B
> -----        -----       | -----       -----     | -----    -----
>              change pte  |                       |
>                          |                       |
> read pte                 |read pte               |read pte
> insert TLB               |           change pte  |insert
> re-read                  |insert                 |re-read
>                          |re-read                |          change pte
>                          |ptc.l

These scenarii assume that the sequence:

	insert TLB
	;;
	re-read

is executed in the same order for everyone as it is coded.

I think a ";;" not sufficient to make sure that the external
visibility of the "itc" to generated purges is established
first for everyone, before the "re-read" becomes visible.

> The manual states that serialization is only necessary before a data 
> access uses the mapping.

It also states on page 3:127:

"The visibility of the itc instruction to generated purges (ptc.g, ptc.ga) 
must occur before subsequent memory operations. From a software 
perspective, this is similar to acquire semantics. Serialization is still 
required to observe the side-effects of the translation being present."

> We do not use the mapping in the function we are 
> discussing

Agreed.

> and I would think that the rfi is certainly serialization 
> enough.

... for the future user mode accesses.

I consider an "itc" as completed when:
1. The new (local) translation is available for any new load / store request
2. There is no chance any more to miss an external purge request

I think we can agree on the 1st point.

As far as the 2nd one is concerned:
In order not to break our synchronization algorithm,
we need here to make sure that the external visibility of the "itc" to
generated purges is established first for everyone, before the "re-read"
becomes visible.

The only instruction I know of to synchronize with the "itc" mechanism is
the "srlz" instruction.

Thanks,

Zoltan



  parent reply	other threads:[~2006-03-10  9:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-08  3:05 Fix race in the accessed/dirty bit handlers Christoph Lameter
2006-03-08 10:48 ` Robin Holt
2006-03-08 15:33 ` Christoph Lameter
2006-03-08 21:59 ` Chen, Kenneth W
2006-03-08 22:04 ` Christoph Lameter
2006-03-08 22:25 ` Luck, Tony
2006-03-08 22:32 ` Christoph Lameter
2006-03-08 23:56 ` Luck, Tony
2006-03-09  0:21 ` Christoph Lameter
2006-03-09 13:35 ` Zoltan Menyhart
2006-03-09 16:23 ` Christoph Lameter
2006-03-09 18:09 ` Zoltan Menyhart
2006-03-09 18:27 ` Christoph Lameter
2006-03-09 18:33 ` David Mosberger-Tang
2006-03-09 19:44 ` Chen, Kenneth W
2006-03-10  9:47 ` Zoltan Menyhart [this message]
2006-03-10  9:54 ` Christian Hildner
2006-03-10 10:40 ` Zoltan Menyhart
2006-03-10 16:47 ` Luck, Tony
2006-03-10 17:11 ` Zoltan Menyhart
2006-03-10 17:22 ` Chen, Kenneth W
2006-03-10 17:28 ` Luck, Tony
2006-03-10 17:29 ` Chen, Kenneth W
2006-03-13  9:13 ` Zoltan Menyhart

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=44114B29.7080805@bull.net \
    --to=zoltan.menyhart@bull.net \
    --cc=linux-ia64@vger.kernel.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