From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Luca Barbieri <ldb@ldb.ods.org>
Cc: "J.A. Magallon" <jamagallon@able.es>,
Linux-Kernel ML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [RFC] [2.5 i386] GCC 3.1 -march support, PPRO_FENCE reduction, prefetch fixes and other CPU-related changes
Date: 05 Aug 2002 10:49:14 +0100 [thread overview]
Message-ID: <1028540954.16550.26.camel@irongate.swansea.linux.org.uk> (raw)
In-Reply-To: <1028535126.1572.48.camel@ldb>
On Mon, 2002-08-05 at 09:12, Luca Barbieri wrote:
> So I'm only replacing the lock; addl $0,0(%%esp) with the Xfence
> instructions which are more efficient.
The original code has rmb not doing any kind of CPU operation, and wmb
likewise. (Quoting 2.4 and 2.5.29 here)
You don't need stronger barriers except on the Pentium Pro or the
Winchip because of the guarantees already made by the processor and by
the PCI interface.
The only case you need a store fence with non buggy/weird processors is
when you do non temporal stores. In that situation the barriers are
still not needed because the non temporal using functions already have
their own sfence instructions and need them.
#define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)":
:"memory")
#define rmb() mb()
#ifdef CONFIG_X86_OOSTORE
#define wmb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": :
:"memory")
#else
#define wmb() __asm__ __volatile__ ("": : :"memory")
#endif
For the PPro a lock addl is the most efficient one I know of for working
around the store order errata. If you want to optimise it further then
the winchip appears to be fractionally faster using an rdmsr() but that
impacts registers so wants more profiling
next prev parent reply other threads:[~2002-08-05 8:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-04 14:27 Luca Barbieri
2002-08-04 14:36 ` Thunder from the hill
2002-08-04 15:32 ` Sebastian Droege
2002-08-04 15:43 ` Luca Barbieri
2002-08-04 15:50 ` Alan Cox
2002-08-04 14:44 ` Luca Barbieri
2002-08-04 18:59 ` J.A. Magallon
2002-08-04 20:23 ` Luca Barbieri
2002-08-04 21:51 ` Alan Cox
2002-08-04 21:54 ` Alan Cox
2002-08-04 20:43 ` Luca Barbieri
2002-08-05 0:02 ` Alan Cox
2002-08-05 8:12 ` Luca Barbieri
2002-08-05 9:49 ` Alan Cox [this message]
2002-08-05 9:31 ` Luca Barbieri
2002-08-05 11:05 ` Alan Cox
2002-08-05 9:53 ` Luca Barbieri
2002-08-05 11:26 ` Alan Cox
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=1028540954.16550.26.camel@irongate.swansea.linux.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=jamagallon@able.es \
--cc=ldb@ldb.ods.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®