On 11/14/18 8:20 AM, Christoph Hellwig wrote: > On Sat, Nov 10, 2018 at 08:13:14AM -0700, Jens Axboe wrote: >> 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