Re: [Qemu-devel] [PATCH v2] lsi: Reselection needed to remove pending commands from queue

2018-10-24 Thread Paolo Bonzini
On 24/10/2018 15:06, George Kennedy wrote: >> >> >> Why didn't lsi_do_command invoke lsi_queue_command?  That would set >> s->current to NULL (on the SCSI level, that means the bus is freed; on >> the QEMU level, the idea is that lsi_transfer_data would then start a >> reselection). > > Through

Re: [Qemu-devel] [PATCH v2] lsi: Reselection needed to remove pending commands from queue

2018-10-24 Thread George Kennedy
On 10/23/2018 6:31 PM, Paolo Bonzini wrote: On 24/10/2018 00:11, George Kennedy wrote: What about "req->hba_private != s->current"?  That should cause a call to lsi_queue_req, and then you can check s->want_resel in lsi_queue_req. For the extended period of time where lsi_queue_req() is not

Re: [Qemu-devel] [PATCH v2] lsi: Reselection needed to remove pending commands from queue

2018-10-23 Thread Paolo Bonzini
On 24/10/2018 00:11, George Kennedy wrote: >>> >> What about "req->hba_private != s->current"?  That should cause a call >> to lsi_queue_req, and then you can check s->want_resel in lsi_queue_req. > > For the extended period of time where lsi_queue_req() is not being > called from

Re: [Qemu-devel] [PATCH v2] lsi: Reselection needed to remove pending commands from queue

2018-10-23 Thread George Kennedy
On 10/23/2018 5:50 PM, Paolo Bonzini wrote: On 23/10/2018 23:36, George Kennedy wrote: On 10/23/2018 10:33 AM, Paolo Bonzini wrote: On 22/10/2018 23:28, George Kennedy wrote: As you suggested I moved the loading of "s->resel_dsp" down to the "Wait Reselect" case. The address of the

Re: [Qemu-devel] [PATCH v2] lsi: Reselection needed to remove pending commands from queue

2018-10-23 Thread Paolo Bonzini
On 23/10/2018 23:36, George Kennedy wrote: > > > On 10/23/2018 10:33 AM, Paolo Bonzini wrote: >> On 22/10/2018 23:28, George Kennedy wrote: >>> As you suggested I moved the loading of "s->resel_dsp" down to the >>> "Wait Reselect" >>> case. The address of the Reselection Scripts, though, is

Re: [Qemu-devel] [PATCH v2] lsi: Reselection needed to remove pending commands from queue

2018-10-23 Thread George Kennedy
On 10/23/2018 10:33 AM, Paolo Bonzini wrote: On 22/10/2018 23:28, George Kennedy wrote: As you suggested I moved the loading of "s->resel_dsp" down to the "Wait Reselect" case. The address of the Reselection Scripts, though, is contained in "s->dsp - 8" and not in s->dnad. Are you sure?

Re: [Qemu-devel] [PATCH v2] lsi: Reselection needed to remove pending commands from queue

2018-10-23 Thread Paolo Bonzini
On 22/10/2018 23:28, George Kennedy wrote: > As you suggested I moved the loading of "s->resel_dsp" down to the "Wait > Reselect" > case. The address of the Reselection Scripts, though, is contained in "s->dsp > - 8" > and not in s->dnad. Are you sure? s->dsp - 8 should be the address of the

[Qemu-devel] [PATCH v2] lsi: Reselection needed to remove pending commands from queue

2018-10-22 Thread George Kennedy
Under heavy IO (e.g. fio) the queue is not checked frequently enough for pending commands. As a result some pending commands are timed out by the linux sym53c8xx driver, which sends SCSI Abort messages for the timed out commands. The SCSI Abort messages result in linux errors, which show up in