diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-16 21:49:16 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-16 21:49:16 -0400 |
| commit | d82312c80860b8b83cd4473ac6eafd244e712061 (patch) | |
| tree | 028b2e843e9d59d35aeb8924582864f18aa4ca36 /include/linux | |
| parent | 7d69cff26ceadce8638cb65191285932a3de3d4c (diff) | |
| parent | 889fa31f00b218a2cef96c32a6b3f57e6d3bf918 (diff) | |
Merge branch 'for-4.1/core' of git://git.kernel.dk/linux-block
Pull block layer core bits from Jens Axboe:
"This is the core pull request for 4.1. Not a lot of stuff in here for
this round, mostly little fixes or optimizations. This pull request
contains:
- An optimization that speeds up queue runs on blk-mq, especially for
the case where there's a large difference between nr_cpu_ids and
the actual mapped software queues on a hardware queue. From Chong
Yuan.
- Honor node local allocations for requests on legacy devices. From
David Rientjes.
- Cleanup of blk_mq_rq_to_pdu() from me.
- exit_aio() fixup from me, greatly speeding up exiting multiple IO
contexts off exit_group(). For my particular test case, fio exit
took ~6 seconds. A typical case of both exposing RCU grace periods
to user space, and serializing exit of them.
- Make blk_mq_queue_enter() honor the gfp mask passed in, so we only
wait if __GFP_WAIT is set. From Keith Busch.
- blk-mq exports and two added helpers from Mike Snitzer, which will
be used by the dm-mq code.
- Cleanups of blk-mq queue init from Wei Fang and Xiaoguang Wang"
* 'for-4.1/core' of git://git.kernel.dk/linux-block:
blk-mq: reduce unnecessary software queue looping
aio: fix serial draining in exit_aio()
blk-mq: cleanup blk_mq_rq_to_pdu()
blk-mq: put blk_queue_rq_timeout together in blk_mq_init_queue()
block: remove redundant check about 'set->nr_hw_queues' in blk_mq_alloc_tag_set()
block: allocate request memory local to request queue
blk-mq: don't wait in blk_mq_queue_enter() if __GFP_WAIT isn't set
blk-mq: export blk_mq_run_hw_queues
blk-mq: add blk_mq_init_allocated_queue and export blk_mq_register_disk
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/blk-mq.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 7aec86127335..8210e8797c12 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h | |||
| @@ -164,6 +164,8 @@ enum { | |||
| 164 | << BLK_MQ_F_ALLOC_POLICY_START_BIT) | 164 | << BLK_MQ_F_ALLOC_POLICY_START_BIT) |
| 165 | 165 | ||
| 166 | struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *); | 166 | struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *); |
| 167 | struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set, | ||
| 168 | struct request_queue *q); | ||
| 167 | void blk_mq_finish_init(struct request_queue *q); | 169 | void blk_mq_finish_init(struct request_queue *q); |
| 168 | int blk_mq_register_disk(struct gendisk *); | 170 | int blk_mq_register_disk(struct gendisk *); |
| 169 | void blk_mq_unregister_disk(struct gendisk *); | 171 | void blk_mq_unregister_disk(struct gendisk *); |
| @@ -218,6 +220,7 @@ void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx); | |||
| 218 | void blk_mq_stop_hw_queues(struct request_queue *q); | 220 | void blk_mq_stop_hw_queues(struct request_queue *q); |
| 219 | void blk_mq_start_hw_queues(struct request_queue *q); | 221 | void blk_mq_start_hw_queues(struct request_queue *q); |
| 220 | void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async); | 222 | void blk_mq_start_stopped_hw_queues(struct request_queue *q, bool async); |
| 223 | void blk_mq_run_hw_queues(struct request_queue *q, bool async); | ||
| 221 | void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); | 224 | void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); |
| 222 | void blk_mq_tag_busy_iter(struct blk_mq_hw_ctx *hctx, busy_iter_fn *fn, | 225 | void blk_mq_tag_busy_iter(struct blk_mq_hw_ctx *hctx, busy_iter_fn *fn, |
| 223 | void *priv); | 226 | void *priv); |
| @@ -227,7 +230,7 @@ void blk_mq_freeze_queue_start(struct request_queue *q); | |||
| 227 | 230 | ||
| 228 | /* | 231 | /* |
| 229 | * Driver command data is immediately after the request. So subtract request | 232 | * Driver command data is immediately after the request. So subtract request |
| 230 | * size to get back to the original request. | 233 | * size to get back to the original request, add request size to get the PDU. |
| 231 | */ | 234 | */ |
| 232 | static inline struct request *blk_mq_rq_from_pdu(void *pdu) | 235 | static inline struct request *blk_mq_rq_from_pdu(void *pdu) |
| 233 | { | 236 | { |
| @@ -235,7 +238,7 @@ static inline struct request *blk_mq_rq_from_pdu(void *pdu) | |||
| 235 | } | 238 | } |
| 236 | static inline void *blk_mq_rq_to_pdu(struct request *rq) | 239 | static inline void *blk_mq_rq_to_pdu(struct request *rq) |
| 237 | { | 240 | { |
| 238 | return (void *) rq + sizeof(*rq); | 241 | return rq + 1; |
| 239 | } | 242 | } |
| 240 | 243 | ||
| 241 | #define queue_for_each_hw_ctx(q, hctx, i) \ | 244 | #define queue_for_each_hw_ctx(q, hctx, i) \ |
