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; 33+ 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] 33+ messages in thread
[parent not found: <mailman.23.1286318684.6175.linux-pm@lists.linux-foundation.org>]
* Question about timers during system suspend
@ 2011-01-04 21:14 Raj Kumar
  2011-01-04 23:05 ` Rafael J. Wysocki
  0 siblings, 1 reply; 33+ messages in thread
From: Raj Kumar @ 2011-01-04 21:14 UTC (permalink / raw)
  To: linux-pm



Hi,
 
I have question regarding the timers during system suspend. If a software timer is
active in device driver, will this timer be stopped during system suspend?
 
If the timer is active, will it prevent the system from full suspend?
 
The another thing is during system suspend, how the user space code know about suspend?
 
One way is that device driver gets the suspend and it notifies the user space. 
 
But is there way that during system goes into full suspend, is any user space component that will
give notifications to applications that has registered for system suspend transition?
 
 
Regards
Raj 		 	   		  

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

end of thread, other threads:[~2011-03-19 23:47 UTC | newest]

Thread overview: 33+ 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
     [not found] <mailman.23.1286318684.6175.linux-pm@lists.linux-foundation.org>
2010-10-08 10:32 ` Question about hibernation Raj Kumar
2010-10-08 19:31   ` Rafael J. Wysocki
2010-10-14  8:20     ` Raj Kumar
2010-10-14  9:51       ` Rafael J. Wysocki
2010-10-14 11:47         ` Raj Kumar
2010-10-14 18:59           ` Rafael J. Wysocki
2011-01-04 21:14 Question about timers during system suspend Raj Kumar
2011-01-04 23:05 ` Rafael J. Wysocki
2011-01-04 23:57   ` Raj Kumar
2011-01-05  8:27     ` Rafael J. Wysocki
2011-03-18 13:45       ` Question about hibernation Raj Kumar
2011-03-18 14:09         ` Oliver Neukum
2011-03-19 23:47           ` Raj Kumar

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.