Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2762576ybi; Thu, 4 Jul 2019 18:58:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBoWSND0SbHqXFhHvxg7q6ogynrubmAvdI9KuFh77T979zQ9bBn/VmLtV1lu49wwVqA83D X-Received: by 2002:a17:902:fa2:: with SMTP id 31mr1465472plz.38.1562291937369; Thu, 04 Jul 2019 18:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562291937; cv=none; d=google.com; s=arc-20160816; b=yEHhH2ea4pFWI7hflTzkJXFrPqKGKuyYLzm6yj6y7rL+za1rmBDdtuFpcfSF/u43Et lslS3FfjimyhXjb0EV/Osqo4A0oNroHH1nmuQiw+1eaLFcF9B6Rxk/8AbCb9vzMREoeY YqB6lUnWBEyMM01X5J/bXBgKib6LiWgkt80c17xR0AveFOoFT0QTpqeZ3UMySzXSitf+ OwEegys0mC9xA+pwtN2OUYI33k4rDgMGJz6diniJoPHS1yId/vkJM7kGaQBFhi3826yW UAj85YfToWyv0DtfwOhQx3hdxYcdBmAZGLbAFMfVO3TvNXaDuPkXQectadaU2y/aPu3C vp0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7LtxNi+8FnUawhqN2BoV1q5YaICdoGGasmOZOaJ0jpE=; b=HwumYiJPIm/YdSSeUtT/gcdsgf7nk0tOJBf+567NgrB0UGb0Lz78aNWUt7qhUb8Xi9 kMvx0RsSGCHxZHti+2OyRi7ENAntVVs5TB9x+fNu5Ubb+UCPJDS8G96eOqR+tKGYoIgw dQPmC84sE33QONMoqrQnjQ1213Er9w0ze/RhYEV7GiFLV3SSVHjN1u2piJ8TD8/oe4ol loJ1n977nsGXvo/5f/6bAeyqC0ZcOUy3JbkLN2HxYcLLkogW3FCq+vhCRtOmvYhSfAPS sdGvKANwSCsPhavNvciX4/Hg7GRoK442vcGtlCMNB10eglWY28Upy0XB1Nvc3XHGnssJ Rp/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VeKZrTQr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b67si6574158pjc.81.2019.07.04.18.58.29; Thu, 04 Jul 2019 18:58:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VeKZrTQr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727581AbfGEBBM (ORCPT + 99 others); Thu, 4 Jul 2019 21:01:12 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:35780 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbfGEBBM (ORCPT ); Thu, 4 Jul 2019 21:01:12 -0400 Received: by mail-wm1-f68.google.com with SMTP id l2so373089wmg.0; Thu, 04 Jul 2019 18:01:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7LtxNi+8FnUawhqN2BoV1q5YaICdoGGasmOZOaJ0jpE=; b=VeKZrTQrAtr/R1e7E9LGHYxk3RCLvMhvqcvDtNJlR0UQ1jiZRVu3BYYYvOuikODeAt oJbi0tffyHcjqoJDlt4pLnVsyifrX3HzDUywgBI2/dMCFysidTg0QnoJm748YhM4zEll 1DbYw0HbwU0mXCk+kEr04e+wb/DXI1ZLJ5hXZPLz3XLn/v+4UlhKNor2c+e5Wd58cgro c5APCo3nFgKpcJE+sctXBKKDqhkBdqZL/mWnjzsA7mLv92gWaIXv3Z3mZCrp58KTWT8z dQWiO6W2dUfNuhRf4DEHO4pxKmR1iOw7BilOi39hGXWpaJwtnyuR0WdQ0orH12G1RwIR 0yIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7LtxNi+8FnUawhqN2BoV1q5YaICdoGGasmOZOaJ0jpE=; b=IKVNuvB6MaeHWsGpVSX5m6E6HYrx0tDX4bwXmE0hr98AY0dVka7axk/M2tCWMIb3SU +ENQHMyQB686D05+43bdH/VFhhjeC9QuqGylxYdBec4TM0CpE7IEMIonmGVXQgWzeJb+ MIJ60pJU1IJo8sGDyzWmSMr2a/Wp08yrUtyZx9OahWtnbWgiC4LfQJQ3JRqgQfqit2aL wohHpYp1IVG0zswRbtv9/5qlMFzHEJs9lXLBeKFAhOI7o/O5gLtQQhGAAgl17ccCJhHH 6nNHE4HZ1qGclCWCrpMPITnF21mW5gppc6q1rLe5AUz0NVpznhISfzhslRrW4jPnzAQ4 l+4w== X-Gm-Message-State: APjAAAUyp2bEuU0a2cZa96vxqUGiQJOCclTGaNyiP8hfpjO199Edk6SZ WgO3Bca81T1hwG7rWpykRX41p9pIv2ffTILb+6E= X-Received: by 2002:a05:600c:204c:: with SMTP id p12mr421726wmg.121.1562288469490; Thu, 04 Jul 2019 18:01:09 -0700 (PDT) MIME-Version: 1.0 References: <20190530112811.3066-1-pbonzini@redhat.com> <20190530112811.3066-2-pbonzini@redhat.com> In-Reply-To: From: Ming Lei Date: Fri, 5 Jul 2019 09:00:58 +0800 Message-ID: Subject: Re: [PATCH 1/2] scsi_host: add support for request batching To: Paolo Bonzini Cc: Linux Kernel Mailing List , KVM General , jejb@linux.ibm.com, "Martin K. Petersen" , Linux SCSI List , Stefan Hajnoczi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 3, 2019 at 4:16 PM Paolo Bonzini wrote: > > 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. Fair enough, at least difference would be made by the check in blk_mq_make_request() if scsi_commit_rqs is provided unconditionally, so looks fine: Reviewed-by: Ming Lei Thanks, Ming Lei