Re: [RFC PATCH 13/14] block: simplify runtime PM support
From: Bart Van Assche <hidden>
Date: 2018-08-07 19:54:44
From: Bart Van Assche <hidden>
Date: 2018-08-07 19:54:44
On Wed, 2018-08-08 at 01:44 +0800, Ming Lei wrote:
@@ -3772,6 +3764,7 @@ int blk_pre_runtime_su=
spend(struct request_queue *q)
if (!q->dev) return ret; =20 + mutex_lock(&q->pm_lock); spin_lock_irq(q->queue_lock); if (q->nr_pending) { ret = -EBUSY;@@ -3780,6 +3773,13 @@ int blk_pre_runtime_s=
uspend(struct request_queue *q)
q->rpm_status = RPM_SUSPENDING;
}Hello Ming, As far as I can see none of the patches in this series adds a call to blk_pm_add_request() in the blk-mq code. Does that mean that q-=
nr_pending
will always be zero for blk-mq code with your approach and hence that runti= me suspend can get triggered while I/O is in progress, e.g. if blk_queue� F8-enter() is called concurrently with blk_pre_runtime_suspend()? Thanks, Bart.