From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4A96CA0A0C; Tue, 29 Jun 2021 16:38:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CCE3E411A9; Tue, 29 Jun 2021 16:38:57 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 7931640E01 for ; Tue, 29 Jun 2021 16:38:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624977535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9calrckgVXoKt6EhwElFbkdwLXfyuly+Z75oDZSj8+0=; b=B9uZ0dDne2NjZ8eK+30XmlCjCC9dw3OMt6tSlTQl9oRw7CDHiI8msRAdOJufiP7SN4i5ZW 39GuzHn8VvLdmdtCsjvye0cAquA+EQQWbdjyP7/anC0kwo4TZthZnWoBrLADzEj1lCuL2O TugvIsd1r34kaSXazqH9vBX8EZmE6OE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-168-E_mz91j3Mm6hkwgVDx7Erw-1; Tue, 29 Jun 2021 10:38:54 -0400 X-MC-Unique: E_mz91j3Mm6hkwgVDx7Erw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE9F5800D55; Tue, 29 Jun 2021 14:38:53 +0000 (UTC) Received: from [10.36.110.32] (unknown [10.36.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E8C4A5D6A1; Tue, 29 Jun 2021 14:38:49 +0000 (UTC) To: "Xia, Chenbo" , "dev@dpdk.org" , "david.marchand@redhat.com" References: <20210618140357.255995-1-maxime.coquelin@redhat.com> <20210618140357.255995-4-maxime.coquelin@redhat.com> From: Maxime Coquelin Message-ID: <78fd9eb1-a2b0-e222-e77a-6515e1075800@redhat.com> Date: Tue, 29 Jun 2021 16:38:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6 3/7] vhost: fix missing cache logging NUMA realloc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/25/21 4:50 AM, Xia, Chenbo wrote: > Hi Maxime, > >> -----Original Message----- >> From: Maxime Coquelin >> Sent: Friday, June 18, 2021 10:04 PM >> To: dev@dpdk.org; david.marchand@redhat.com; Xia, Chenbo >> Cc: Maxime Coquelin >> 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 >> --- >> 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 >