Re: [PATCH] Speed up the cdrw packet writing driver

From: Peter Osterlund
Date: Wed Aug 25 2004 - 00:39:41 EST


Andrew Morton <akpm@xxxxxxxx> writes:

> Peter Osterlund <petero2@xxxxxxxxx> wrote:
> >
> > > Are you saying that your requests are so huge that each one has 1000 BIOs?
> > > That would be odd, for an IDE interface.
> >
> > No, the thing is that the packet driver doesn't create requests at
> > all. It stuffs incoming bio's in the rbtree, then the worker thread
> > collects bio's from the rbtree for the same "zone" on the disc (each
> > zone is 64kb on a CDRW and 32KB on a DVD). The driver then creates a
> > new bio with the same size as the zone size and submits it to the real
> > CD/DVD device.
>
> Good lord. I assume there's a good reason for this?

The reason is that generic_make_request() takes a bio, not a request.
Loop and md don't deal with "struct request" either, they also work
directly at the bio level.

The reason the driver doesn't process the bios in sequential order
like md and loop seems to do, is because it wants to maximize I/O
performance. With a typical DVD drive, write bandwidth is 5.3MB/s and
seek times when writing are 500ms. Also, there is a big penalty for
not being able to completely fill a "zone", because it means that the
driver will have to read the missing pieces from the disc before being
able to submit the "write bio".

Is there some problem doing what the pktcdvd driver is doing?

--
Peter Osterlund - petero2@xxxxxxxxx
http://w1.894.telia.com/~u89404340
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/