[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1202061007570.1525-100000@iolanthe.rowland.org>
Date: Mon, 6 Feb 2012 10:13:37 -0500 (EST)
From: Alan Stern <stern@...land.harvard.edu>
To: Huang Ying <ying.huang@...el.com>
cc: ming.m.lin@...el.com, <linux-kernel@...r.kernel.org>,
<linux-scsi@...r.kernel.org>, <linux-pm@...r.kernel.org>,
"Rafael J. Wysocki" <rjw@...k.pl>,
James Bottomley <JBottomley@...allels.com>
Subject: Re: [RFC 0/5] scsi, sd, pm, request based runtime PM for scsi disk
On Mon, 6 Feb 2012, Huang Ying wrote:
> SSD becomes more and more popular, this makes it possible to put disk into
> low power state more often. And request based runtime PM for scsi disk is
> more useful than open/close based one because disk is normally mounted at
> most time.
>
> One known issue, because SCSI TEST_UNIT_READY will be put into request
> queue every 2 seconds by default, this makes it hard for disk to sleep.
> Maybe we can implement check_events callback in some other way?
>
> [RFC 1/5] pm, runtime, Add resume notifier
> [RFC 2/5] scsi, pm, rename scsi_autopm_get/put_xxx to
> [RFC 3/5] scsi, pm, add pm_runtime_get/put in scsi request
> [RFC 4/5] scsi, pm, use autosuspend for scsi runtime PM
> [RFC 5/5] scsi, sd, pm, request based runtime PM support
Your whole approach is at the wrong level. Runtime PM between I/O
requests for block devices should be implemented in the block layer,
not in the SCSI layer.
It also is much more difficult than your patches would indicate. For
example, some USB card readers indicate a media change every time they
resume; therefore they must not be suspended while the device file is
open.
Another difficulty arises because some drivers need to send SCSI
commands (such as SYNCHRONIZE CACHE) _while_ suspending or resuming.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists