[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF1ivSb7_THm+ugR5D-bEA6VsDvrxeH8V-Dk5JqeWEQEgHhy2w@mail.gmail.com>
Date: Fri, 6 Jul 2012 22:51:21 +0800
From: Lin Ming <ming.m.lin@...el.com>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Jens Axboe <axboe@...nel.dk>, "Rafael J. Wysocki" <rjw@...k.pl>,
Shaohua Li <shli@...nel.org>, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: [PATCH v5 3/4] block: implement runtime pm strategy
On Fri, Jul 6, 2012 at 10:21 PM, Alan Stern <stern@...land.harvard.edu> wrote:
> On Fri, 6 Jul 2012, 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.
>>
>> Signed-off-by: Lin Ming <ming.m.lin@...el.com>
>
> Generally okay, but...
>
>> --- a/include/linux/blkdev.h
>> +++ b/include/linux/blkdev.h
>> @@ -908,6 +908,36 @@ extern int blk_pre_runtime_suspend(struct request_queue *q);
>> extern void blk_post_runtime_suspend(struct request_queue *q, int err);
>> extern void blk_pre_runtime_resume(struct request_queue *q);
>> extern void blk_post_runtime_resume(struct request_queue *q, int err);
>> +
>> +static inline void blk_pm_put_request(struct request_queue *q)
>> +{
>> + if (!(--q->nr_pending) && q->dev)
>> + pm_runtime_mark_last_busy(q->dev);
>> +}
> ...
>
> These new helper routines are private to the block layer, not intended
> for use by clients. Consequently they don't belong in include/linux;
> they should go in block/blk.h.
OK, will move it.
>
> 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