On Fri, May 15, 2020 at 09:41:52AM +0800, Ming Lei wrote: > Disable preempt for a little while during allocating request tag, so > request's tag(internal tag) is always allocated on the cpu of data->ctx, > prepare for improving to handle cpu hotplug during allocating request. > > In the following patch, hctx->state will be checked to see if it becomes > inactive which is always set on the last CPU of hctx->cpumask. I like the idea, but I hate the interface. I really think we need to moving assigning the ctx and hctx entirely into blk_mq_get_tag, and then just unconditionally disable preemption in there.