public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: manfred@colorfullife.com
Cc: Daniel Robbins <drobbins@gentoo.org>, linux-kernel@vger.kernel.org
Subject: Re: Athlon/AGP issue update
Date: Wed, 23 Jan 2002 11:44:48 +0000	[thread overview]
Message-ID: <5553.1011786288@redhat.com> (raw)
In-Reply-To: <3C4E9291.8DA0BD7F@stud.uni-saarland.de>
In-Reply-To: <3C4E9291.8DA0BD7F@stud.uni-saarland.de>


masp0008@stud.uni-saarland.de said:
>  speculative write operations always set the cache line dirty bit,
> even if the write operations is not executed (e.g. discarded due to a
> mispredicted jump) 

How predictable is this? Dealing with non-coherent memory is perfectly
normal - could we manage to work around this problem by flushing the caches
when the CPU _might_ have dirtied a cache line rather than only when we know
we've actually written to memory? Something like...

--- old.c	Wed Jan 23 11:31:01 2002
+++ new.c	Wed Jan 23 11:30:30 2002
@@ -1,5 +1,7 @@
 
 	if (condition) {
 		writeb();
-		simon_says_flush_cache_page();
 	}
+/* Flush the cache unconditionally - a speculative write may have dirtied
+   the cache line even though it didn't actually happen. */
+		simon_says_flush_cache_page();


Of course, if the behaviour is completely random, and the CPU will dirty
random cache lines from all over the place, even from completely unrelated
code that just happens to have the 'wrong' address in a register that it
doesn't actually end up dereferencing, that can never work.

--
dwmw2



  parent reply	other threads:[~2002-01-23 11:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-23 10:38 Athlon/AGP issue update Studierende der Universitaet des Saarlandes
2002-01-23 11:44 ` David S. Miller
2002-01-23 12:32   ` Momchil Velikov
2002-01-23 12:34     ` David S. Miller
2002-01-23 12:41       ` Momchil Velikov
2002-01-23 14:50   ` Manfred Spraul
2002-01-23 11:44 ` David Woodhouse [this message]
2002-01-23 11:49   ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2002-01-23  9:52 Daniel Robbins
2002-01-23 10:18 ` David S. Miller
2002-01-23  2:46   ` benh
2002-01-23 14:08     ` David S. Miller
2002-01-23 15:47       ` benh
2002-01-25 18:34         ` Val Henson
2002-01-26  0:20           ` Benjamin Herrenschmidt
2002-01-27 19:22             ` Val Henson
2002-01-27 19:32               ` Benjamin Herrenschmidt
2002-01-23 16:31       ` Albert D. Cahalan
2002-01-23 16:57         ` Daniel Robbins
2002-01-23 17:14         ` benh
2002-01-23 23:14           ` Albert D. Cahalan
2002-01-25 18:17             ` Val Henson
2002-01-23 19:20   ` Oliver Neukum
     [not found] ` <200201231010.g0NAAuE05886@Port.imtp.ilyichevsk.odessa.ua>
2002-01-23 10:24   ` David S. Miller
2002-01-23 10:31     ` Rik van Riel
2002-01-23 11:39       ` David S. Miller
2002-01-23 11:39     ` William Lee Irwin III
2002-01-23 11:47       ` David S. Miller
2002-01-23 17:09         ` Albert D. Cahalan
2002-01-23 18:38           ` David S. Miller

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=5553.1011786288@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=drobbins@gentoo.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.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