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 2ED04A0C43; Tue, 28 Sep 2021 17:29:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A408D410DB; Tue, 28 Sep 2021 17:29:53 +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 78F4140E3C for ; Tue, 28 Sep 2021 17:29:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632842992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LTis7hiIige+SS8UTA596Axx2FQf5dMZmLb18lx/eso=; b=UhFlVB0izVjuLk93E+SBfvptj9ZMu/WxBEkHHaIXM9tVUkjQkdJyMiz60kG44Wl8M3ccv0 /RDGGB/yBPA9GLXjdwRMAV2CHTilvGJKBg36OxWJwU+9IqHnItWiqH/bpp1VNxgaDwsBB9 zZ8ki+u8L320psHWETsVtQRRvrbdrw4= 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-190-J8hxHaPGNgCoh7YAvINqVw-1; Tue, 28 Sep 2021 11:29:50 -0400 X-MC-Unique: J8hxHaPGNgCoh7YAvINqVw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7668E9126D; Tue, 28 Sep 2021 15:29:49 +0000 (UTC) Received: from [10.39.208.26] (unknown [10.39.208.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F8F460C13; Tue, 28 Sep 2021 15:29:37 +0000 (UTC) Message-ID: <37b37f7a-bdf2-d04a-f58f-90e901107531@redhat.com> Date: Tue, 28 Sep 2021 17:29:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 To: =?UTF-8?Q?Eugenio_P=c3=a9rez?= , Chenbo Xia Cc: dev@dpdk.org, Pei Zhang , Jason Wang References: <20210827161231.579968-1-eperezma@redhat.com> From: Maxime Coquelin In-Reply-To: <20210827161231.579968-1-eperezma@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] vhost: Clean iotlb cache on vring stop 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 8/27/21 18:12, Eugenio Pérez wrote: > Old IOVA cache entries are left when there is a change on virtio driver > in VM. In case that all these old entries have iova addresses lesser > than new iova entries, vhost code will need to iterate all the cache to > find the new ones. In case of just a new iova entry needed for the new > translations, this condition will last forever. > > This has been observed in virtio-net to testpmd's vfio-pci driver > transition, reducing the performance from more than 10Mpps to less than > 0.07Mpps if the hugepage address was higher than the networking > buffers. Since all new buffers are contained in this new gigantic page, > vhost needs to scan IOTLB_CACHE_SIZE - 1 for each translation at worst. > > Signed-off-by: Eugenio Pérez > Reported-by: Pei Zhang > --- > lib/vhost/vhost_user.c | 2 ++ > 1 file changed, 2 insertions(+) > Applied to dpdk-next-virtio/main with changes suggested by Chenbo. Thanks, Maxime