Thread (28 messages) 28 messages, 5 authors, 2018-08-08

Re: [RFC PATCH 13/14] block: simplify runtime PM support

From: Bart Van Assche <hidden>
Date: 2018-08-07 19:54:44

On Wed, 2018-08-08 at 01:44 +0800, Ming Lei wrote:
quoted hunk ↗ jump to hunk
@@ -3772,6 +3764,7 @@ int blk_pre_runtime_su=
spend(struct request_queue *q)
quoted hunk ↗ jump to hunk
        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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help