From: Hannes Reinecke <hare@suse.de>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
jejb@linux.ibm.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] scsi_host: add support for request batching
Date: Fri, 5 Jul 2019 09:51:52 +0200 [thread overview]
Message-ID: <141b9bec-77e5-4b99-a494-642bc88bb1a2@suse.de> (raw)
In-Reply-To: <20190705074418.GB10995@stefanha-x1.localdomain>
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 <hare@suse.com>
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)
next prev parent reply other threads:[~2019-07-05 7:51 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 11:28 [PATCH 0/2] scsi: add support for request batching Paolo Bonzini
2019-05-30 11:28 ` [PATCH 1/2] scsi_host: " Paolo Bonzini
2019-05-30 15:36 ` Bart Van Assche
2019-05-30 15:54 ` Paolo Bonzini
2019-05-30 17:54 ` Bart Van Assche
2019-05-31 9:12 ` Paolo Bonzini
2019-05-31 3:27 ` Ming Lei
2019-06-03 8:16 ` Paolo Bonzini
2019-07-05 1:00 ` Ming Lei
2019-06-04 22:40 ` Bart Van Assche
2019-06-19 8:11 ` Hannes Reinecke
2019-06-19 10:31 ` Paolo Bonzini
2019-07-04 13:19 ` Paolo Bonzini
2019-07-05 7:12 ` Hannes Reinecke
2019-07-05 7:44 ` Stefan Hajnoczi
2019-07-05 7:51 ` Hannes Reinecke [this message]
2019-05-30 11:28 ` [PATCH 2/2] virtio_scsi: implement " Paolo Bonzini
2019-05-30 17:28 ` Bart Van Assche
2019-05-31 9:03 ` Paolo Bonzini
2019-07-05 7:52 ` Hannes Reinecke
2019-07-08 9:47 ` Ming Lei
2019-06-10 12:36 ` [PATCH 0/2] scsi: add support for " Stefan Hajnoczi
2019-06-26 13:51 ` Paolo Bonzini
2019-06-26 14:14 ` Douglas Gilbert
2019-06-26 14:50 ` Paolo Bonzini
2019-06-27 3:37 ` Martin K. Petersen
2019-06-27 8:17 ` Paolo Bonzini
2019-07-05 7:13 ` Hannes Reinecke
2019-07-05 11:58 ` Paolo Bonzini
2019-07-12 1:37 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=141b9bec-77e5-4b99-a494-642bc88bb1a2@suse.de \
--to=hare@suse.de \
--cc=jejb@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=pbonzini@redhat.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).