On Sat, Apr 25, 2020 at 05:48:32PM +0200, Christoph Hellwig wrote: > FYI, here is what I think we should be doing (but the memory model > experts please correct me): > > - just drop the direct_issue flag and check for the CPU, which is > cheap enough That isn't correct because the CPU for running async queue may not be same with rq->mq_ctx->cpu since hctx->cpumask may include several CPUs and we run queue in RR style and it is really a normal case. So I'd rather to keep 'direct_issue' flag given it is just a constant argument and gcc is smart enough to optimize this case if you don't have better idea. > - replace the raw_smp_processor_id with a get_cpu to make sure we > don't hit the tiny migration windows Will do that. > - a bunch of random cleanups to make the code easier to read, mostly > by being more self-documenting or improving the comments. The cleanup code looks fine. Thanks, Ming