lkml.org 
[lkml]   [2018]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 09/16] blk-mq: cache request hardware queue mapping
From
Date
On 11/1/18 3:27 AM, Hannes Reinecke wrote:
> On 10/30/18 7:32 PM, Jens Axboe wrote:
>> We call blk_mq_map_queue() a lot, at least two times for each
>> request per IO, sometimes more. Since we now have an indirect
>> call as well in that function. cache the mapping so we don't
>> have to re-call blk_mq_map_queue() for the same request
>> multiple times.
>>
>> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>> ---
>> block/blk-flush.c | 12 ++++--------
>> block/blk-mq-debugfs.c | 4 +---
>> block/blk-mq-sched.c | 6 ++----
>> block/blk-mq-tag.c | 9 +--------
>> block/blk-mq.c | 22 +++++++++-------------
>> block/blk-mq.h | 5 +----
>> include/linux/blkdev.h | 1 +
>> 7 files changed, 19 insertions(+), 40 deletions(-)
>>
> Hehe.
> I had been wondering about this since the original mq implementation,
> but was told not to worry :-)

To be fair, it was just an array index. Now it's got an indirect
call, so it's more expensive.
> Reviewed-by: Hannes Reinecke <hare@suse.com>

Thanks!

--
Jens Axboe

\
 
 \ /
  Last update: 2018-11-01 13:22    [W:0.083 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site