1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-16 19:45:39 +00:00
Omar Sandoval da55f2cc78 blk-mq: use sbq wait queues instead of restart for driver tags
Commit 50e1dab86aa2 ("blk-mq-sched: fix starvation for multiple hardware
queues and shared tags") fixed one starvation issue for shared tags.
However, we can still get into a situation where we fail to allocate a
tag because all tags are allocated but we don't have any pending
requests on any hardware queue.

One solution for this would be to restart all queues that share a tag
map, but that really sucks. Ideally, we could just block and wait for a
tag, but that isn't always possible from blk_mq_dispatch_rq_list().

However, we can still use the struct sbitmap_queue wait queues with a
custom callback instead of blocking. This has a few benefits:

1. It avoids iterating over all hardware queues when completing an I/O,
   which the current restart code has to do.
2. It benefits from the existing rolling wakeup code.
3. It avoids punting to another thread just to have it block.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2017-02-23 11:55:46 -07:00
..
2016-12-14 20:42:45 -08:00
2016-12-16 11:23:34 -08:00
2016-11-17 23:19:00 +01:00
2016-12-14 10:49:33 -08:00
2017-02-20 17:26:11 -08:00
2016-12-15 16:03:25 -08:00
2016-12-13 11:10:36 -08:00
2017-02-20 17:55:15 -08:00
2016-12-22 22:58:37 -05:00
2016-12-08 13:31:11 -05:00
2016-12-08 16:37:33 -08:00
2016-12-13 11:18:24 -08:00
2017-02-04 00:47:59 +01:00
2016-12-05 19:01:16 -05:00
2017-02-02 10:20:16 -07:00
2016-12-13 11:42:18 -08:00
2016-10-28 08:48:16 -06:00
2016-11-25 10:15:13 -08:00
2016-12-05 19:01:16 -05:00
2017-01-16 14:03:31 -05:00
2016-12-15 13:49:34 -08:00
2016-12-25 17:21:22 +01:00
2017-02-10 11:15:08 +01:00
2016-11-30 14:36:01 +11:00
2017-02-01 09:13:45 +01:00
2016-12-16 09:26:42 -08:00
2016-12-12 18:55:06 -08:00
2016-12-25 17:21:23 +01:00
2016-12-06 11:05:46 +01:00
2016-11-16 18:32:02 -05:00
2016-12-19 17:29:44 -05:00
2016-12-12 18:55:07 -08:00
2016-11-10 17:03:35 +01:00
2016-12-06 10:17:03 +02:00
2016-12-15 12:46:48 -08:00
2016-12-15 12:46:48 -08:00
2016-10-31 16:18:30 -04:00
2016-12-13 11:42:18 -08:00
2016-12-13 11:42:18 -08:00
2016-12-13 16:07:55 -08:00
2016-11-15 16:34:27 -08:00
2016-10-31 15:45:18 -07:00
2017-01-10 18:31:55 -08:00
2016-12-25 17:21:22 +01:00
2017-02-10 11:15:08 +01:00
2017-01-10 18:31:55 -08:00
2016-12-09 22:12:21 -05:00
2016-12-12 18:55:08 -08:00
2016-12-25 17:21:22 +01:00