Re: [RFC 1/4] libata: cache device select

From: Alan Cox
Date: Tue Mar 02 2010 - 12:25:44 EST


> > - ata_dev_select(ap, qc->dev->devno, 1, 0);
> > + if (qc->dev->devno != ap->sff_selected)
> > + ata_dev_select(ap, qc->dev->devno, 1, 0);
> >
> > /* start the command */
> > switch (qc->tf.protocol) {
>
> My main worry here is that this logic excises the 150ms wait in
> ata_dev_select() that has been used effectively to allow ATAPI devices
> to "collect themselves" after waiting for idle, prior to command issuance.

It doesn't. You call it with wait = 1, can_sleep = 0 so it will never do
the 150ms magic delay here anyway (good job or it would kill us for
performance ;))

It does mean we don't do the device idle wait in that situation but there
are no code paths where we try to overlap commands by spinning on the
drive busy bit (again for obvious reasons)

Alan
--
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/