Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3093803ybi; Fri, 5 Jul 2019 01:47:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkYnQNEFHKEQhMPMG+EXJJjuwpYcC2Gt5XlKL//hIW4QLQqVRni0qyusjxgvg/cRexm34y X-Received: by 2002:a63:7a01:: with SMTP id v1mr4025113pgc.310.1562316471444; Fri, 05 Jul 2019 01:47:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562316471; cv=none; d=google.com; s=arc-20160816; b=X2lKdo7PAxNjbCrbWrLaXbps5l7iQmfi5KXzSfUVclyqoUx1pFwTB0a/m81kDO+h03 +cTG+QRttLR/b2Nd2USBmYFjzjyfbfvs4Kayvte70h64Y4+JYU6f6b5X0Bqh5dWI5Rfa 8HD3Vg3e3qGp2VwFmZ51+dgZMRWo33yskuhCqltMHHd/MZ7EQ2e0p+L8i8AqaZ97gkgv TWxr+bp/IIFplCGiwt82uOvFct112KJtpb9EztDZ+RNCXxq9aQVMLdPo+gFL2EsLh0Ad 3i1jevFyZyq0iZztMlYzaAyNjeQXp4P2pf9E0b2CEkBv3cW0yDNXHA28yuoiezVET7o0 SKgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=qgCbymBhgLcS3TI44DdvKUaIRPbAnaBx2vSfJRv+p7E=; b=SoJiUkwm9rCby0Pce1pKf6pXbmfuICZoeXtBCEGUpvbxHxHqCjOQgKjS4AsP2MouC+ EdzLhgnt6THIraQo5n/yKytKPt7IgWgj8j2IBFupzkZOScqv1cJoXONdgY+KeJqcWNCZ WihUeUd4giPmpOa/xAhA8XB5X58FLWGYlz5DNvgozvdkoh84Kj6hc3ZKgW/wQU+iYZDb TCPn7wQbGB5RMy8srjcvFN5nfRNYBOrNxcdn7dfJPKkdXRORhSx40tePTtdEhMOHQl06 TGbrLMmi9KemRUHh8UC3BYPky1SH1tPbwIzGjIjNtgH637FZemhrYVSf3OCmUZOJ74W1 06xw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3si8015002plb.205.2019.07.05.01.47.36; Fri, 05 Jul 2019 01:47:51 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728046AbfGEHvz (ORCPT + 99 others); Fri, 5 Jul 2019 03:51:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:34860 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727587AbfGEHvy (ORCPT ); Fri, 5 Jul 2019 03:51:54 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A8DBCACD4; Fri, 5 Jul 2019 07:51:52 +0000 (UTC) Subject: Re: [PATCH 1/2] scsi_host: add support for request batching To: Stefan Hajnoczi Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org References: <20190530112811.3066-1-pbonzini@redhat.com> <20190530112811.3066-2-pbonzini@redhat.com> <760164a0-589d-d9fa-fb63-79b5e0899c00@suse.de> <20190705074418.GB10995@stefanha-x1.localdomain> From: Hannes Reinecke Openpgp: preference=signencrypt Autocrypt: addr=hare@suse.de; prefer-encrypt=mutual; keydata= mQINBE6KyREBEACwRN6XKClPtxPiABx5GW+Yr1snfhjzExxkTYaINHsWHlsLg13kiemsS6o7 qrc+XP8FmhcnCOts9e2jxZxtmpB652lxRB9jZE40mcSLvYLM7S6aH0WXKn8bOqpqOGJiY2bc 6qz6rJuqkOx3YNuUgiAxjuoYauEl8dg4bzex3KGkGRuxzRlC8APjHlwmsr+ETxOLBfUoRNuE b4nUtaseMPkNDwM4L9+n9cxpGbdwX0XwKFhlQMbG3rWA3YqQYWj1erKIPpgpfM64hwsdk9zZ QO1krgfULH4poPQFpl2+yVeEMXtsSou915jn/51rBelXeLq+cjuK5+B/JZUXPnNDoxOG3j3V VSZxkxLJ8RO1YamqZZbVP6jhDQ/bLcAI3EfjVbxhw9KWrh8MxTcmyJPn3QMMEp3wpVX9nSOQ tzG72Up/Py67VQe0x8fqmu7R4MmddSbyqgHrab/Nu+ak6g2RRn3QHXAQ7PQUq55BDtj85hd9 W2iBiROhkZ/R+Q14cJkWhzaThN1sZ1zsfBNW0Im8OVn/J8bQUaS0a/NhpXJWv6J1ttkX3S0c QUratRfX4D1viAwNgoS0Joq7xIQD+CfJTax7pPn9rT////hSqJYUoMXkEz5IcO+hptCH1HF3 qz77aA5njEBQrDRlslUBkCZ5P+QvZgJDy0C3xRGdg6ZVXEXJOQARAQABtCpIYW5uZXMgUmVp bmVja2UgKFN1U0UgTGFicykgPGhhcmVAc3VzZS5kZT6JAkEEEwECACsCGwMFCRLMAwAGCwkI BwMCBhUIAgkKCwQWAgMBAh4BAheABQJOisquAhkBAAoJEGz4yi9OyKjPOHoQAJLeLvr6JNHx GPcHXaJLHQiinz2QP0/wtsT8+hE26dLzxb7hgxLafj9XlAXOG3FhGd+ySlQ5wSbbjdxNjgsq FIjqQ88/Lk1NfnqG5aUTPmhEF+PzkPogEV7Pm5Q17ap22VK623MPaltEba+ly6/pGOODbKBH ak3gqa7Gro5YCQzNU0QV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5rpNNZHsbYs9Vfr/BJuSUfRI/12eOCL IvxRPpmMOlcI4WDW3EDkzqNAXn5Onx/b0rFGFpM4GmSPriEJdBb4M4pSD6fN6Y/Jrng/Bdwk SQARAQABiQIlBBgBAgAPBQJOiskRAhsMBQkSzAMAAAoJEGz4yi9OyKjPgEwQAIP/gy/Xqc1q OpzfFScswk3CEoZWSqHxn/fZasa4IzkwhTUmukuIvRew+BzwvrTxhHcz9qQ8hX7iDPTZBcUt ovWPxz+3XfbGqE+q0JunlIsP4N+K/I10nyoGdoFpMFMfDnAiMUiUatHRf9Wsif/nT6oRiPNJ T0EbbeSyIYe+ZOMFfZBVGPqBCbe8YMI+JiZeez8L9JtegxQ6O3EMQ//1eoPJ5mv5lWXLFQfx f4rAcKseM8DE6xs1+1AIsSIG6H+EE3tVm+GdCkBaVAZo2VMVapx9k8RMSlW7vlGEQsHtI0FT c1XNOCGjaP4ITYUiOpfkh+N0nUZVRTxWnJqVPGZ2Nt7xCk7eoJWTSMWmodFlsKSgfblXVfdM 9qoNScM3u0b9iYYuw/ijZ7VtYXFuQdh0XMM/V6zFrLnnhNmg0pnK6hO1LUgZlrxHwLZk5X8F uD/0MCbPmsYUMHPuJd5dSLUFTlejVXIbKTSAMd0tDSP5Ms8Ds84z5eHreiy1ijatqRFWFJRp ZtWlhGRERnDH17PUXDglsOA08HCls0PHx8itYsjYCAyETlxlLApXWdVl9YVwbQpQ+i693t/Y PGu8jotn0++P19d3JwXW8t6TVvBIQ1dRZHx1IxGLMn+CkDJMOmHAUMWTAXX2rf5tUjas8/v2 azzYF4VRJsdl+d0MCaSy8mUh Message-ID: <141b9bec-77e5-4b99-a494-642bc88bb1a2@suse.de> Date: Fri, 5 Jul 2019 09:51:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190705074418.GB10995@stefanha-x1.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/5/19 9:44 AM, Stefan Hajnoczi wrote: > On Fri, Jul 05, 2019 at 09:12:37AM +0200, Hannes Reinecke wrote: >> On 7/4/19 3:19 PM, Paolo Bonzini wrote: >>> On 19/06/19 12:31, Paolo Bonzini wrote: >>>>> I'm a bit unsure if 'bd->last' is always set; it's quite obvious that >>>>> it's present if set, but what about requests with 'bd->last == false' ? >>>>> Is there a guarantee that they will _always_ be followed with a request >>>>> with bd->last == true? >>>>> And if so, is there a guarantee that this request is part of the same batch? >>>> It's complicated. A request with bd->last == false _will_ always be >>>> followed by a request with bd->last == true in the same batch. However, >>>> due to e.g. errors it may be possible that the last request is not sent. >>>> In that case, the block layer sends commit_rqs, as documented in the >>>> comment above, to flush the requests that have been sent already. >>>> >>>> So, a driver that obeys bd->last (or SCMD_LAST) but does not implement >>>> commit_rqs is bound to have bugs, which is why this patch was not split >>>> further. >>>> >>>> Makes sense? >>> >>> Hannes, can you provide your Reviewed-by? >>> >> Well ... since you asked for it: >> >> Where is the 'commit_rqs' callback actually used? >> I seem to be going blind, but I can't find it; should be somewhere in >> the first patch, no? >> As per description: >> >> * The commit_rqs function is used to trigger a hardware >> * doorbell after some requests have been queued with >> * queuecommand, when an error is encountered before sending >> * the request with SCMD_LAST set. >> >> So it should be somewhere in the error path, probably scsi_error or >> something. But I don't seem to be able to find it ... > > The block layer calls scsi_mq_ops->commit_rqs() from > blk_mq_dispatch_rq_list() and blk_mq_try_issue_list_directly(). > Ah, right. Now, then: Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Mary Higgins, Sri Rasiah HRB 21284 (AG N?rnberg)