From: Andi Kleen <ak@suse.de>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Benjamin LaHaise <bcrl@kvack.org>, Ingo Molnar <mingo@elte.hu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: What protects cpu_tlbstate?
Date: Thu, 5 Apr 2007 23:03:35 +0200 [thread overview]
Message-ID: <200704052303.35846.ak@suse.de> (raw)
In-Reply-To: <46156366.70206@goop.org>
On Thursday 05 April 2007 23:00:22 Jeremy Fitzhardinge wrote:
> Andi Kleen wrote:
> > The interrupts can only happen when the other CPU is already lazy
> > and enter_lazy_tlb would be a nop then. The flushers itself are
> > synchronized by the page_table_lock or the mm semaphore.
> >
> > Against switch_mm it tries to protect with ordering.
> >
> > wmb()s are not needed on x86 (ok minus errata on ppro and
> > VIA magic mode but which is UP only). That would leave some rmb()s,
> > but I don't see any place they would be needed.
> >
>
> Hm, I was more wondering about simple compiler reordering. Does the
> relative order of setting and reading cpu_tlbstate.state, active_mm and
> the mm->cpu_vm_mask matter?
Hmm, perhaps a barrier between state and active_mm might be a good idea.
Setting active_mm after state might be problematic.
cpu_vm_mask should be already a memory barrier.
-Andi
next prev parent reply other threads:[~2007-04-05 21:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-05 19:44 What protects cpu_tlbstate? Jeremy Fitzhardinge
2007-04-05 20:28 ` Andi Kleen
2007-04-05 21:00 ` Jeremy Fitzhardinge
2007-04-05 21:03 ` Andi Kleen [this message]
2007-04-05 21:08 ` Jeremy Fitzhardinge
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=200704052303.35846.ak@suse.de \
--to=ak@suse.de \
--cc=bcrl@kvack.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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