From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Zachary Amsden <zach@vmware.com>
Cc: Andrew Morton <akpm@osdl.com>,
Linux-Kernel <linux-kernel@vger.kernel.org>,
Hugh Dickins <hugh@veritas.com>,
Jan Beulich <jbeulich@novell.com>,
Keir Fraser <Keir.Fraser@cl.cam.ac.uk>,
Pratap Subrahmanyam <pratap@vmware.com>
Subject: Re: [PATCH 2/2] I386 convert pae wmb to non smp
Date: Thu, 27 Apr 2006 10:00:34 +1000 [thread overview]
Message-ID: <445009A2.3030305@yahoo.com.au> (raw)
In-Reply-To: <200604262203.k3QM3qOC009581@zach-dev.vmware.com>
Zachary Amsden wrote:
>Similar to the last bug, on set_pte, we don't want the compiler to re-order
>the write of the PTE, even in non-SMP configurations, since if the write of
>the low word occurs first, the TLB could prefetch a bad highmem mapping which
>has been aliased into low memory.
>
wmb() means that it also orders IO memory. It is no difference for
i386, but smp_wmb() actually has the right semantics of the abstract
Linux memory model.
>Signed-off-by: Zachary Amsden <zach@vmware.com>
>
>Index: linux-2.6.17-rc/include/asm-i386/pgtable-3level.h
>===================================================================
>--- linux-2.6.17-rc.orig/include/asm-i386/pgtable-3level.h 2006-04-26 08:38:57.000000000 -0700
>+++ linux-2.6.17-rc/include/asm-i386/pgtable-3level.h 2006-04-26 14:45:12.000000000 -0700
>@@ -53,7 +53,7 @@ static inline int pte_exec_kernel(pte_t
> static inline void set_pte(pte_t *ptep, pte_t pte)
> {
> ptep->pte_high = pte.pte_high;
>- smp_wmb();
>+ wmb();
> ptep->pte_low = pte.pte_low;
> }
> #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
>
>
>
Send instant messages to your online friends http://au.messenger.yahoo.com
next prev parent reply other threads:[~2006-04-27 0:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-26 22:03 [PATCH 2/2] I386 convert pae wmb to non smp Zachary Amsden
2006-04-27 0:00 ` Nick Piggin [this message]
2006-04-27 1:09 ` Zachary Amsden
2006-04-27 3:30 ` Nick Piggin
2006-04-27 8:21 ` Keir Fraser
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=445009A2.3030305@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=akpm@osdl.com \
--cc=hugh@veritas.com \
--cc=jbeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pratap@vmware.com \
--cc=zach@vmware.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