On 08/08/2018 02:11 PM, jianchao.wang wrote:
> Hi Bart
>
> On 08/08/2018 06:51 AM, Bart Van Assche wrote:
>> @@ -391,6 +393,9 @@ static struct request *blk_mq_get_request(struct
>> request_queue *q,
>> }
>> }
>> data->hctx->queued++;
>> +
>> + blk_pm_add_request(q, rq);
>> +
>> return rq;
>> }
>
> The request_queue is in pm_only mode when suspended, who can reach here to do
> the resume ?
I mean, in the original blk-legacy runtime pm implementation, any new IO could
trigger the resume,
after your patch set, only the pm request could pass the blk_queue_enter while
the queue is suspended
and in pm-only mode. But if no resume, where does the pm request come from ?
The blk_pm_add_request should be added to blk_queue_enter.
It looks like as following:
1. when an normal io reaches blk_queue_enter, if queue is in suspended mode,
it invoke blk_pm_add_request
to trigger the resume, then wait here for the pm_only mode to be cleared.
2. the runtime pm core does the resume work and clear the pm_only more
finally
3. the task blocked in blk_queue_enter is waked up and proceed.
Thanks
Jianchao
- [PATCH v5 6/9] block: Change the runtime power management ... Bart Van Assche
- [PATCH v5 7/9] block: Remove blk_pm_requeue_request() Bart Van Assche
- [PATCH v5 9/9] blk-mq: Enable support for runtime power ma... Bart Van Assche
- [PATCH v5 8/9] blk-mq: Insert a blk_pm_put_request() call Bart Van Assche
- [PATCH v5 3/9] block, scsi: Introduce blk_pm_runtime_exit(... Bart Van Assche
- [PATCH v5 2/9] block: Move power management code into a ne... Bart Van Assche
- [PATCH v5 5/9] block: Change the runtime power management ... Bart Van Assche
- Re: [PATCH v5 5/9] block: Change the runtime power ma... jianchao.wang
- Re: [PATCH v5 5/9] block: Change the runtime powe... jianchao.wang
- Re: [PATCH v5 5/9] block: Change the runtime ... Bart Van Assche
- Re: [PATCH v5 5/9] block: Change the runt... Ming Lei
- Re: [PATCH v5 5/9] block: Change the... Bart Van Assche
- [PATCH v5 1/9] block: Change the preempt-only flag into a ... Bart Van Assche
- [PATCH v5 4/9] percpu-refcount: Introduce percpu_ref_is_in... Bart Van Assche
- Re: [PATCH v5 4/9] percpu-refcount: Introduce percpu_... Tejun Heo
- Re: [PATCH v5 4/9] percpu-refcount: Introduce per... Bart Van Assche
