Re: [PATCH] via-ide: Avoid expensive operations in irq handler

2021-10-20 Thread BALATON Zoltan
On Wed, 20 Oct 2021, Eduardo Habkost wrote: On Mon, Oct 18, 2021 at 12:10:04PM +0200, Philippe Mathieu-Daudé wrote: On 10/18/21 11:51, BALATON Zoltan wrote: On Mon, 18 Oct 2021, Philippe Mathieu-Daudé wrote: On 10/18/21 03:36, BALATON Zoltan wrote: Cache the pointer to PCI function 0 (ISA bri

Re: [PATCH] via-ide: Avoid expensive operations in irq handler

2021-10-20 Thread John Snow
On Wed, Oct 20, 2021 at 11:18 AM Eduardo Habkost wrote: > On Wed, Oct 20, 2021 at 04:58:58PM +0200, BALATON Zoltan wrote: > > On Wed, 20 Oct 2021, Eduardo Habkost wrote: > > > On Mon, Oct 18, 2021 at 12:10:04PM +0200, Philippe Mathieu-Daudé wrote: > > > > On 10/18/21 11:51, BALATON Zoltan wrote:

Re: [PATCH] via-ide: Avoid expensive operations in irq handler

2021-10-20 Thread Eduardo Habkost
On Wed, Oct 20, 2021 at 04:58:58PM +0200, BALATON Zoltan wrote: > On Wed, 20 Oct 2021, Eduardo Habkost wrote: > > On Mon, Oct 18, 2021 at 12:10:04PM +0200, Philippe Mathieu-Daudé wrote: > > > On 10/18/21 11:51, BALATON Zoltan wrote: > > > > On Mon, 18 Oct 2021, Philippe Mathieu-Daudé wrote: > > > >

Re: [PATCH] via-ide: Avoid expensive operations in irq handler

2021-10-20 Thread BALATON Zoltan
On Wed, 20 Oct 2021, Eduardo Habkost wrote: On Mon, Oct 18, 2021 at 12:10:04PM +0200, Philippe Mathieu-Daudé wrote: On 10/18/21 11:51, BALATON Zoltan wrote: On Mon, 18 Oct 2021, Philippe Mathieu-Daudé wrote: On 10/18/21 03:36, BALATON Zoltan wrote: Cache the pointer to PCI function 0 (ISA bri

Re: [PATCH] via-ide: Avoid expensive operations in irq handler

2021-10-20 Thread Eduardo Habkost
On Mon, Oct 18, 2021 at 12:10:04PM +0200, Philippe Mathieu-Daudé wrote: > On 10/18/21 11:51, BALATON Zoltan wrote: > > On Mon, 18 Oct 2021, Philippe Mathieu-Daudé wrote: > >> On 10/18/21 03:36, BALATON Zoltan wrote: > >>> Cache the pointer to PCI function 0 (ISA bridge, that this IDE device > >>> h

Re: [PATCH] via-ide: Avoid expensive operations in irq handler

2021-10-18 Thread Philippe Mathieu-Daudé
On 10/18/21 11:51, BALATON Zoltan wrote: > On Mon, 18 Oct 2021, Philippe Mathieu-Daudé wrote: >> On 10/18/21 03:36, BALATON Zoltan wrote: >>> Cache the pointer to PCI function 0 (ISA bridge, that this IDE device >>> has to use for IRQs) in the PCIIDEState and pass that as the opaque >>> data for th

Re: [PATCH] via-ide: Avoid expensive operations in irq handler

2021-10-18 Thread BALATON Zoltan
On Mon, 18 Oct 2021, Philippe Mathieu-Daudé wrote: On 10/18/21 03:36, BALATON Zoltan wrote: Cache the pointer to PCI function 0 (ISA bridge, that this IDE device has to use for IRQs) in the PCIIDEState and pass that as the opaque data for the interrupt handler to eliminate both the need to look

Re: [PATCH] via-ide: Avoid expensive operations in irq handler

2021-10-18 Thread Philippe Mathieu-Daudé
On 10/18/21 03:36, BALATON Zoltan wrote: > Cache the pointer to PCI function 0 (ISA bridge, that this IDE device > has to use for IRQs) in the PCIIDEState and pass that as the opaque > data for the interrupt handler to eliminate both the need to look up > function 0 at every interrupt and also a QO

[PATCH] via-ide: Avoid expensive operations in irq handler

2021-10-17 Thread BALATON Zoltan
Cache the pointer to PCI function 0 (ISA bridge, that this IDE device has to use for IRQs) in the PCIIDEState and pass that as the opaque data for the interrupt handler to eliminate both the need to look up function 0 at every interrupt and also a QOM type cast of the opaque pointer as that's also