13-Dec-2019 23:31 GMT.
UNDER CONSTRUCTION
[Events] Notes about my presentation at the Alchimie 4 showANN.lu
Posted on 29-Sep-2004 10:40 GMT by Stéphane Guillard427 comments
View flat
View list
The html pages I made available was only a starter slideshow for my presentation. Here are a few words about what I shown, and what I said. Hi Gentlemen,

The html pages which are available at my site are just an introduction slideshow that I presented as a starter, it does not relate what I shown and said afterwards. Please find below a couple of notes about my presentation at Alchimie show.

Here is a quick summary of the presentation I did :

- I booted with boot delays set to 1 second for UBoot and for SLB (second level booter), thus less than 20 seconds after power on, we were with a fully loaded Workbench with Amidock.

- I started with the small html slideshow, presented on IBrowse. You can find those pages at the URL above. IBrowse loaded in 2 seconds with its About: page fully displayed. Browsing through the pages of the slideshow was instantaneous.

- While we were at it, I browsed the OS4 install guide, also as fast as can be, must say I also find this responsiveness impressive myself :)

Then I demoed as many things as I had time to during the 2 hours I had. Everything worked, fast & stable, and was smooth and impressed. I showed mainly:

- All os4 system, tools, utilities, prefs & stuff

- MUI, IBrowse, Amitradecenter

- Yam, SimpleMail

