lkml.org 
[lkml]   [2022]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"
Hi,

On 2022-08-15 17:39:08 -0400, Michael S. Tsirkin wrote:
> On Mon, Aug 15, 2022 at 02:28:39PM -0700, Andres Freund wrote:
> > On 2022-08-15 17:04:10 -0400, Michael S. Tsirkin wrote:
> > > So virtio has a queue_size register. When read, it will give you
> > > originally the maximum queue size. Normally we just read it and
> > > use it as queue size.
> > >
> > > However, when queue memory allocation fails, and unconditionally with a
> > > network device with the problematic patch, driver is asking the
> > > hypervisor to make the ring smaller by writing a smaller value into this
> > > register.
> > >
> > > I suspect that what happens is hypervisor still uses the original value
> > > somewhere.
> >
> > It looks more like the host is never told about the changed size for legacy
> > devices...
> >
> > Indeed, adding a vp_legacy_set_queue_size() & call to it to setup_vq(), makes
> > 5.19 + restricting queue sizes to 1024 boot again.
>
> Interesting, the register is RO in the legacy interface.
> And to be frank I can't find where is vp_legacy_set_queue_size
> even implemented. It's midnight here too ...

Yea, I meant that added both vp_legacy_set_queue_size() and a call to it. I
was just quickly experimenting around.


> Yes I figured this out too. And I was able to reproduce on qemu now.

Cool.


> I'm posting a new patchset reverting all the handing of resize
> restrictions, I think we should rethink it for the next release.

Makes sense.

Greetings,

Andres Freund

\
 
 \ /
  Last update: 2022-08-16 03:56    [W:1.191 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site