On Sun, 15 Aug 2010, Oliver Neukum wrote: > Am Samstag, 14. August 2010, 03:01:22 schrieb Alan Stern: > > On Mon, 9 Aug 2010, Oliver Neukum wrote: > > > > However, after a bit of thought, it seems to me that if we are going > > > for an attribute in sysfs a model based on open/close makes no sense > > > for sd. > > > The thing is that I see no device that would benefit from that algorithm. > > > > USB flash drives? Maybe you think they would be better off with an > > idle timeout. > > Yes, that is true. But where is the connection to open/close? When the device file is closed, the sd driver tells the device to synchronize its cache. While the file is open, we don't know whether or not the cache has been written back. While this may not matter for flash drives, it does matter for other kinds -- and I wanted the initial patch to work with a broad range of devices. > > > Are there any devices which can suspend with medium and opened > > > which cannot suspend under all circumstances (while not processing > > > a command)? > > > > Rotating drives that need to be spun down shouldn't be suspended if a > > command will be issued in the near future. Also, spin-up and spin-down > > operations should be minimized, as they cause physical wear. > > This is true but why can't that be had by a timeout from the last command? It can. But the current patchset doesn't implement such a timeout. > > It might be a good idea to ask the people on linux-scsi if they have > > any helpful ideas. They may be more familiar with the issues. > > Good idea. At the moment it appears that we have three possible criteria for when to power-down a SCSI drive: When the device file is closed; When the device file is closed and no medium is present (or maybe just when no medium is present); After a user-specified idle timeout. The second is basically a degenerate subcase of the first, to be used with things like card readers that report a media change whenever they power back up. Do you have any additional suggestions before I post something on linux-scsi? Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html