Skip to content

Commit

Permalink
block: readd plug trace event
Browse files Browse the repository at this point in the history
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: Jens Axboe <[email protected]>
  • Loading branch information
Jens Axboe committed Apr 12, 2011
1 parent f756645 commit dc6d36c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,15 @@ static int __make_request(struct request_queue *q, struct bio *bio)

plug = current->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;

__rq = list_entry_rq(plug->list.prev);
Expand Down

0 comments on commit dc6d36c

Please sign in to comment.