From: Eric Anholt <eric@anholt.net>
To: Jan Beulich <JBeulich@novell.com>, Brice.Goglin@ens-lyon.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: intel_i830_chipset_flush(): local clflush() vs. global wbinvd()
Date: Tue, 27 Apr 2010 16:00:30 -0700 [thread overview]
Message-ID: <8739ygwlf5.fsf@pollan.anholt.net> (raw)
In-Reply-To: <4BD5787C020000780003C1DB@vpn.id2.novell.com>
[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]
On Mon, 26 Apr 2010 10:26:52 +0100, "Jan Beulich" <JBeulich@novell.com> wrote:
> Eric, Brice,
>
> what is the point of issuing wbinvd() on all CPUs here if clflush isn't
> available, but using clflush() (if available) only on the current CPU?
From the IA-32 architecture manuals:
WBINVD: "Writes back all modified cache lines in the processor’s
internal cache to main memory and invalidates (flushes) the
internal caches. The instruction then issues a special-
function bus cycle that directs external caches to also write
back modified data and another bus cycle to indicate that the
external caches should be invalidated.
CLFLUSH: "Invalidates the cache line that contains the linear address
specified with the source operand from all levels of the
processor cache hierarchy (data and instruction). The
invalidation is broadcast throughout the cache coherence
domain. If, at any level of the cache hierarchy, the line is
inconsistent with memory (dirty) it is written to memory
before invalidation. The source operand is a byte memory
location.
My reading of these two is that wbinvd affects this processor's cache
lines, while clflush affects the cacheline regardless of which CPU owns
it since they all share the same coherence domain.
Given that on many systems without CLFLUSH (8xx chipsets), we have
issues with getting coherence to external memory successfully (note how
neither of those instructions provide that!), I'm not sure it's a good
time to be worrying about how to improve cache flushing performance on them!
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2010-04-27 23:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 9:26 Jan Beulich
2010-04-27 23:00 ` Eric Anholt [this message]
2010-04-28 11:47 ` Jan Beulich
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=8739ygwlf5.fsf@pollan.anholt.net \
--to=eric@anholt.net \
--cc=Brice.Goglin@ens-lyon.org \
--cc=JBeulich@novell.com \
--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
Powered by JetHome