qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] virtio: don't zero out memory region cache for indirect d


From: Stefan Hajnoczi
Subject: Re: [PATCH v2] virtio: don't zero out memory region cache for indirect descriptors
Date: Mon, 25 Sep 2023 10:17:22 -0400

On Mon, 25 Sept 2023 at 07:18, Ilya Maximets <i.maximets@ovn.org> wrote:
>
> On 8/11/23 16:34, Ilya Maximets wrote:
> > Lots of virtio functions that are on a hot path in data transmission
> > are initializing indirect descriptor cache at the point of stack
> > allocation.  It's a 112 byte structure that is getting zeroed out on
> > each call adding unnecessary overhead.  It's going to be correctly
> > initialized later via special init function.  The only reason to
> > actually initialize right away is the ability to safely destruct it.
> > Replacing a designated initializer with a function to only initialize
> > what is necessary.
> >
> > Removal of the unnecessary stack initializations improves throughput
> > of virtio-net devices in terms of 64B packets per second by 6-14 %
> > depending on the case.  Tested with a proposed af-xdp network backend
> > and a dpdk testpmd application in the guest, but should be beneficial
> > for other virtio devices as well.
> >
> > Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> > ---
> >
> > Version 2:
> >
> >   * Introduced an initialization function, so we don't need to compare
> >     pointers in the end. [Stefan]
> >   * Removed the now unused macro. [Jason]
> >
> >  hw/virtio/virtio.c    | 20 +++++++++++++++-----
> >  include/exec/memory.h | 16 +++++++++++++---
> >  2 files changed, 28 insertions(+), 8 deletions(-)
>
> Kind reminder.
>
> This patch was posted quite some time ago and it has 2 reviewed/acked-by tags.
> Just making sure it didn't fall through the cracks.

This should go through Michael's tree.

Stefan

>
> Best regards, Ilya Maximets.
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]