diff options
author | Paul Reioux <reioux@gmail.com> | 2013-04-28 13:06:39 -0500 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-01-08 10:43:00 +0100 |
commit | 64e9529ff6dbf1f31db431ea63b27ed778602327 (patch) | |
tree | 236cbbecc010f30e46eb0736e2421a5cf96fbf23 | |
parent | 0b81e78e9c06a4031d33adf516975a2e1ecc7288 (diff) | |
download | kernel_samsung_tuna-64e9529ff6dbf1f31db431ea63b27ed778602327.zip kernel_samsung_tuna-64e9529ff6dbf1f31db431ea63b27ed778602327.tar.gz kernel_samsung_tuna-64e9529ff6dbf1f31db431ea63b27ed778602327.tar.bz2 |
block: urgent request: remove unnecessary urgent marking
An urgent request is marked by the scheduler in rq->cmd_flags with the
REQ_URGENT flag. There is no need to add an additional marking by
the block layer.
Change-Id: I05d5e9539d2f6c1bfa80240b0671db197a5d3b3f
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
modified for Tuna hybrid kernel
Signed-off-by: Paul Reioux <reioux@gmail.com>
-rw-r--r-- | block/blk-core.c | 8 | ||||
-rw-r--r-- | block/blk.h | 11 | ||||
-rw-r--r-- | block/elevator.c | 4 |
3 files changed, 4 insertions, 19 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 4985917..d8523be 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2120,13 +2120,9 @@ struct request *blk_fetch_request(struct request_queue *q) rq = blk_peek_request(q); if (rq) { - /* - * Assumption: the next request fetched from scheduler after we - * notified "urgent request pending" - will be the urgent one - */ - if (q->notified_urgent && !q->dispatched_urgent) { + if (rq->cmd_flags & REQ_URGENT) { + WARN_ON(q->dispatched_urgent); q->dispatched_urgent = true; - (void)blk_mark_rq_urgent(rq); } blk_start_request(rq); } diff --git a/block/blk.h b/block/blk.h index ac90d24..9c12f80 100644 --- a/block/blk.h +++ b/block/blk.h @@ -39,7 +39,6 @@ void __generic_unplug_device(struct request_queue *); */ enum rq_atomic_flags { REQ_ATOM_COMPLETE = 0, - REQ_ATOM_URGENT = 1, }; /* @@ -56,16 +55,6 @@ static inline void blk_clear_rq_complete(struct request *rq) clear_bit(REQ_ATOM_COMPLETE, &rq->atomic_flags); } -static inline int blk_mark_rq_urgent(struct request *rq) -{ - return test_and_set_bit(REQ_ATOM_URGENT, &rq->atomic_flags); -} - -static inline void blk_clear_rq_urgent(struct request *rq) -{ - clear_bit(REQ_ATOM_URGENT, &rq->atomic_flags); -} - /* * Internal elevator interface */ diff --git a/block/elevator.c b/block/elevator.c index 442d727..6e2b94b 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -781,10 +781,10 @@ 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)) { + if (rq->cmd_flags & REQ_URGENT) { q->notified_urgent = false; + WARN_ON(!q->dispatched_urgent); q->dispatched_urgent = false; - blk_clear_rq_urgent(rq); } /* * request is released from the driver, io must be done |