All of lore.kernel.org
 help / color / mirror / Atom feed
* Runtime PM and the block layer
@ 2010-08-23 19:17 Alan Stern
  2010-08-23 19:53 ` Jens Axboe
  0 siblings, 1 reply; 24+ messages in thread
From: Alan Stern @ 2010-08-23 19:17 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Kernel development list

Jens:

I want to implement runtime power management for the SCSI sd driver.  
The idea is that the device should automatically be suspended after a
certain amount of time spent idle.

The basic outline is simple enough.  If the device is in low power when
a request arrives, delay handling the request until the device can be
brought back to high power.  When a request completes and the request
queue is empty, schedule a runtime-suspend for the appropriate time in
the future.

The difficulty is that I don't know the right way these things should
interact with the request-queue management.  A request can be deferred
by making the prep_req_fn return BLKPREP_DEFER, right?  But then what
happens to the request and to the queue?  How does the runtime-resume
routine tell the block layer that the deferred request should be
restarted?

How does this all relate to the queue being stopped or plugged?

Another thing: The runtime-resume routine needs to send its own
commands to the device (to spin up a drive, for example).  These
commands must be sent before anything on the request queue, and they
must be handled right away even though the normal requests on the queue
are still deferred.

What's the right way to do all this?

Thanks,

Alan Stern


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-10-05 22:43 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-23 19:17 Runtime PM and the block layer Alan Stern
2010-08-23 19:53 ` Jens Axboe
2010-08-23 21:51   ` Alan Stern
2010-08-24 13:15     ` Runtime power management during system resume Raj Kumar
2010-08-24 14:30       ` Alan Stern
2010-08-24 15:17         ` Raj Kumar
2010-08-24 17:50           ` Alan Stern
2010-08-25 13:27           ` Raj Kumar
2010-08-25 14:51             ` Alan Stern
2010-08-26 13:40             ` Raj Kumar
2010-08-26 14:33               ` Alan Stern
2010-09-18 11:49               ` (no subject) Raj Kumar
2010-09-18 15:36                 ` your mail Alan Stern
2010-09-18 15:56                   ` Dominik Brodowski
2010-10-05 21:40                 ` Question about hibernation Raj Kumar
2010-10-05 22:43                   ` Rafael J. Wysocki
2010-08-24 13:38     ` Runtime PM and the block layer Jens Axboe
2010-08-24 14:42       ` Alan Stern
2010-08-24 17:09         ` Jens Axboe
2010-08-24 20:06           ` Alan Stern
2010-08-24 20:10             ` Jens Axboe
2010-08-24 21:09               ` Alan Stern
2010-09-27 15:22           ` Alan Stern
2010-08-30 16:32       ` Alan Stern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.