mbox series

[v7,0/7] vhost: Fix and improve NUMA reallocation

Message ID 20210629161133.79472-1-maxime.coquelin@redhat.com (mailing list archive)
Headers show
Series vhost: Fix and improve NUMA reallocation | expand

Message

Maxime Coquelin June 29, 2021, 4:11 p.m. UTC
This patch series first fixes missing reallocations of some
Virtqueue and device metadata.

Then, it improves the numa_realloc function by using
rte_realloc_socket API that takes care of the memcpy &
freeing. The VQs NUMA IDs are also saved in the VQ metadata
and used for every allocations so that all allocations
before NUMA realloc are on the same VQ, later ones are
allocated on the proper one.

Finally inflight feature metada are converted from calloc()
to rte_zmalloc_socket() and their reallocation is handled
in numa_realloc().

Changes in v7:
==============
- Fix missing free() to rte_free() conversion (Chenbo)
- Add R-by's

Changes in v6:
==============
- Send the complete series

Changes in v5:
==============
- Do not reallocate if VS is ready (Chenbo)
- Fix typos & cosmetics (Chenbo)
- Improve numa_realloc() comment (Chenbo)

Changes in v4:
==============
- Check Vhose device numa node to avoid rte_realloc_socket
  to realloc even if already right node/size/align.

Changes in v3:
==============
- Fix copy/paste issues (David)
- Ad new patch to fix multiqueue reallocation

Changes in v2:
==============
- Add missing NUMA realloc in patch 6

Maxime Coquelin (7):
  vhost: fix missing memory table NUMA realloc
  vhost: fix missing guest pages table NUMA realloc
  vhost: fix missing cache logging NUMA realloc
  vhost: fix NUMA reallocation with multiqueue
  vhost: improve NUMA reallocation
  vhost: allocate all data on same node as virtqueue
  vhost: convert inflight data to DPDK allocation API

 lib/vhost/vhost.c      |  38 +++---
 lib/vhost/vhost.h      |   1 +
 lib/vhost/vhost_user.c | 278 ++++++++++++++++++++++++++---------------
 3 files changed, 198 insertions(+), 119 deletions(-)

Comments

David Marchand June 30, 2021, 7:57 a.m. UTC | #1
On Tue, Jun 29, 2021 at 6:11 PM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> This patch series first fixes missing reallocations of some
> Virtqueue and device metadata.
>
> Then, it improves the numa_realloc function by using
> rte_realloc_socket API that takes care of the memcpy &
> freeing. The VQs NUMA IDs are also saved in the VQ metadata
> and used for every allocations so that all allocations
> before NUMA realloc are on the same VQ, later ones are
> allocated on the proper one.
>
> Finally inflight feature metada are converted from calloc()
> to rte_zmalloc_socket() and their reallocation is handled
> in numa_realloc().
>

Series lgtm with some little nits.
Thanks Maxime!
Xia, Chenbo June 30, 2021, 11:53 a.m. UTC | #2
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Wednesday, June 30, 2021 12:11 AM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>;
> david.marchand@redhat.com
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Subject: [PATCH v7 0/7] vhost: Fix and improve NUMA reallocation
> 
> This patch series first fixes missing reallocations of some
> Virtqueue and device metadata.
> 
> Then, it improves the numa_realloc function by using
> rte_realloc_socket API that takes care of the memcpy &
> freeing. The VQs NUMA IDs are also saved in the VQ metadata
> and used for every allocations so that all allocations
> before NUMA realloc are on the same VQ, later ones are
> allocated on the proper one.
> 
> Finally inflight feature metada are converted from calloc()
> to rte_zmalloc_socket() and their reallocation is handled
> in numa_realloc().
> --
> 2.31.1

Series applied to next-virtio/main with all things fixed.

Thanks!