I am working on a driver for the CD Rom drive on the Sega Dreamcast
(the so-called "GD Rom" drive). This device is electorically
compatible with IDE-3 devices and has a pretty good match in terms of
the control block registers but it implements its own packet command
interface.

I now have a working driver but the performance is lousy.

The driver reads data off the disk using DMA and the target for the
DMA has to be a contiguous. Therefore I have set:

        /* using DMA so memory will need to be contiguous */
        blk_queue_max_hw_segments(gd.gdrom_rq, 1);
        /* set a large max size to get most from DMA */
        blk_queue_max_segment_size(gd.gdrom_rq, 0x40000);

ie only one segment per request but a big (for a small device) maximum
size for the segment.

A priori I can see no performance advantage in allowing each request
to include multiple segments because then I'd only have to reshake
them so they went in one at a time. But from the looks of it if I do
set the maximum number of segments to 1 then each request is limited
to the smallest size - ie what I set in blk_queue_hardsect_size.

Is that right? What is the best way to go here?
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to