Re: [PATCH v8 04/23] scsi: sd: Differentiate system and runtime start/stop management

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

 



Sorry for the delay, I've been out sick all week.

Damien Le Moal <dlemoal@xxxxxxxxxx> writes:
> Sure, but I think we can skip the spinup only and only if the drive has PUIS
> enabled and reported a complete IDENTIFY: in this case, we can skip the SET
> FEATURES command that spins up the drive to leave the drive spun down. Some more
> code will be needed though so that we track that the drive is spun sdown because
> of PUIS and not because of STANDBY IMMEDIATE, so that ata_dev_power_set_active()
> issues a SET FEATURES to spinup the drive instead of the regular VERIFY command.

I don't see why the revalidation MUST be performed at system resume.
The patch I've been working on leaves the error flags and also sets the
DFLAG_SLEEPING flag on the disk when it's PuiS.  Then later when the
disk is accessed, the SLEEPING flag schedules another round of eh, which
resets the link, and revalidates the disk, and this time the SET
FEATURES command is used to wake the drive.  I'll post the patch in a
few hours when I get home.

The basic case of postponing the wakeup of the drive until the disk is
later accessed seems to work fine.  Unfortunately, that later access
comes quickly either in the form of a CHECK POWER CONDITION from
udisks2.service, or FLUSH CACHE from the filesystem.  These commands
don't cause the drive to spin up when it is in ata STANDBY mode, but do
with runtime suspend.  I'm leaning towards modifying the blk_queue to
allow the driver to register a method to be called on a request when the
block device is runtime suspended to possibly handle the request without
activating the block device first.

> Note: I am still not able to see runtime suspend automatically suspend the ata
> port if I enable a scsi disk autosuspend_delay_ms. That does not happen for me.
> In fact, I cannot even read a ata port autosuspend delay:
>
> cat /sys/class/ata_port/ata2/power/autosuspend_delay_ms
> cat: /sys/class/ata_port/ata2/power/autosuspend_delay_ms: Input/output error

Right, there is no activity timer on the port.

> But I have:
>
> cat /sys/class/ata_port/ata2/power/control
> auto

If that is set to auto then it seems to auto suspend once all children
have gone to runtime suspend.  For my internal ports, they only have a
single child, so when the drive enters runtime suspend, so does the
port.  For the eSATA PMP dock, BOTH drives have to suspend before the
port will.




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux