Thread (23 messages) 23 messages, 5 authors, 2018-11-14

Re: [PATCH 3/6] blk-mq: embed blk_mq_ops directly in the request queue

From: Jens Axboe <axboe@kernel.dk>
Date: 2018-11-14 15:33:11

On 11/14/18 8:20 AM, Christoph Hellwig wrote:
On Sat, Nov 10, 2018 at 08:13:14AM -0700, Jens Axboe wrote:
quoted
This saves an indirect function call everytime we have to
call one of the strategy functions. We keep it const, and just
hack around that a bit in blk_mq_init_allocated_queue(), which
is where we copy the ops in.
What amount of difference does this patch make?

This really defeats the whole constification, which doesn't hinge
on the const attribute itself, but on having the static ops in
a read-only mapped section.  So unless it is a real measurable
and big enough difference I'm against this patch, and if there is
a real an measurable difference we might have to find other ways
to archive this goal.
It's measurable. It doesn't defeat the const at all, the mq_ops
is still const and is never modified outside of when the queue
is allocated. The only difference is of course that it is no
longer residing in a read only mapped section, which is a shame.

I'll try and do some specific numbers.

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help