* [PATCH] blk-mq: wire up completion notifier for laptop mode
@ 2017-09-30 8:06 Jens Axboe
2017-10-01 8:37 ` Christoph Hellwig
2017-10-02 15:44 ` Bart Van Assche
0 siblings, 2 replies; 3+ messages in thread
From: Jens Axboe @ 2017-09-30 8:06 UTC (permalink / raw)
To: linux-block
For some reason, the laptop mode IO completion notified was never wired
up for blk-mq. Ensure that we trigger the callback appropriately, to arm
the laptop mode flush timer.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 98a18609755e..09e92667be98 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -476,6 +476,9 @@ void blk_mq_free_request(struct request *rq)
if (rq->rq_flags & RQF_MQ_INFLIGHT)
atomic_dec(&hctx->nr_active);
+ if (unlikely(laptop_mode && !blk_rq_is_passthrough(rq)))
+ laptop_io_completion(q->backing_dev_info);
+
wbt_done(q->rq_wb, &rq->issue_stat);
clear_bit(REQ_ATOM_STARTED, &rq->atomic_flags);
--
Jens Axboe
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-mq: wire up completion notifier for laptop mode
2017-09-30 8:06 [PATCH] blk-mq: wire up completion notifier for laptop mode Jens Axboe
@ 2017-10-01 8:37 ` Christoph Hellwig
2017-10-02 15:44 ` Bart Van Assche
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2017-10-01 8:37 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block
On Sat, Sep 30, 2017 at 10:06:45AM +0200, Jens Axboe wrote:
> For some reason, the laptop mode IO completion notified was never wired
> up for blk-mq. Ensure that we trigger the callback appropriately, to arm
> the laptop mode flush timer.
Looks fine:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-mq: wire up completion notifier for laptop mode
2017-09-30 8:06 [PATCH] blk-mq: wire up completion notifier for laptop mode Jens Axboe
2017-10-01 8:37 ` Christoph Hellwig
@ 2017-10-02 15:44 ` Bart Van Assche
1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2017-10-02 15:44 UTC (permalink / raw)
To: linux-block, axboe
T24gU2F0LCAyMDE3LTA5LTMwIGF0IDEwOjA2ICswMjAwLCBKZW5zIEF4Ym9lIHdyb3RlOg0KPiBG
b3Igc29tZSByZWFzb24sIHRoZSBsYXB0b3AgbW9kZSBJTyBjb21wbGV0aW9uIG5vdGlmaWVkIHdh
cyBuZXZlciB3aXJlZA0KPiB1cCBmb3IgYmxrLW1xLiBFbnN1cmUgdGhhdCB3ZSB0cmlnZ2VyIHRo
ZSBjYWxsYmFjayBhcHByb3ByaWF0ZWx5LCB0byBhcm0NCj4gdGhlIGxhcHRvcCBtb2RlIGZsdXNo
IHRpbWVyLg0KDQpSZXZpZXdlZC1ieTogQmFydCBWYW4gQXNzY2hlIDxiYXJ0LnZhbmFzc2NoZUB3
ZGMuY29tPg0K
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-02 15:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-30 8:06 [PATCH] blk-mq: wire up completion notifier for laptop mode Jens Axboe
2017-10-01 8:37 ` Christoph Hellwig
2017-10-02 15:44 ` Bart Van Assche
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.