Commit dc6d36c9 authored by Jens Axboe's avatar Jens Axboe

block: readd plug trace event

This was removed with the queue plug state. But we can easily readd
by checking if this is the first request going to this queue. It's
good information to have when tracing to see how effective the
plugging is.
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent f7566457
...@@ -1311,7 +1311,15 @@ static int __make_request(struct request_queue *q, struct bio *bio) ...@@ -1311,7 +1311,15 @@ static int __make_request(struct request_queue *q, struct bio *bio)
plug = current->plug; plug = current->plug;
if (plug) { if (plug) {
if (!plug->should_sort && !list_empty(&plug->list)) { /*
* If this is the first request added after a plug, fire
* of a plug trace. If others have been added before, check
* if we have multiple devices in this plug. If so, make a
* note to sort the list before dispatch.
*/
if (list_empty(&plug->list))
trace_block_plug(q);
else if (!plug->should_sort) {
struct request *__rq; struct request *__rq;
__rq = list_entry_rq(plug->list.prev); __rq = list_entry_rq(plug->list.prev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment