ide-scsi problems with multiple CD-Rs on same channel (2.2.14)
Gadi Oxman
gadio en netvision.net.il
Mie Ene 26 23:47:59 CST 2000
On Wed, 26 Jan 2000, Tkil wrote:
> >>>>> "Gadi" == Gadi Oxman <gadio en netvision.net.il> writes:
>
> Gadi> I'd recommend changing choose_drive() in drivers/block/ide.c
> Gadi> as follows -- replacing the "drive = hwgroup->drive;" line with
> Gadi> "drive = hwgroup->drive->next;" line, and commenting out the
> Gadi> part later which tests the best->nice1 flag (the second part
> Gadi> of the patch can alternatively be done by using "echo nice1:0 >
> Gadi> /proc/ide/hdx/settings for each IDE drive).
>
> Gadi> This will select round-robin scheduling between the drives. This
> Gadi> is usually not the best for throughput, but might be more
> Gadi> appropriate when real-time constrains are involved.
>
> Well, a few issues:
>
> 1. Switching to hwgroup->drive->next causes serious problems at boot.
> The four IDE devices are detected, but it stops at the "partition
> check" for hda.
>
> So I reverted this portion of the patch. It might still be usable,
> but I suspect that we would need to fix the termination condition
> there too.
Sorry, my bad (the end of the while block also has to check for
hwgroup->drive->next). Here is a corrected patch (against stock kernel).
Cheers,
Gadi
--- ide.c~ Wed Nov 17 08:15:22 1999
+++ ide.c Thu Jan 27 02:14:55 2000
@@ -1079,19 +1079,20 @@
repeat:
best = NULL;
- drive = hwgroup->drive;
+ drive = hwgroup->drive->next;
do {
if (drive->queue && (!drive->sleep || 0 <= (signed long)(jiffies - drive->sleep))) {
if (!best
|| (drive->sleep && (!best->sleep || 0 < (signed long)(best->sleep - drive->sleep)))
- || (!best->sleep && 0 < (signed long)(WAKEUP(best) - WAKEUP(drive))))
+ || 0 /* (!best->sleep && 0 < (signed long)(WAKEUP(best) - WAKEUP(drive)))*/ )
{
struct blk_dev_struct *bdev = &blk_dev[HWIF(drive)->major];
if (bdev->current_request != &bdev->plug)
best = drive;
}
}
- } while ((drive = drive->next) != hwgroup->drive);
+ } while ((drive = drive->next) != hwgroup->drive->next);
+#if 0
if (best && best->nice1 && !best->sleep && best != hwgroup->drive && best->service_time > WAIT_MIN_SLEEP) {
long t = (signed long)(WAKEUP(best) - jiffies);
if (t >= WAIT_MIN_SLEEP) {
@@ -1111,6 +1112,7 @@
} while ((drive = drive->next) != best);
}
}
+#endif
return best;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda