summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2018-09-26 17:01:10 -0400
committerJens Axboe <axboe@kernel.dk>2018-09-26 17:11:29 -0400
commit986d413b7c156e69198dfc80fb74aa18d0ddef44 (patch)
treee0fcd51efae63e0a77af2d7213771e82ce757b4d /block/blk-mq.c
parent7cedffec8e759480f7f7a9be9cd0d7ebf0aafff2 (diff)
blk-mq: Enable support for runtime power management
Now that the blk-mq core processes power management requests (marked with RQF_PREEMPT) in other states than RPM_ACTIVE, enable runtime power management for blk-mq. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Jianchao Wang <jianchao.w.wang@oracle.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Johannes Thumshirn <jthumshirn@suse.de> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 96d501e8663c..d384ab700afd 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -33,6 +33,7 @@
33#include "blk-mq.h" 33#include "blk-mq.h"
34#include "blk-mq-debugfs.h" 34#include "blk-mq-debugfs.h"
35#include "blk-mq-tag.h" 35#include "blk-mq-tag.h"
36#include "blk-pm.h"
36#include "blk-stat.h" 37#include "blk-stat.h"
37#include "blk-mq-sched.h" 38#include "blk-mq-sched.h"
38#include "blk-rq-qos.h" 39#include "blk-rq-qos.h"
@@ -475,6 +476,7 @@ static void __blk_mq_free_request(struct request *rq)
475 struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, ctx->cpu); 476 struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, ctx->cpu);
476 const int sched_tag = rq->internal_tag; 477 const int sched_tag = rq->internal_tag;
477 478
479 blk_pm_mark_last_busy(rq);
478 if (rq->tag != -1) 480 if (rq->tag != -1)
479 blk_mq_put_tag(hctx, hctx->tags, ctx, rq->tag); 481 blk_mq_put_tag(hctx, hctx->tags, ctx, rq->tag);
480 if (sched_tag != -1) 482 if (sched_tag != -1)