Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-02-06 Thread Stefan Hajnoczi
On Fri, Feb 02, 2024 at 01:32:39PM +0100, Hanna Czenczek wrote: > On 01.02.24 16:25, Hanna Czenczek wrote: > > On 01.02.24 15:28, Stefan Hajnoczi wrote: > > [...] > > > > Did you find a scenario where the virtio-scsi AioContext is different > > > from the scsi-hd BB's Aiocontext? > > > >

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-02-02 Thread Hanna Czenczek
On 01.02.24 16:25, Hanna Czenczek wrote: On 01.02.24 15:28, Stefan Hajnoczi wrote: [...] Did you find a scenario where the virtio-scsi AioContext is different from the scsi-hd BB's Aiocontext? Technically, that’s the reason for this thread, specifically that virtio_scsi_hotunplug()

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-02-01 Thread Hanna Czenczek
On 01.02.24 16:25, Hanna Czenczek wrote: [...] It just seems simpler to me to not rely on the BB's context at all. Hm, I now see the problem is that the processing (and scheduling) is largely done in generic SCSI code, which doesn’t have access to virtio-scsi’s context, only to that of the

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-02-01 Thread Hanna Czenczek
On 01.02.24 15:28, Stefan Hajnoczi wrote: On Thu, Feb 01, 2024 at 03:10:12PM +0100, Hanna Czenczek wrote: On 31.01.24 21:35, Stefan Hajnoczi wrote: On Fri, Jan 26, 2024 at 04:24:49PM +0100, Hanna Czenczek wrote: On 26.01.24 14:18, Kevin Wolf wrote: Am 25.01.2024 um 18:32 hat Hanna Czenczek

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-02-01 Thread Stefan Hajnoczi
On Thu, Feb 01, 2024 at 03:10:12PM +0100, Hanna Czenczek wrote: > On 31.01.24 21:35, Stefan Hajnoczi wrote: > > On Fri, Jan 26, 2024 at 04:24:49PM +0100, Hanna Czenczek wrote: > > > On 26.01.24 14:18, Kevin Wolf wrote: > > > > Am 25.01.2024 um 18:32 hat Hanna Czenczek geschrieben: > > > > > On

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-02-01 Thread Hanna Czenczek
On 31.01.24 21:35, Stefan Hajnoczi wrote: On Fri, Jan 26, 2024 at 04:24:49PM +0100, Hanna Czenczek wrote: On 26.01.24 14:18, Kevin Wolf wrote: Am 25.01.2024 um 18:32 hat Hanna Czenczek geschrieben: On 23.01.24 18:10, Kevin Wolf wrote: Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben:

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-02-01 Thread Hanna Czenczek
On 01.02.24 11:21, Kevin Wolf wrote: Am 01.02.2024 um 10:43 hat Hanna Czenczek geschrieben: On 31.01.24 11:17, Kevin Wolf wrote: Am 29.01.2024 um 17:30 hat Hanna Czenczek geschrieben: I don’t like using drain as a form of lock specifically against AioContext changes, but maybe Stefan is

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-02-01 Thread Kevin Wolf
Am 01.02.2024 um 10:43 hat Hanna Czenczek geschrieben: > On 31.01.24 11:17, Kevin Wolf wrote: > > Am 29.01.2024 um 17:30 hat Hanna Czenczek geschrieben: > > > I don’t like using drain as a form of lock specifically against AioContext > > > changes, but maybe Stefan is right, and we should use it

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-02-01 Thread Hanna Czenczek
On 31.01.24 11:17, Kevin Wolf wrote: Am 29.01.2024 um 17:30 hat Hanna Czenczek geschrieben: I don’t like using drain as a form of lock specifically against AioContext changes, but maybe Stefan is right, and we should use it in this specific case to get just the single problem fixed.  (Though

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-31 Thread Stefan Hajnoczi
On Fri, Jan 26, 2024 at 04:24:49PM +0100, Hanna Czenczek wrote: > On 26.01.24 14:18, Kevin Wolf wrote: > > Am 25.01.2024 um 18:32 hat Hanna Czenczek geschrieben: > > > On 23.01.24 18:10, Kevin Wolf wrote: > > > > Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: > > > > > On 21.12.23 22:23,

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-31 Thread Kevin Wolf
Am 29.01.2024 um 17:30 hat Hanna Czenczek geschrieben: > I don’t like using drain as a form of lock specifically against AioContext > changes, but maybe Stefan is right, and we should use it in this specific > case to get just the single problem fixed.  (Though it’s not quite trivial > either. 

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-29 Thread Hanna Czenczek
On 23.01.24 18:10, Kevin Wolf wrote: Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: On 21.12.23 22:23, Kevin Wolf wrote: From: Stefan Hajnoczi Stop depending on the AioContext lock and instead access SCSIDevice->requests from only one thread at a time: - When the VM is running only

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-26 Thread Hanna Czenczek
On 26.01.24 14:18, Kevin Wolf wrote: Am 25.01.2024 um 18:32 hat Hanna Czenczek geschrieben: On 23.01.24 18:10, Kevin Wolf wrote: Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: On 21.12.23 22:23, Kevin Wolf wrote: From: Stefan Hajnoczi Stop depending on the AioContext lock and

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-26 Thread Kevin Wolf
Am 25.01.2024 um 18:32 hat Hanna Czenczek geschrieben: > On 23.01.24 18:10, Kevin Wolf wrote: > > Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: > > > On 21.12.23 22:23, Kevin Wolf wrote: > > > > From: Stefan Hajnoczi > > > > > > > > Stop depending on the AioContext lock and instead

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-25 Thread Hanna Czenczek
On 23.01.24 18:10, Kevin Wolf wrote: Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: On 21.12.23 22:23, Kevin Wolf wrote: From: Stefan Hajnoczi Stop depending on the AioContext lock and instead access SCSIDevice->requests from only one thread at a time: - When the VM is running only

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-25 Thread Stefan Hajnoczi
On Thu, Jan 25, 2024 at 10:06:51AM +0100, Hanna Czenczek wrote: > On 24.01.24 22:53, Stefan Hajnoczi wrote: > > On Wed, Jan 24, 2024 at 01:12:47PM +0100, Hanna Czenczek wrote: > > > On 23.01.24 18:10, Kevin Wolf wrote: > > > > Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: > > > > > On

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-25 Thread Hanna Czenczek
On 24.01.24 22:53, Stefan Hajnoczi wrote: On Wed, Jan 24, 2024 at 01:12:47PM +0100, Hanna Czenczek wrote: On 23.01.24 18:10, Kevin Wolf wrote: Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: On 21.12.23 22:23, Kevin Wolf wrote: From: Stefan Hajnoczi Stop depending on the AioContext

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-24 Thread Stefan Hajnoczi
On Wed, Jan 24, 2024 at 01:12:47PM +0100, Hanna Czenczek wrote: > On 23.01.24 18:10, Kevin Wolf wrote: > > Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: > > > On 21.12.23 22:23, Kevin Wolf wrote: > > > > From: Stefan Hajnoczi > > > > > > > > Stop depending on the AioContext lock and

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-24 Thread Hanna Czenczek
On 23.01.24 18:10, Kevin Wolf wrote: Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: On 21.12.23 22:23, Kevin Wolf wrote: From: Stefan Hajnoczi Stop depending on the AioContext lock and instead access SCSIDevice->requests from only one thread at a time: - When the VM is running only

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-23 Thread Hanna Czenczek
On 23.01.24 18:10, Kevin Wolf wrote: Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: On 21.12.23 22:23, Kevin Wolf wrote: From: Stefan Hajnoczi Stop depending on the AioContext lock and instead access SCSIDevice->requests from only one thread at a time: - When the VM is running only

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-23 Thread Hanna Czenczek
On 23.01.24 17:40, Hanna Czenczek wrote: On 21.12.23 22:23, Kevin Wolf wrote: From: Stefan Hajnoczi Stop depending on the AioContext lock and instead access SCSIDevice->requests from only one thread at a time: - When the VM is running only the BlockBackend's AioContext may access the

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-23 Thread Kevin Wolf
Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: > On 21.12.23 22:23, Kevin Wolf wrote: > > From: Stefan Hajnoczi > > > > Stop depending on the AioContext lock and instead access > > SCSIDevice->requests from only one thread at a time: > > - When the VM is running only the BlockBackend's

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-23 Thread Hanna Czenczek
On 21.12.23 22:23, Kevin Wolf wrote: From: Stefan Hajnoczi Stop depending on the AioContext lock and instead access SCSIDevice->requests from only one thread at a time: - When the VM is running only the BlockBackend's AioContext may access the requests list. - When the VM is stopped only the

[PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2023-12-21 Thread Kevin Wolf
From: Stefan Hajnoczi Stop depending on the AioContext lock and instead access SCSIDevice->requests from only one thread at a time: - When the VM is running only the BlockBackend's AioContext may access the requests list. - When the VM is stopped only the main loop may access the requests