lkml.org 
[lkml]   [2012]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3/4] block: implement runtime pm strategy
On Fri, Jul 06, 2012 at 12:04:31PM +0800, Lin Ming wrote:
> When a request is added:
> If device is suspended or is suspending and the request is not a
> PM request, resume the device.
>
> When a request finishes:
> Call pm_runtime_mark_last_busy().
>
> When pick a request:
> If device is resuming/suspending, then only PM request is allowed to go.
> Return NULL for other cases.

This only works for drivers which are struct request based. For those
that handle struct bio directly, nr_pending will always be 0.

I think the right place to increment nr_pending is in generic_make_request.
But I'm not sure where to decrement it. I think we need a blk_bio_endio()
which does some housekeeping and then calls bio_endio().

--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."


\
 
 \ /
  Last update: 2012-07-06 10:01    [W:0.483 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site