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 C9077A054F; Tue, 16 Mar 2021 13:42:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 974B24069F; Tue, 16 Mar 2021 13:42:08 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id 6337E4003D for ; Tue, 16 Mar 2021 13:42:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615898526; 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; bh=SqXiONdJafklktVttdb0ySE34g0gGYGWjiEYPTOkKJ0=; b=WPH8fZkWkJHFM8f42DyzgJ0zQpkyo7O0riuOaQVU+MhPag6cOpijcKpTHEMZ3kc/8Li1C1 7cvXzh0wDLAGgze44YUNaZJoInpDL1SKc/d2DrieczdDBryrcO9jzS+X8fNpS1YWxL7Z/O RFr21HRpJX2ZuzFQu4LuKS4AE0TENUs= 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-434-X3A1l8WPNNGoIrrSGzZVew-1; Tue, 16 Mar 2021 08:42:04 -0400 X-MC-Unique: X3A1l8WPNNGoIrrSGzZVew-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 680E61084D6C; Tue, 16 Mar 2021 12:42:03 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.36.110.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 853C518AD6; Tue, 16 Mar 2021 12:41:55 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, chenbo.xia@intel.com, amorenoz@redhat.com, david.marchand@redhat.com, olivier.matz@6wind.com, bnemeth@redhat.com Cc: Maxime Coquelin Date: Tue, 16 Mar 2021 13:41:50 +0100 Message-Id: <20210316124153.503928-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH v2 0/3] vhost: make virtqueue cache-friendly 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" As done for Virtio PMD, this series improves cache utilization of the vhost_virtqueue struct by removing unused field, make the live-migration cache dynamically allocated at live-migration setup time and by moving fields around so that hot fields are on the first cachelines. With this series, The struct vhost_virtqueue size goes from 832B (13 cachelines) down to 320B (5 cachelines). With this series and the virtio one, I measure a gain of up to 8% in IO loop micro-benchmark with packed ring, and 5% with split ring. I don't have a setup at hand to run PVP testing, but it might be interresting to get the numbers as I suspect the cache pressure is higher in this test as in real use-cases. Changes in v2: ============== - Add log_cache freeing in free_vq (Chenbo) Maxime Coquelin (3): vhost: remove unused Vhost virtqueue field vhost: move dirty logging cache out of the virtqueue vhost: optimize vhost virtqueue struct lib/librte_vhost/vhost.c | 16 +++++++++-- lib/librte_vhost/vhost.h | 54 +++++++++++++++++------------------ lib/librte_vhost/vhost_user.c | 25 ++++++++++++++++ 3 files changed, 66 insertions(+), 29 deletions(-) -- 2.29.2