Re: Floppy handling

From: Rogier Wolff (R.E.Wolff@BitWizard.nl)
Date: Mon Jun 19 2000 - 04:07:45 EST


Helge Hafting wrote:
> >4. As for syncing if you do all writes to the floppy ASAP without disturbing
> >any filesystem mount/status flags etc there is not need to inplement a
> >syncing procedure. Plus the behavior follows that which users have become
> >acustom to.
> You don't want to do it ASAP, a reasonable timeout is *great* for
> throughput. But then you need the light informing users that

I'd say that for floppies, the "reasonable timeout" is 0. However, not
too much should be "queued" irretrievably. The first write to floppy
is going to turn on the led, and create a 200ms delay which is ample
time for say "cp" to finish writing the whole mess onto the
floppy. From that moment on, the writes should be optmized. Thus maybe
the directory block got written 6 times because there were 6 files
added. That needs to be optimized out. Maybe the FAT got written 200
times....

So:

1 cp * /mnt/floppy
2 write starts, random place on the floppy.
3 cp finishes.
4 elevator algorithm writes from that random place
                         to end of disk.

5 elevator starts at beginning of disk, and
                         writes the dirty blocks between start of disk and
                         that "random place".

6 elevator does one more pass, to write the
                         blocks that weren't ready the first time around.

7 light goes out.

Step 6 is likely to be empty. Even if it isn't it is likely to be one
seek and a few blockwrites.

If we "wait" 3 seconds before starting to write, we always loose those
3 seconds, but gain a bit in throuhput.

In fact, we'd have one seek from "the end" back to the start, and one
seek to a random pos. As the full-seek takes around a second, the cost
of doing it this way is around 1.5 seconds over "ideal", and 1.5
seconds better than "waiting 3 seconds to improve throughput".

                        Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
*       Common sense is the collection of                                *
******  prejudices acquired by age eighteen.   -- Albert Einstein ********

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:16 EST