From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,85404311f8041f7a X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,5747331edea7cbab X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-07-13 00:19:54 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!130.133.1.3!fu-berlin.de!server1.netnews.ja.net!newsfeed.ed.ac.uk!holyrood.ed.ac.uk!pboyle From: Peter Boyle Newsgroups: comp.sys.dec,comp.arch Subject: Re: CPU failure in an SMP system (was Re: Compaq kills Alpha) Date: Fri, 13 Jul 2001 08:03:21 +0100 Organization: Edinburgh University Message-ID: References: <994616870.688233@haldjas.folklore.ee> <9ia9d4$rmd$1@pyrite.mv.net> <994669498.392616@haldjas.folklore.ee> <9ic7t1$qpi$2@bob.news.rcn.net> <994693157.444120@haldjas.folklore.ee> <9ieom7$7hi$5@bob.news.rcn.net> <994788809.635761@haldjas.folklore.ee> <9ihggj$6ag$3@bob.news.rcn.net> <3b4c75ea$0$25358$6e365a64@newsreader02.highway.telekom.at> <9ik7r7$1s3$3@bob.news.rcn.net> <9ikjh9$11d2$1@news.rchland.ibm.com> <9ilud8$464$1@nnrp2.phx.gblx.net> NNTP-Posting-Host: holyrood.ed.ac.uk Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: scotsman.ed.ac.uk 995008789 7615 129.215.16.14 (13 Jul 2001 07:19:49 GMT) X-Complaints-To: usenet@scotsman.ed.ac.uk NNTP-Posting-Date: 13 Jul 2001 07:19:49 GMT In-Reply-To: Xref: archiver1.google.com comp.sys.dec:5719 comp.arch:13858 On Fri, 13 Jul 2001, mulp wrote: > "Peter Boyle" wrote in message > > "Suppose a store operation is followed by a cache(line) invalidation. > > > > A write through cache guarantees the corresponding read returns the value > written. > > A write back cache does not." > Wrong!!! A store can only be followed by an "invalidate" if the cache is > write thru. Hi, No - you can (on PowerPC) invalidate whenever using the dcbi instruction. The results are, of course, only "sensible" if the cache is write through and that is both my point, and the reason it is a priveledged instruction. > When the cache line is dirty with a writeback cache and you > need to free the cache line, its called a "victim write" and the data is > written somewhere more persistent, which may or may not be memory. That is a flush (or eviction) rather than an invalidate. > No matter what kind of cache, a CPU that writes to an address will always > read back the data that it wrote unless that location has been written by > another CPU since both last synchronize memory, in which case the data read > will either be the data written or the data written by the other CPU. at I am using a embedded PPC board right now: If I set up the tlb to map 0xDE000000 as writeback and 0xB0100000 as write through and run the following: lis %r11,0xDE00 ! Write back lis %r12,0xB010 ! Write through li %r9,0x0F li %r10,0xFF stw %r9,0(%r11) ! Stores 0x0F stw %r9,0(%r12) sync dcbf %r0,%r11 ! 0x00 Makes it back to mem dcbf %r0,%r12 sync stw %r10,0(%r11)! Stores 0xFF stw %r10,0(%r12) sync dcbi %r0,%r11 ! Invalidation kills the write-back copy dcbi %r0,%r12 ! But the write through already made it sync lwz %r14,0(%r11) ! reads in the memory lwz %r15,0(%r12) ! and gets different answers It ends up with: %r14 = 0x0F %r15 = 0xFF Now for the jokes about coherent arguments.... Peter