[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [PATCH V5 1/2] virtio-gpio: Add the device specification
On 16-07-21, 21:56, Viresh Kumar wrote: > On Fri, 16 Jul 2021 at 13:54, Arnd Bergmann <arnd@kernel.org> wrote: > > As they are always treated as a transaction, wouldn't it be easier to have > > a single virtqueue and make each transaction have both an input and an > > output buffer? > parallel > > That's what I did initially (and that's we did in I2C as well), but > then I realised > that it may not work well with transactions done in parallel. > > For example, we want to allow setting direction to input for pins 5 and 8 in > parallel. I at that time thought that with using a single virtqueue for both > request/response messages may block the virtqueue for further usage. But > now that I think about it a bit more, it may not. > > We should still be able to identify different response messages based on the > address of the buffer (for example) and so what you are suggesting may > actually work and won't be a bottleneck as I thought of it earlier. > > If this works fine, I will move back to one virtqueue for all non-irq > stuff, like I > had until V4 and one virtqueue only for interrupt processing. Okay, I tested this and it works. I was able to send multiple requests in parallel and it worked out fine. So I am going to switch back to what I had earlier, i.e. one virtqueue for all requests originating from driver and its response from device. And a different virtqueue for interrupts. -- viresh
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]