From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: "Xia, Chenbo" <chenbo.xia@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"david.marchand@redhat.com" <david.marchand@redhat.com>
Subject: Re: [dpdk-dev] [PATCH v6 3/7] vhost: fix missing cache logging NUMA realloc
Date: Tue, 29 Jun 2021 16:38:48 +0200 [thread overview]
Message-ID: <78fd9eb1-a2b0-e222-e77a-6515e1075800@redhat.com> (raw)
In-Reply-To: <MN2PR11MB40637EA349AB94DF8BC9AFCD9C069@MN2PR11MB4063.namprd11.prod.outlook.com>
On 6/25/21 4:50 AM, Xia, Chenbo wrote:
> Hi Maxime,
>
>> -----Original Message-----
>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
>> Sent: Friday, June 18, 2021 10:04 PM
>> To: dev@dpdk.org; david.marchand@redhat.com; Xia, Chenbo <chenbo.xia@intel.com>
>> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
>> Subject: [PATCH v6 3/7] vhost: fix missing cache logging NUMA realloc
>>
>> When the guest allocates virtqueues on a different NUMA node
>> than the one the Vhost metadata are allocated, both the Vhost
>> device struct and the virtqueues struct are reallocated.
>>
>> However, reallocating the log cache on the new NUMA node was
>> not done. This patch fixes this by reallocating it if it has
>> been allocated already, which means a live-migration is
>> on-going.
>>
>> Fixes: 1818a63147fb ("vhost: move dirty logging cache out of virtqueue")
>
> This commit is of 21.05, although LTS maintainers don't maintain non-LTS stable
> releases now, I guess it's still better to add 'cc stable tag' in case anyone
> volunteers to do that?
I don't think that's what we do usually.
If someone wants to maintain v21.05 in the future, he can just look for
the Fixes tag in the git history.
Thanks,
Maxime
> Thanks,
> Chenbo
>
>>
>> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>> ---
>> lib/vhost/vhost_user.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
>> index 5fb055ea2e..82adf80fe5 100644
>> --- a/lib/vhost/vhost_user.c
>> +++ b/lib/vhost/vhost_user.c
>> @@ -545,6 +545,16 @@ numa_realloc(struct virtio_net *dev, int index)
>> vq->batch_copy_elems = new_batch_copy_elems;
>> }
>>
>> + if (vq->log_cache) {
>> + struct log_cache_entry *log_cache;
>> +
>> + log_cache = rte_realloc_socket(vq->log_cache,
>> + sizeof(struct log_cache_entry) *
>> VHOST_LOG_CACHE_NR,
>> + 0, newnode);
>> + if (log_cache)
>> + vq->log_cache = log_cache;
>> + }
>> +
>> rte_free(old_vq);
>> }
>>
>> --
>> 2.31.1
>
next prev parent reply other threads:[~2021-06-29 14:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 14:03 [dpdk-dev] [PATCH v6 0/7] vhost: Fix and improve NUMA reallocation Maxime Coquelin
2021-06-18 14:03 ` [dpdk-dev] [PATCH v6 1/7] vhost: fix missing memory table NUMA realloc Maxime Coquelin
2021-06-25 2:26 ` Xia, Chenbo
2021-06-18 14:03 ` [dpdk-dev] [PATCH v6 2/7] vhost: fix missing guest pages " Maxime Coquelin
2021-06-25 2:26 ` Xia, Chenbo
2021-06-18 14:03 ` [dpdk-dev] [PATCH v6 3/7] vhost: fix missing cache logging " Maxime Coquelin
2021-06-25 2:50 ` Xia, Chenbo
2021-06-29 14:38 ` Maxime Coquelin [this message]
2021-06-30 8:50 ` Xia, Chenbo
2021-06-18 14:03 ` [dpdk-dev] [PATCH v6 4/7] vhost: fix NUMA reallocation with multiqueue Maxime Coquelin
2021-06-25 2:56 ` Xia, Chenbo
2021-06-25 11:37 ` Xia, Chenbo
2021-06-29 14:35 ` Maxime Coquelin
2021-06-18 14:03 ` [dpdk-dev] [PATCH v6 5/7] vhost: improve NUMA reallocation Maxime Coquelin
2021-06-25 7:26 ` Xia, Chenbo
2021-06-18 14:03 ` [dpdk-dev] [PATCH v6 6/7] vhost: allocate all data on same node as virtqueue Maxime Coquelin
2021-06-25 7:26 ` Xia, Chenbo
2021-06-18 14:03 ` [dpdk-dev] [PATCH v6 7/7] vhost: convert inflight data to DPDK allocation API Maxime Coquelin
2021-06-25 7:26 ` Xia, Chenbo
2021-06-29 14:36 ` Maxime Coquelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=78fd9eb1-a2b0-e222-e77a-6515e1075800@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=chenbo.xia@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).