- ClassAction (M. Elsner's file manager)

- MakeCD

- MooVid running a DivX

- DVPlayer running an mpeg2

- AudioEvolution 4 with the demo project, cursors auto moving smoothly, the playback was smooth also, with mostly no CPU usage.

- AmiPDF with the AE4 manual and another heavy PDF file, very fast

- USB. I plugged a Microsoft IntelliMouse Optical into my USB hub, and we had 2 mice to control the system

- Crisot's slach5 winning demo (got applauses which it deserved)

- chip's rayrace realtime raytracer demo. When the juggler appeared, audience was impressed, but really took measure of what they were watching when I moved the mouse. Wait for the Altivec version !

- FPSE, AmiDog's PS1 emulator, with an oldskool game which ran nicely ('Cotton')

- some other visual toys I had at hand

The demos only grimreaped twice, and I anticipated the grims before they popped up :

- One was native glsokoban / w3d, when I launch it does a base page access (a “null pointer” bug in glsokoban). I didactically shown the disassembly which is available in the grimreaper window, was a store to r4, r4 was null etc. I clicked on continue, and it all went fine & fast.

- One was frying pan 0.3.1, I shown the app, and at one point I said 'now it should grim’ and it did. It still loaded fine though. I quit the app, clicked on reboot and less than 4 secs after, wb was up with amidock. That was the only reboot of the show.

I forgot to show (because of short time):

- Petunia... Almos, sorry, I had prepared something for that (side by side windowed jit & nonjit runs of voxelspace), but i both forgot, and was asked to stop at this point by the party organizers cause it was already 5:30 pm while I was scheduled until 4pm.

- ArtEffect

- USB with MassStorage (ie USB key or digital camera)

At the end, I had many fair questions to which I answered; my feeling is that the audience really appreciated the effort behind what I shown, and was conscious that we are not far away from a releasable 4.0.

Then came the expected question, 'and why doesn’t DMA work ?'

I said 'All what you saw was DMA since the 1st boot'.

I copied a few 100 MB files in a snap, with zero CPU (thanks to Pete Gordon for the clock/CPU docky, helps a lot). Then I switched to PIO, they saw 4 x slower and 80% CPU.

The audience understood that it was indeed DMA, and that was fast, and that was part of the overall smoothness of what I shown.

Then I explained the things below (this is the reference for my statements, please don’t rephrase or extrapolate or invent or whatever):

- IDE UDMA works on VIA and Articia on AmigaOne SE / XE / µA1 MK2 (as I demoed) ...

- ... except when the Ethernet chip goes online and is used.

- the Ethernet chip only triggers the problem, but it is not at all related to it (a test using a PCI Ethernet shows the same behaviour)

- We have made a driver for a Silicon Image 680 PCI IDE UDMA133 controller chip, this does UDMA 133 nicely, including when Ethernet is used at full speed.

- The fact that a PCI IDE controller solution works, shows that the problem is *not* related to Articia, since PCI DMA is *also* handled by the Articia, and that works.

- The full Alchimie show demo was done using UDMA, both from the VIA and from the Si680, without problem (but with Ethernet off, would the Ethernet have been turned online, I would have had to revert the VIA into PIO before).

- Things are currently under more investigation

In the meantime there are 2 options for existing A1 board owners:

- Use the VIA IDE controller in PIO mode when using Ethernet, and UDMA at other times,

- Purchase a faster (UDMA133) Silicon Image 0680 IDE PCI card (from around $20). This is my personally recommended option as the delivered speed is noticeable faster than the on-board VIA controller in UDMA mode.

List of all comments to this article
Sorted by date, most recent at bottom
Comment 1Nicolas Sallin29-Sep-2004 08:57 GMT
Comment 2Menthos29-Sep-2004 09:20 GMT
Comment 3itix29-Sep-2004 09:26 GMT
Comment 4itix29-Sep-2004 09:31 GMT
Comment 5Stefan Burström29-Sep-2004 09:35 GMT
Comment 6Stefan Burström29-Sep-2004 09:36 GMT
Comment 7hooligan/dcsRegistered user29-Sep-2004 09:38 GMT
Comment 8iwonder29-Sep-2004 09:39 GMT
Comment 9Menthos29-Sep-2004 09:42 GMT
Comment 10Peter Gordon29-Sep-2004 10:00 GMT
Comment 11Nicolas Sallin29-Sep-2004 10:17 GMT
Comment 12Peter Gordon29-Sep-2004 10:18 GMT
Comment 13Stéphane Guillard29-Sep-2004 10:23 GMT
Comment 14Anonymous29-Sep-2004 10:38 GMT
Comment 15Peter Gordon29-Sep-2004 10:53 GMT
Comment 16Stéphane Guillard29-Sep-2004 10:57 GMT
Comment 17hooligan/dcsRegistered user29-Sep-2004 10:59 GMT
Comment 18Peter Gordon29-Sep-2004 11:03 GMT
Comment 19Anonymous29-Sep-2004 11:04 GMT
Comment 20Peter Gordon29-Sep-2004 11:09 GMT
Comment 21Andrea Maniero29-Sep-2004 11:23 GMT
Comment 22priest29-Sep-2004 11:25 GMT
Comment 23Christophe DecaniniRegistered user29-Sep-2004 11:29 GMT
Comment 24Anonymous29-Sep-2004 11:29 GMT
Comment 25Anonymous29-Sep-2004 11:34 GMT
Comment 26Johan Rönnblom29-Sep-2004 11:35 GMT
Comment 27Peter Gordon29-Sep-2004 11:36 GMT
Comment 28Johan Rönnblom29-Sep-2004 11:43 GMT
Comment 29Peter Gordon29-Sep-2004 11:50 GMT
Comment 30Anonymous29-Sep-2004 11:51 GMT
Comment 31Anonymous29-Sep-2004 11:55 GMT
Comment 32Stéphane Guillard29-Sep-2004 11:55 GMT
Comment 33Johan Rönnblom29-Sep-2004 11:56 GMT
Comment 34Anonymous29-Sep-2004 11:58 GMT
Comment 35Christophe DecaniniRegistered user29-Sep-2004 11:58 GMT
Comment 36Johan Rönnblom29-Sep-2004 12:00 GMT
Comment 37Anonymous29-Sep-2004 12:00 GMT
Comment 38Davy Wentzler29-Sep-2004 12:01 GMT
Comment 39Johan Rönnblom29-Sep-2004 12:02 GMT
Comment 40Christophe DecaniniRegistered user29-Sep-2004 12:02 GMT
Comment 41Johan Rönnblom29-Sep-2004 12:04 GMT
Comment 42Stefan Burström29-Sep-2004 12:04 GMT
Comment 43Chip29-Sep-2004 12:05 GMT
Comment 44Christophe DecaniniRegistered user29-Sep-2004 12:07 GMT
Comment 45Anonymous29-Sep-2004 12:07 GMT
Comment 46Anonymous29-Sep-2004 12:07 GMT
Comment 47Anonymous29-Sep-2004 12:13 GMT
Comment 48Stéphane Guillard29-Sep-2004 12:15 GMT
Comment 49Don CoxRegistered user29-Sep-2004 12:18 GMT
Comment 50Christophe DecaniniRegistered user29-Sep-2004 12:20 GMT
Comment 51Don CoxRegistered user29-Sep-2004 12:20 GMT
Comment 52itix29-Sep-2004 12:22 GMT
Comment 53Peter Gordon29-Sep-2004 12:23 GMT
Comment 54Christophe DecaniniRegistered user29-Sep-2004 12:24 GMT
Comment 55Davy Wentzler29-Sep-2004 12:25 GMT
Comment 56Amon_ReRegistered user29-Sep-2004 12:25 GMT
Comment 57Christophe DecaniniRegistered user29-Sep-2004 12:26 GMT
Comment 58Don CoxRegistered user29-Sep-2004 12:30 GMT
Comment 59Don CoxRegistered user29-Sep-2004 12:33 GMT
Comment 60Don CoxRegistered user29-Sep-2004 12:36 GMT
Comment 61Hans-Joerg Frieden29-Sep-2004 12:39 GMT
Comment 62Chip29-Sep-2004 12:39 GMT
Comment 63Hans-Joerg Frieden29-Sep-2004 12:40 GMT
Comment 64Johan Rönnblom29-Sep-2004 12:41 GMT
Comment 65Chip29-Sep-2004 12:42 GMT
Comment 66Peter Gordon29-Sep-2004 12:45 GMT
Comment 67Johan Rönnblom29-Sep-2004 12:47 GMT
Comment 68Christophe DecaniniRegistered user29-Sep-2004 12:47 GMT
Comment 69Johan Rönnblom29-Sep-2004 12:50 GMT
Comment 70Chip29-Sep-2004 12:50 GMT
Comment 71Peter Gordon29-Sep-2004 12:50 GMT
Comment 72Joël EHRET29-Sep-2004 12:52 GMT
Comment 73Thomas FriedenRegistered user29-Sep-2004 12:52 GMT
Comment 74Thomas FriedenRegistered user29-Sep-2004 12:55 GMT
Comment 75Johan Rönnblom29-Sep-2004 12:55 GMT
Comment 76Thomas FriedenRegistered user29-Sep-2004 12:56 GMT
Comment 77Johan Rönnblom29-Sep-2004 12:57 GMT
Comment 78Anonymous29-Sep-2004 12:58 GMT
Comment 79Anonymous29-Sep-2004 13:03 GMT
Comment 80Anonymous29-Sep-2004 13:06 GMT
Comment 81Anonymous29-Sep-2004 13:11 GMT
Comment 82Anonymous29-Sep-2004 13:11 GMT
Comment 83Peter Gordon29-Sep-2004 13:12 GMT
Comment 84Johan Rönnblom29-Sep-2004 13:16 GMT
Comment 85Carl Moppett29-Sep-2004 13:17 GMT
Comment 86Carl Moppett29-Sep-2004 13:18 GMT
Comment 87Johan Rönnblom29-Sep-2004 13:18 GMT
Comment 88Fabio AlemagnaRegistered user29-Sep-2004 13:20 GMT
Comment 89Peter Gordon29-Sep-2004 13:21 GMT
Comment 90Christophe DecaniniRegistered user29-Sep-2004 13:24 GMT
Comment 91Peter Gordon29-Sep-2004 13:25 GMT
Comment 92Peter Gordon29-Sep-2004 13:26 GMT
Comment 93Johan Rönnblom29-Sep-2004 13:26 GMT
Comment 94Christophe DecaniniRegistered user29-Sep-2004 13:27 GMT
Comment 95Carl Moppett29-Sep-2004 13:30 GMT
Comment 96Johan Rönnblom29-Sep-2004 13:33 GMT
Comment 97Christophe DecaniniRegistered user29-Sep-2004 13:33 GMT
Comment 98syrtran29-Sep-2004 13:35 GMT
Comment 99Christophe DecaniniRegistered user29-Sep-2004 13:38 GMT
Comment 100Stéphane Guillard29-Sep-2004 13:40 GMT
Comment 101Johan Rönnblom29-Sep-2004 13:41 GMT
Comment 102Thomas FriedenRegistered user29-Sep-2004 13:43 GMT
Comment 103Anonymous29-Sep-2004 13:45 GMT
Comment 104Christophe DecaniniRegistered user29-Sep-2004 13:50 GMT
Comment 105Rassilon29-Sep-2004 13:50 GMT
Comment 106Thomas FriedenRegistered user29-Sep-2004 13:51 GMT
Comment 107priest29-Sep-2004 13:53 GMT
Comment 108Joël EHRET29-Sep-2004 13:57 GMT
Comment 109priest29-Sep-2004 14:02 GMT
Comment 110Christophe DecaniniRegistered user29-Sep-2004 14:03 GMT
Comment 111priest29-Sep-2004 14:04 GMT
Comment 112Fabio AlemagnaRegistered user29-Sep-2004 14:07 GMT
Comment 113Joël EHRET29-Sep-2004 14:08 GMT
Comment 114Thomas FriedenRegistered user29-Sep-2004 14:09 GMT
Comment 115priest29-Sep-2004 14:10 GMT
Comment 116Johan Rönnblom29-Sep-2004 14:11 GMT
Comment 117Christophe DecaniniRegistered user29-Sep-2004 14:12 GMT
Comment 118Joël EHRET29-Sep-2004 14:16 GMT
Comment 119priest29-Sep-2004 14:17 GMT
Comment 120Stéphane Guillard29-Sep-2004 14:18 GMT
Comment 121Anonymous29-Sep-2004 14:19 GMT
Comment 122priest29-Sep-2004 14:19 GMT
Comment 123priest29-Sep-2004 14:24 GMT
Comment 124itix29-Sep-2004 14:31 GMT
Comment 125itix29-Sep-2004 14:33 GMT
Comment 126Thomas FriedenRegistered user29-Sep-2004 14:33 GMT
Comment 127Johan Rönnblom29-Sep-2004 14:34 GMT
Comment 128Joël EHRET29-Sep-2004 14:35 GMT
Comment 129Johan Rönnblom29-Sep-2004 14:36 GMT
Comment 130syrtran29-Sep-2004 14:36 GMT
Comment 131Johan Rönnblom29-Sep-2004 14:41 GMT
Comment 132Christophe DecaniniRegistered user29-Sep-2004 14:42 GMT
Comment 133Johan Rönnblom29-Sep-2004 14:46 GMT
Comment 134Christophe DecaniniRegistered user29-Sep-2004 14:51 GMT
Comment 135priest29-Sep-2004 14:53 GMT
Comment 136Johan Rönnblom29-Sep-2004 14:54 GMT
Comment 137hooligan/dcsRegistered user29-Sep-2004 14:55 GMT
Comment 138AmiTroll29-Sep-2004 14:57 GMT
Comment 139scheduler29-Sep-2004 14:57 GMT
Comment 140priest29-Sep-2004 14:57 GMT
Comment 141Johan Rönnblom29-Sep-2004 14:58 GMT
Comment 142itix29-Sep-2004 14:59 GMT
Comment 143Johan Rönnblom29-Sep-2004 15:00 GMT
Comment 144Fabio AlemagnaRegistered user29-Sep-2004 15:00 GMT
Comment 145priest29-Sep-2004 15:11 GMT
Comment 146Christophe DecaniniRegistered user29-Sep-2004 15:17 GMT
Comment 147priest29-Sep-2004 15:18 GMT
Comment 148Johan Rönnblom29-Sep-2004 15:19 GMT
Comment 149Bernie MeyerRegistered user29-Sep-2004 15:23 GMT
Comment 150Christophe DecaniniRegistered user29-Sep-2004 15:23 GMT
Comment 151priest29-Sep-2004 15:30 GMT
Comment 152Amon_ReRegistered user29-Sep-2004 15:35 GMT
Comment 153Anonymous29-Sep-2004 15:41 GMT
Comment 154Don CoxRegistered user29-Sep-2004 15:44 GMT
Comment 155Don CoxRegistered user29-Sep-2004 15:48 GMT
Comment 156Don CoxRegistered user29-Sep-2004 15:53 GMT
Comment 157Anonymous29-Sep-2004 15:56 GMT
Comment 158Anonymous29-Sep-2004 16:03 GMT
Comment 159Sammy Nordström29-Sep-2004 16:04 GMT
Comment 160Fabio AlemagnaRegistered user29-Sep-2004 16:09 GMT
Comment 161Christophe DecaniniRegistered user29-Sep-2004 16:10 GMT
Comment 162Thomas Würgler/PaganRegistered user29-Sep-2004 16:13 GMT
Comment 163Christophe DecaniniRegistered user29-Sep-2004 16:15 GMT
Comment 164Christophe DecaniniRegistered user29-Sep-2004 16:18 GMT
Comment 165Christophe DecaniniRegistered user29-Sep-2004 16:22 GMT
Comment 166Christophe DecaniniRegistered user29-Sep-2004 16:25 GMT
Comment 167Amon_ReRegistered user29-Sep-2004 16:30 GMT
Comment 168Christophe DecaniniRegistered user29-Sep-2004 16:34 GMT
Comment 169Amon_ReRegistered user29-Sep-2004 16:41 GMT
Comment 170Sammy Nordström29-Sep-2004 16:43 GMT
Comment 171Fabio AlemagnaRegistered user29-Sep-2004 16:48 GMT
Comment 172Sammy Nordström29-Sep-2004 16:52 GMT
Comment 173Sammy Nordström29-Sep-2004 16:53 GMT
Comment 174Fabio AlemagnaRegistered user29-Sep-2004 16:57 GMT
Comment 175Sammy Nordström29-Sep-2004 17:04 GMT
Comment 176MikeB29-Sep-2004 17:12 GMT
Comment 177Rafo29-Sep-2004 17:14 GMT
Comment 178MikeB29-Sep-2004 17:28 GMT
Comment 179Anonymous29-Sep-2004 17:46 GMT
Comment 180Johan Rönnblom29-Sep-2004 18:10 GMT
Comment 181Christophe DecaniniRegistered user29-Sep-2004 18:12 GMT
Comment 182Asemoon29-Sep-2004 18:19 GMT
Comment 183Christophe DecaniniRegistered user29-Sep-2004 18:25 GMT
Comment 184MikeB29-Sep-2004 18:38 GMT
Comment 185MikeB29-Sep-2004 19:11 GMT
Comment 186XraalE29-Sep-2004 19:12 GMT
Comment 187Asemoon29-Sep-2004 19:19 GMT
Comment 188Sammy Nordström29-Sep-2004 19:19 GMT
Comment 189MikeB29-Sep-2004 19:27 GMT
Comment 190Agima29-Sep-2004 19:32 GMT
Comment 191DarrinRegistered user29-Sep-2004 19:34 GMT
Comment 192MikeB29-Sep-2004 19:38 GMT
Comment 193Anonymous29-Sep-2004 20:05 GMT
Comment 194MikeB29-Sep-2004 20:13 GMT
Comment 195Fabio AlemagnaRegistered user29-Sep-2004 20:43 GMT
Comment 196smithy29-Sep-2004 20:46 GMT
Comment 197XraalE29-Sep-2004 20:54 GMT
Comment 198Agima29-Sep-2004 21:00 GMT
Comment 199Agima29-Sep-2004 21:07 GMT
Comment 200Lando29-Sep-2004 21:11 GMT
Comment 201Abuse29-Sep-2004 23:12 GMT
Comment 202STRICQ29-Sep-2004 23:40 GMT
Comment 203Tryo30-Sep-2004 01:58 GMT
Comment 204AbuseRegistered user30-Sep-2004 02:14 GMT
Comment 205James Carroll30-Sep-2004 03:05 GMT
Comment 206JKD30-Sep-2004 03:25 GMT
Comment 207hooligan/dcsRegistered user30-Sep-2004 03:33 GMT
Comment 208brotheris30-Sep-2004 03:52 GMT
Comment 209Nicolas DET30-Sep-2004 04:20 GMT
Comment 210Anonymous30-Sep-2004 04:22 GMT
Comment 211Anonymous30-Sep-2004 04:25 GMT
Comment 212MikeB30-Sep-2004 04:51 GMT
Comment 213Anonymous30-Sep-2004 05:43 GMT
Comment 214myself30-Sep-2004 05:53 GMT
Comment 215MikeB30-Sep-2004 06:11 GMT
Comment 216Don CoxRegistered user30-Sep-2004 06:25 GMT
Comment 217toll30-Sep-2004 06:33 GMT
Comment 218brotheris30-Sep-2004 06:36 GMT
Notes about my presentation at the Alchimie 4 show : Comment 219 of 427ANN.lu
Posted by Stéphane Guillard on 30-Sep-2004 06:50 GMT
In reply to Comment 209 (Nicolas DET):
Uhoh. ns called him for help... Who is next ?

>So if I understood well:

Obviously not. Or is it me ? Your code must be better than your english... Anyway I'm in good mood this morning so let's go for a lecture, you seem to need a serious one (yes I'm pedantic, but I know why).

>Linux places BD in cacheable area, and then you need to flush then to
>be sure they are really in memory and not in the cache.

I don't know what 'BD' is. And I never wrote a Linux driver, so I don't need anything.

Obviously anyway, in the case of a write to drive, data must be in ram at the moment when the DMA controller will fetch it and send it to the drive. This is common sense. Did you note the word 'write' just here ? Ok let's go on, I'll explain for 'read' further on.

This 'data must be in ram' situation (otherwise named 'cache is flushed') should be done in hardware, no doubt. This is the cache snoop feature of both the northbridge and the CPU : when a busmaster (let's say DMA controller, but could be anything else like another CPU) fetches data from memory, if this data is in cache and has not been flushed (ie 'dirty'), the busmaster memory access cycle is held, the CPU flushes the dirty cacheline (32 bytes for the PPC), and then the busmaster cycle is restarted.

This way, no code-driven cache flush is needed, it is provided in real time when needed. Note, 'when needed' means that only dirty cache lines are flushed, not the cachelines which contain data in sync with memory.

It works like that on almost all modern environments, except on some embedded platforms which don't provide the snooping feature (be it a lack of the CPU or a lack of the northbridge, by the way), like a renowned BSD coder pointed out some time ago. On those lower end environments, drivers have to explicitly flush the cache before starting a third party bus actor like a DMA controller. The driver will flush the cache for the whole buffer area, but note again, even with what we will call here a 'manual' flush, only dirty cache lines are physically flushed, not the cachelines that contain data which is in sync with memory, as flushing cachelines which are not dirty does nothing and makes no sense.

A quick digression here, to kill a myth : we thus have 2 situations :
- one where the hardware takes care of cache snooping by holding the DMA transfer each time a cache flush is needed,
- and another where the software flushes the cache and then starts the DMA transfer which will be going uninterrupted.

For a given buffer to write to disk, with a given set of dirty cachelines in it (say the buffer is 512 bytes, say there are 3 32 byte cachelines that have to be flushed), according to what I explained, both methods will end up doing exactly the same cache flushes on the bus : 3 cacheline flushes happening in the middle of the DMA transfer with hardware coherency, and 3 cacheline flushes happening in the beginning of the DMA transfer with manual cache flushing, or software coherency. Guess which is faster ? Tell us a good tale here please.

Ok, now back on track. Hardware coherency should work with the Articia also, it provides signals for that. Unfortunately, as known since long, there is a problem in its implementation on current A1 machines, so it does *not work*.

Thus, for a DMA driver to work on current A1's, it *has* to manually flush the buffer caches before asking the DMA controller to write to device.

This is a problem for Linux, since Linux drivers are assuming that they rely on hardware coherency. There is a very quick and dirty workaround, that needs no change in Linux drivers, it is to mark all memory noncacheable. This is obviously evil and stupid, it will work but it will crawl forever. The only advantage is that you can run untouched Linux drivers. The only other way on current machines, is to modify the Linux driver code, to add a manual cacheflush before stating the DMA write to device. Those are facts.

This is not a problem for OS4 drivers, as anyway we have written those from scratch, and along the AmigaOS device driver writing guidelines... The Amiga has never provided hardware coherency, and all the DMA drivers so far have been doing manual cache flushes. Eat it (I know, its hard, especially when you don't understand anything). Ever heard of CachePreDMA() and CachePostDMA() ? Ever thought about the fact that your beloved Ariadne, FastLane, etc & your blue dog's DMA-capable Classic Amiga board does that since day 1 ?

OK. So we implemented our OS4 drivers relying on the OS4-equivalents of CachePreDMA() and CachePostDMA(), which are StartDMA() and EndDMA(). Don't start jumping up and down, those functions are anyway mandatory otherwise OS4 could NOT run on classic hardware, where there is no hardware coherency. Oh, this reminds me. Your beloved blue OS also does that when running on a Classic machine.

By the way, those new OS4 functions also provide for things which are needed in a virtualized address space (like building scatter / gather lists), this is why we needed new calls in OS4.


Now, a word on the read transfers. For reads, no cache flush is needed at all, neither with hardware snooping nor with software cache handling. Why flush cache to ram when you will be overwriting ram with data read from the device ?

What is needed for read is cache invalidation. That is, telling the CPU that he has to go to real ram to fetch data, because its cache contains invalid data. And as Bernie Meyer pointed out earlier, this cache invalidation has to be done *before* the read and not after, contrary to intuition. Why ? If for whatever reason, the CPU wants to cache other areas, completely unrelated to the DMA read being done, it might decide to flush cached areas of the read buffer, in order to get free cache lines. If this flush, which happens 'in your back', happens after the DMA controller wrote data to ram, you end up with trash. Simple way to avoid that : make sure that no area of your read buffer is cached, ie invalidate the cachelines that might cover your buffer. This was one bug of mine a long time ago. You see, I'm not even reluctant to admit my own bugs.

So for reads, no flush, an invalidation (of course bound to your buffer address range, you're not going to invalidate the whole cache), and before the read.


>But if you do need to do that in a cache coherent environement -> the
>hardware is buggy -> it *has* to do it by itself as *documented* and
>has *every one else* does.

I said above, in truth and faith, that this indeed does not work on current A1's. This is known since long, and it is indeed a hardware bug of the current A1's named 'lack of hadware coherency', nothing new here. No need to shout either like if you were the victim of that thing, as far as I know you don't own a current A1 and never will. So relax, have a beer, and we'll continue here.

Did you note 'current' ? the µA1 'C' alias MK3 (and further machines) has proper snoop signaling implemented. Additionnally, this machine also solves the VIA / Ethernet interaction (and all other A1 oddities, like wrong implementation of the AC97 link between the VIA and the Sigmatel audio codec).

What will you say when you'll see untouched linux drivers work on that machine ? And VIA IDE DMA work on it too ? This with the very same Articia chip we have on current machines ? We might have some fun then.

>Is it this the ArticiaS 'feature' ? you have to flush the cache
>manually.

Read above. The articia is not at fault. It is its integration with CPU on current machines which is, in the 'snooping' department. It is the same kind of integration problem as for the VIA IDE clashing with the Ethernet.

Proof to come (yet to be seen by your own eyes, I admit) :
- for the articia being capable of hardware coherency : µA1 C and above does it with current articia chip.
- for the articia not being at fault in the VIA IDE / Ethernet DMA trouble : µA1 C and above does it with current articia chip, and additionnally, si680 PCI IDE DMA works fine on current A1's.

How's that magic possible ?

>And by the way, if you are in a cache coherent way, flushing the cache
>manually, after the hardware had (maybeŕ done in hardware is quiet
>useless/time consuming.

No cache flushing has to be done *after* a DMA transfer, makes no sense at all.

Additionnally, even if you would cacheflush before a DMA transfer with working hardware coherency, it would be useless (you're right) but not time consuming (you're wrong) because there would be no cache snoop flushes happening during the DMA transfer, since you flushed the dirty pages before. So at the end, zero perf impact. Get it ? If not, reread from start. Counter reached 100 ? Time to stop.

>If I believe this patch MAI use flush/invalidate_dcache_range. This
>call will always flush the cache, whereas if they would have real
>hardware they would use DMA_wback (or something like that) which is
>the same as previously if you compile your kernel in a cache coherent
>way or void if not.

Sorry, I cannot comment that statement, as I don't understand it.

>Do you really believe that your are speaking ?

I'm not speaking, I'm writing now. So I don't believe I'm speaking. But as to what I'm writing, I do believe in it.

> Because from here it
>looks like a load of bullshit, as usually...

Sure, as usual, what I write (or say, or show) looks like loads of bullshit to you, because you & your mates simply cannot understand things that are beyond your reasoning capabilities, and can only keep repeating the same 'articia does not work' kind of nonsense ad nauseam, even after seeing that pci ide DMA controller working with the same articia.

If I sounded a bit irritating and insulting to this small group of obscurantists who will recognize themselves... Well, then I succeeded.

Regards,
--
Stéphane
Jump...
#221 Asemoon #222 Peter Gordon #223 Anonymous #224 Stefan Burström #225 Anonymous #248 Johan Rönnblom #249 megol #266 Georg Steger #289 RedOS rulez !!! #297 Michal Schulz
TopPrevious commentNext commentbottom
List of all comments to this article (continued)
Comment 220Asemoon30-Sep-2004 07:02 GMT
Comment 221Asemoon30-Sep-2004 07:18 GMT
Comment 222Peter Gordon30-Sep-2004 07:21 GMT
Comment 223Anonymous30-Sep-2004 07:40 GMT
Comment 224Stefan Burström30-Sep-2004 07:47 GMT
Comment 225Anonymous30-Sep-2004 07:48 GMT
Comment 226Nicolas DET30-Sep-2004 07:49 GMT
Comment 227Joël EHRET30-Sep-2004 07:52 GMT
Comment 228Andy Hall30-Sep-2004 08:00 GMT
Comment 229Anonymous30-Sep-2004 08:00 GMT
Comment 230Amon_ReRegistered user30-Sep-2004 08:03 GMT
Comment 231Anonymous30-Sep-2004 08:03 GMT
Comment 232Stefan Burström30-Sep-2004 08:05 GMT
Comment 233itix30-Sep-2004 08:06 GMT
Comment 234Tryo30-Sep-2004 08:07 GMT
Comment 235Joël EHRET30-Sep-2004 08:09 GMT
Comment 236Anonymous30-Sep-2004 08:21 GMT
Comment 237ikirRegistered user30-Sep-2004 08:23 GMT
Comment 238brotheris30-Sep-2004 08:33 GMT
Comment 239Joël EHRET30-Sep-2004 08:48 GMT
Comment 240MikeB30-Sep-2004 08:57 GMT
Comment 241JoannaK30-Sep-2004 08:59 GMT
Comment 242asemoon30-Sep-2004 09:03 GMT
Comment 243MikeB30-Sep-2004 09:07 GMT
Comment 244Anonymous30-Sep-2004 09:09 GMT
Comment 245Anonymous30-Sep-2004 09:21 GMT
Comment 246Anonymous30-Sep-2004 09:29 GMT
Comment 247MikeB30-Sep-2004 09:34 GMT
Comment 248Johan Rönnblom30-Sep-2004 09:43 GMT
Comment 249megol30-Sep-2004 09:59 GMT
Comment 250itix30-Sep-2004 10:03 GMT
Comment 251AmiTroll30-Sep-2004 10:52 GMT
Comment 252priest30-Sep-2004 11:03 GMT
Comment 253Anonymous30-Sep-2004 11:07 GMT
Comment 254priest30-Sep-2004 11:07 GMT
Comment 255Mr_Bumpy30-Sep-2004 11:22 GMT
Comment 256XraalE30-Sep-2004 12:02 GMT
Comment 257XraalE30-Sep-2004 12:05 GMT
Comment 258itix30-Sep-2004 12:20 GMT
Comment 259itix30-Sep-2004 12:27 GMT
Comment 260itix30-Sep-2004 12:28 GMT
Comment 261itix30-Sep-2004 12:31 GMT
Comment 262MikeB30-Sep-2004 12:34 GMT
Comment 263JoannaK30-Sep-2004 12:36 GMT
Comment 264JoannaK30-Sep-2004 12:38 GMT
Comment 265Joe30-Sep-2004 12:44 GMT
Comment 266Georg Steger30-Sep-2004 13:01 GMT
Comment 267Anonymous30-Sep-2004 13:10 GMT
Comment 268MikeB30-Sep-2004 13:13 GMT
Comment 269minator30-Sep-2004 13:27 GMT
Comment 270Anonymous30-Sep-2004 13:28 GMT
Comment 271Anonymous30-Sep-2004 13:29 GMT
Comment 272JKD30-Sep-2004 13:32 GMT
Comment 273Christophe DecaniniRegistered user30-Sep-2004 13:32 GMT
Comment 274Anonymous30-Sep-2004 13:33 GMT
Comment 275Stéphane Guillard30-Sep-2004 13:38 GMT
Comment 276MikeB30-Sep-2004 13:50 GMT
Comment 277itix30-Sep-2004 13:58 GMT
Comment 278Georg Steger30-Sep-2004 14:34 GMT
Comment 279Don CoxRegistered user30-Sep-2004 14:36 GMT
Comment 280Don CoxRegistered user30-Sep-2004 14:41 GMT
Comment 281Don CoxRegistered user30-Sep-2004 14:42 GMT
Comment 282JoannaK30-Sep-2004 15:04 GMT
Comment 283JoannaK30-Sep-2004 15:10 GMT
Comment 284itix30-Sep-2004 15:12 GMT
Comment 285Agima30-Sep-2004 15:28 GMT
Comment 286MikeB30-Sep-2004 15:44 GMT
Comment 287Christophe DecaniniRegistered user30-Sep-2004 16:00 GMT
Comment 288Agima30-Sep-2004 16:01 GMT
Comment 289RedOS rulez !!!30-Sep-2004 16:10 GMT
Comment 290Fabio AlemagnaRegistered user30-Sep-2004 16:19 GMT
Comment 291Christophe DecaniniRegistered user30-Sep-2004 16:34 GMT
Comment 292JoannaK30-Sep-2004 16:47 GMT
Comment 293Johan Rönnblom30-Sep-2004 16:51 GMT
Comment 294Michal Schulz30-Sep-2004 17:54 GMT
Comment 295MikeB30-Sep-2004 17:58 GMT
Comment 296Stefan Burström30-Sep-2004 18:21 GMT
Comment 297Michal Schulz30-Sep-2004 18:27 GMT
Comment 298Jacob30-Sep-2004 18:32 GMT
Comment 299Michal Schulz30-Sep-2004 18:33 GMT
Comment 300Fabio AlemagnaRegistered user30-Sep-2004 18:56 GMT
Comment 301Fabio AlemagnaRegistered user30-Sep-2004 18:58 GMT
Comment 302Fabio AlemagnaRegistered user30-Sep-2004 18:59 GMT
Comment 303Davy Wentzler30-Sep-2004 19:01 GMT
Comment 304Christophe DecaniniRegistered user30-Sep-2004 19:16 GMT
Comment 305Johan Rönnblom30-Sep-2004 19:26 GMT
Comment 306MikeB30-Sep-2004 19:33 GMT
Comment 307Georg Steger30-Sep-2004 19:53 GMT
Comment 308Fabio AlemagnaRegistered user30-Sep-2004 19:55 GMT
Comment 309Davy Wentzler30-Sep-2004 19:58 GMT
Comment 310MikeB30-Sep-2004 19:59 GMT
Comment 311Davy Wentzler30-Sep-2004 20:02 GMT
Comment 312Christophe DecaniniRegistered user30-Sep-2004 20:36 GMT
Comment 313Fabio AlemagnaRegistered user01-Oct-2004 02:54 GMT
Comment 314Fabio AlemagnaRegistered user01-Oct-2004 02:56 GMT
Comment 315Fabio AlemagnaRegistered user01-Oct-2004 02:56 GMT
Comment 316Michal Schulz01-Oct-2004 03:11 GMT
Comment 317Fabio AlemagnaRegistered user01-Oct-2004 03:40 GMT
Comment 318Stéphane Guillard01-Oct-2004 05:52 GMT
Comment 319MikeB01-Oct-2004 05:56 GMT
Comment 320Stéphane Guillard01-Oct-2004 06:03 GMT
Comment 321Fabio AlemagnaRegistered user01-Oct-2004 06:39 GMT
Comment 322Real Asemoon from England01-Oct-2004 06:47 GMT
Comment 323Anonymous01-Oct-2004 06:51 GMT
Comment 324Andrea Maniero01-Oct-2004 06:58 GMT
Comment 325Anonymous01-Oct-2004 07:11 GMT
Comment 326MikeB01-Oct-2004 07:25 GMT
Comment 327Anonymous01-Oct-2004 07:33 GMT
Comment 328Fabio AlemagnaRegistered user01-Oct-2004 08:01 GMT
Comment 329Anonymous01-Oct-2004 08:12 GMT
Comment 330MikeB01-Oct-2004 08:25 GMT
Comment 331Gabriele Favrin01-Oct-2004 08:38 GMT
Comment 332Fabio AlemagnaRegistered user01-Oct-2004 09:06 GMT
Comment 333Lamont Cranston01-Oct-2004 09:38 GMT
Comment 334Andy Hall01-Oct-2004 09:59 GMT
Comment 335Anonymous01-Oct-2004 10:09 GMT
Comment 336Fabio AlemagnaRegistered user01-Oct-2004 10:23 GMT
Comment 337Christophe DecaniniRegistered user01-Oct-2004 11:02 GMT
Comment 338Christophe DecaniniRegistered user01-Oct-2004 11:14 GMT
Comment 339Don CoxRegistered user01-Oct-2004 11:18 GMT
Comment 340Don CoxRegistered user01-Oct-2004 11:19 GMT
Comment 341Christophe DecaniniRegistered user01-Oct-2004 11:46 GMT
Comment 342Johan Rönnblom01-Oct-2004 12:01 GMT
Comment 343Luca Diana01-Oct-2004 13:36 GMT
Comment 344Luca Diana01-Oct-2004 13:37 GMT
Comment 345Luca Diana01-Oct-2004 13:43 GMT
Comment 346Bernie MeyerRegistered user01-Oct-2004 13:45 GMT
Comment 347Don CoxRegistered user01-Oct-2004 13:58 GMT
Comment 348Christophe DecaniniRegistered user01-Oct-2004 14:02 GMT
Comment 349Bernie MeyerRegistered user01-Oct-2004 14:04 GMT
Comment 350Christophe DecaniniRegistered user01-Oct-2004 14:05 GMT
Comment 351Stéphane Guillard01-Oct-2004 14:14 GMT
Comment 352Luca Diana01-Oct-2004 14:36 GMT
Comment 353Bernie MeyerRegistered user01-Oct-2004 14:59 GMT
Comment 354Fabio AlemagnaRegistered user01-Oct-2004 15:00 GMT
Comment 355Christophe DecaniniRegistered user01-Oct-2004 15:28 GMT
Comment 356syrtran01-Oct-2004 15:28 GMT
Comment 357Fabio AlemagnaRegistered user01-Oct-2004 15:44 GMT
Comment 358Anonymous01-Oct-2004 15:57 GMT
Comment 359smithy01-Oct-2004 15:57 GMT
Comment 360syrtran@compuserve.com01-Oct-2004 16:12 GMT
Comment 361Johan Rönnblom01-Oct-2004 16:21 GMT
Comment 362Fabio AlemagnaRegistered user01-Oct-2004 16:26 GMT
Comment 363Nicolas DET01-Oct-2004 16:45 GMT
Comment 364Richard Drummond01-Oct-2004 16:45 GMT
Comment 365Don CoxRegistered user01-Oct-2004 17:10 GMT
Comment 366Don CoxRegistered user01-Oct-2004 17:14 GMT
Comment 367Fabio AlemagnaRegistered user01-Oct-2004 17:27 GMT
Comment 368Anonymous01-Oct-2004 18:16 GMT
Comment 369Fabio AlemagnaRegistered user01-Oct-2004 18:36 GMT
Comment 370Nicolas DET01-Oct-2004 18:40 GMT
Comment 371Anonymous01-Oct-2004 18:41 GMT
Comment 372Johan Rönnblom01-Oct-2004 18:46 GMT
Comment 373Johan Rönnblom01-Oct-2004 19:02 GMT
Comment 374Anonymous01-Oct-2004 19:02 GMT
Comment 375Richard Drummond01-Oct-2004 19:12 GMT
Comment 376Fabio AlemagnaRegistered user01-Oct-2004 19:12 GMT
Comment 377Anonymous01-Oct-2004 19:12 GMT
Comment 378Johan Rönnblom01-Oct-2004 19:54 GMT
Comment 379Georg Steger01-Oct-2004 20:09 GMT
Comment 380Anonymous01-Oct-2004 20:29 GMT
Comment 381Anonymous01-Oct-2004 20:38 GMT
Comment 382Anonymous01-Oct-2004 20:39 GMT
Comment 383Johan Rönnblom01-Oct-2004 21:13 GMT
Comment 384CnlPepper01-Oct-2004 22:15 GMT
Comment 385Christophe DecaniniRegistered user01-Oct-2004 23:08 GMT
Comment 386Fabio AlemagnaRegistered user02-Oct-2004 00:41 GMT
Comment 387Fabio AlemagnaRegistered user02-Oct-2004 00:46 GMT
Comment 388Fabio AlemagnaRegistered user02-Oct-2004 00:56 GMT
Comment 389Bernie MeyerRegistered user02-Oct-2004 04:38 GMT
Comment 390Anonymous02-Oct-2004 08:35 GMT
Comment 391pixie02-Oct-2004 10:22 GMT
Comment 392Johan Rönnblom02-Oct-2004 10:53 GMT
Comment 393pixie02-Oct-2004 14:10 GMT
Comment 394Bernie MeyerRegistered user02-Oct-2004 14:49 GMT
Comment 395JKD02-Oct-2004 15:31 GMT
Comment 396Don CoxRegistered user02-Oct-2004 16:11 GMT
Comment 397Johan Rönnblom02-Oct-2004 16:13 GMT
Comment 398Richard Drummond02-Oct-2004 16:21 GMT
Comment 399pixie02-Oct-2004 18:44 GMT
Comment 400pixie02-Oct-2004 18:44 GMT
Comment 401Johan Rönnblom02-Oct-2004 19:57 GMT
Comment 402Anonymous02-Oct-2004 22:15 GMT
Comment 403JKD03-Oct-2004 00:20 GMT
Comment 404Anonymous03-Oct-2004 05:14 GMT
Comment 405Anonymous03-Oct-2004 06:53 GMT
Comment 406Abuse03-Oct-2004 10:23 GMT
Comment 407Anonymous03-Oct-2004 10:46 GMT
Comment 408pixie03-Oct-2004 10:49 GMT
Comment 409Anonymous03-Oct-2004 12:18 GMT
Comment 410STRICQ03-Oct-2004 13:19 GMT
Comment 411Anonymous03-Oct-2004 13:43 GMT
Comment 412Richard Drummond03-Oct-2004 14:08 GMT
Comment 413Golem03-Oct-2004 14:32 GMT
Comment 414Don CoxRegistered user03-Oct-2004 14:52 GMT
Comment 415Don CoxRegistered user03-Oct-2004 14:54 GMT
Comment 416Christian KempRegistered user03-Oct-2004 14:57 GMT
Comment 417Anonymous03-Oct-2004 14:59 GMT
Comment 418Anonymous03-Oct-2004 15:12 GMT
Comment 419Anonymous03-Oct-2004 15:32 GMT
Comment 420Anonymous03-Oct-2004 15:37 GMT
Comment 421Richard Drummond03-Oct-2004 16:22 GMT
Comment 422pixie03-Oct-2004 16:33 GMT
Comment 423pixie03-Oct-2004 16:34 GMT
Comment 424Don CoxRegistered user03-Oct-2004 16:43 GMT
Comment 425Don CoxRegistered user03-Oct-2004 16:50 GMT
Comment 426Anonymous03-Oct-2004 18:03 GMT
Comment 427Seehund03-Oct-2004 22:04 GMT
Back to Top