aboutsummaryrefslogtreecommitdiff
path: root/block/elevator.c
diff options
context:
space:
mode:
authorTatyana Brokhman <tlinder@codeaurora.org>2012-12-04 16:04:15 +0200
committerMoyster <oysterized@gmail.com>2016-08-26 20:07:39 +0200
commitbe8fae6f6fbf2ac2bfdf21b571333b3e98f7c5a9 (patch)
treeb09f8a26bb2223d9d990e75a39d5a9d5dd99d545 /block/elevator.c
parent82356c71fd5b6b4ace46e4f31c318cc68657a598 (diff)
block: Add API for urgent request handling
This patch add support in block & elevator layers for handling urgent requests. The decision if a request is urgent or not is taken by the scheduler. Urgent request notification is passed to the underlying block device driver (eMMC for example). Block device driver may decide to interrupt the currently running low priority request to serve the new urgent request. By doing so READ latency is greatly reduced in read&write collision scenarios. Note that if the current scheduler doesn't implement the urgent request mechanism, this code path is never activated. Change-Id: I8aa74b9b45c0d3a2221bd4e82ea76eb4103e7cfa Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 3d1c3a729..3bfb00dbb 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -786,6 +786,11 @@ void elv_completed_request(struct request_queue *q, struct request *rq)
{
struct elevator_queue *e = q->elevator;
+ if (test_bit(REQ_ATOM_URGENT, &rq->atomic_flags)) {
+ q->notified_urgent = false;
+ q->dispatched_urgent = false;
+ blk_clear_rq_urgent(rq);
+ }
/*
* request is released from the driver, io must be done
*/