Skip to contentSkip to conversation

blk-mq: wire up completion notifier for laptop mode

PATCH In review Jens Axboe 3 participants 3 messages Sep 30, 2017 – Oct 2, 2017 Block layer

lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

PATCH 1/1 blk-mq: wire up completion notifier for laptop mode

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.

block/blk-mq.c +3 -0
index 98a18609755e..09e92667be98 100644
@@ -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);
Signature · 1 line
Jens Axboe
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Jens Axboe

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:

#2 lore raw
In reply to Jens Axboe

T24gU2F0LCAyMDE3LTA5LTMwIGF0IDEwOjA2ICswMjAwLCBKZW5zIEF4Ym9lIHdyb3RlOg0KPiBG b3Igc29tZSByZWFzb24sIHRoZSBsYXB0b3AgbW9kZSBJTyBjb21wbGV0aW9uIG5vdGlmaWVkIHdh cyBuZXZlciB3aXJlZA0KPiB1cCBmb3IgYmxrLW1xLiBFbnN1cmUgdGhhdCB3ZSB0cmlnZ2VyIHRo ZSBjYWxsYmFjayBhcHByb3ByaWF0ZWx5LCB0byBhcm0NCj4gdGhlIGxhcHRvcCBtb2RlIGZsdXNo IHRpbWVyLg0KDQpSZXZpZXdlZC1ieTogQmFydCBWYW4gQXNzY2hlIDxiYXJ0LnZhbmFzc2NoZUB3 ZGMuY29tPg0K