Re: [linux-usb-devel] question on flushing buffers and spinning down disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 28 Sep 2007, Oliver Neukum wrote:

> Am Donnerstag 27 September 2007 schrieb Alan Stern:
> > There's also a philosophical objection.  Who is in a better position to
> > judge when a device like a SCSI drive should be autosuspended: its own
> > driver (sd) or someone else (usb-storage)?
> 
> Then a philosophical answer. The highest entity which understands what
> it is doing when using power management. Highest here to be understood
> not as a position in the device tree, but in the flow of information.

In this sense, sd is higher than usb-storage, right?  Because I/O 
requests pass through sd first, then usb-storage, on their way to the 
device.

My point is that when dealing with SCSI disks, sd understands the 
implications of Power Management better than usb-storage does.  
Similarly, when dealing with SCSI cd drives, sr understands the 
implications of Power Management better than usb-storage.

Hence by your own argument, the SCSI high-level drivers should be 
responsible for autosuspending their respective devices.  usb-storage, 
on the other hand, should be responsible only for suspending the 
transport, since that's what it does understand.

> That is in our case usb-storage. Sr or sd can't do it because they don't
> and can't understand power management.

That's simply not true.  If sd didn't understand Power Management then 
sd_suspend() and sd_resume() would be empty.

> Now they might be asked to provide some helpers. An open count and
> notifications about the state of the queue would be obvious. Other
> suggestions?

I still think you're trying to go about it all backwards.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux