From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 1/2] scsi_host: add support for request batching Date: Mon, 3 Jun 2019 10:16:21 +0200 Message-ID: References: <20190530112811.3066-1-pbonzini@redhat.com> <20190530112811.3066-2-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Ming Lei Cc: Linux Kernel Mailing List , KVM General , jejb@linux.ibm.com, "Martin K. Petersen" , Linux SCSI List , Stefan Hajnoczi List-Id: linux-scsi@vger.kernel.org On 31/05/19 05:27, Ming Lei wrote: > It should be fine to implement scsi_commit_rqs() as: > > if (shost->hostt->commit_rqs) > shost->hostt->commit_rqs(shost, hctx->queue_num); > > then scsi_mq_ops_no_commit can be saved. > > Because .commit_rqs() is only called when BLK_STS_*_RESOURCE is > returned from scsi_queue_rq(), at that time shost->hostt->commit_rqs should > have been hit from cache given .queuecommand is called via > host->hostt->queuecommand. This is not about d-cache, it's about preserving the heuristics that blk-mq applies depending on whether commit_rqs is there or not. Paolo