Message ID | 20201221161456.31696-1-maxime.coquelin@redhat.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8284CA09EF; Mon, 21 Dec 2020 17:15:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 04C7CCAAF; Mon, 21 Dec 2020 17:15:18 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 2207DCAAD for <dev@dpdk.org>; Mon, 21 Dec 2020 17:15:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608567313; 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=lz3Wq6SmZvRR3o9+JDDte+1oZOSMlaxztaYOFFPpkUU=; b=dUwLVgcODX3FydqV3TTrSB1fgS5XUxdsL5PrpP5wkmY16AV7UUGk6M+amt5FR/iVYIk9Vs dwnLO/Vk8IRBu6Z3JiH9TsfYr9ZwEiRcYc864ygEMLDxC2kGMCw0GcXvLXJmDUZABnyDe/ fLwhvYmAu7M15BRWRQPRRvLYNfu+qH8= 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-197-ZSoR5YJ3OXuzY4HB_As5OA-1; Mon, 21 Dec 2020 11:15:11 -0500 X-MC-Unique: ZSoR5YJ3OXuzY4HB_As5OA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 794651005D4D; Mon, 21 Dec 2020 16:15:10 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.36.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 364476F13D; Mon, 21 Dec 2020 16:14:59 +0000 (UTC) From: Maxime Coquelin <maxime.coquelin@redhat.com> To: dev@dpdk.org, chenbo.xia@intel.com, amorenoz@redhat.com, david.marchand@redhat.com, olivier.matz@6wind.com Cc: Maxime Coquelin <maxime.coquelin@redhat.com> Date: Mon, 21 Dec 2020 17:14:53 +0100 Message-Id: <20201221161456.31696-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 0/3] net/virtio: make virtqueue struct cache-friendly X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
net/virtio: make virtqueue struct cache-friendly
|
|
Message
Maxime Coquelin
Dec. 21, 2020, 4:14 p.m. UTC
This series optimizes the cache usage of virtqueue struct, by make a "fake" mbuf being dynamically allocated in Rx virtnet struct, by removing a useless virtuque pointer into the virtnet structs and by moving a few fields to pack holes. With these 3 patches, the virtqueue struct size goes from 576 bytes (9 cachelines) to 248 bytes (4 cachelines). Maxime Coquelin (3): net/virtio: remove reference to virtqueue in vrings net/virtio: allocate fake mbuf in Rx queue net/virtio: pack virtuqueue struct drivers/net/virtio/virtio_ethdev.c | 46 +++++++++++-------- drivers/net/virtio/virtio_rxtx.c | 36 +++++++-------- drivers/net/virtio/virtio_rxtx.h | 5 +- drivers/net/virtio/virtio_rxtx_packed_avx.c | 14 +++--- drivers/net/virtio/virtio_rxtx_simple.h | 2 +- .../net/virtio/virtio_rxtx_simple_altivec.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_neon.c | 2 +- drivers/net/virtio/virtio_rxtx_simple_sse.c | 2 +- .../net/virtio/virtio_user/virtio_user_dev.c | 4 +- drivers/net/virtio/virtio_user_ethdev.c | 2 +- drivers/net/virtio/virtqueue.h | 24 ++++++---- 11 files changed, 72 insertions(+), 67 deletions(-)
Comments
Hi Maxime, > -----Original Message----- > From: Maxime Coquelin <maxime.coquelin@redhat.com> > Sent: Tuesday, December 22, 2020 12:15 AM > To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>; amorenoz@redhat.com; > david.marchand@redhat.com; olivier.matz@6wind.com > Cc: Maxime Coquelin <maxime.coquelin@redhat.com> > Subject: [PATCH 0/3] net/virtio: make virtqueue struct cache-friendly > > This series optimizes the cache usage of virtqueue struct, > by make a "fake" mbuf being dynamically allocated in Rx > virtnet struct, by removing a useless virtuque pointer > into the virtnet structs and by moving a few fields > to pack holes. > > With these 3 patches, the virtqueue struct size goes from > 576 bytes (9 cachelines) to 248 bytes (4 cachelines). > > Maxime Coquelin (3): > net/virtio: remove reference to virtqueue in vrings > net/virtio: allocate fake mbuf in Rx queue > net/virtio: pack virtuqueue struct > > drivers/net/virtio/virtio_ethdev.c | 46 +++++++++++-------- > drivers/net/virtio/virtio_rxtx.c | 36 +++++++-------- > drivers/net/virtio/virtio_rxtx.h | 5 +- > drivers/net/virtio/virtio_rxtx_packed_avx.c | 14 +++--- > drivers/net/virtio/virtio_rxtx_simple.h | 2 +- > .../net/virtio/virtio_rxtx_simple_altivec.c | 2 +- > drivers/net/virtio/virtio_rxtx_simple_neon.c | 2 +- > drivers/net/virtio/virtio_rxtx_simple_sse.c | 2 +- > .../net/virtio/virtio_user/virtio_user_dev.c | 4 +- > drivers/net/virtio/virtio_user_ethdev.c | 2 +- > drivers/net/virtio/virtqueue.h | 24 ++++++---- > 11 files changed, 72 insertions(+), 67 deletions(-) > > -- > 2.29.2 Does this patchset have a apply issue? Locally I can't apply the patches and Patchwork also shows apply issues. Thanks, Chenbo
Hi Chenbo, On 1/8/21 3:50 AM, Xia, Chenbo wrote: > Hi Maxime, > >> -----Original Message----- >> From: Maxime Coquelin <maxime.coquelin@redhat.com> >> Sent: Tuesday, December 22, 2020 12:15 AM >> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>; amorenoz@redhat.com; >> david.marchand@redhat.com; olivier.matz@6wind.com >> Cc: Maxime Coquelin <maxime.coquelin@redhat.com> >> Subject: [PATCH 0/3] net/virtio: make virtqueue struct cache-friendly >> >> This series optimizes the cache usage of virtqueue struct, >> by make a "fake" mbuf being dynamically allocated in Rx >> virtnet struct, by removing a useless virtuque pointer >> into the virtnet structs and by moving a few fields >> to pack holes. >> >> With these 3 patches, the virtqueue struct size goes from >> 576 bytes (9 cachelines) to 248 bytes (4 cachelines). >> >> Maxime Coquelin (3): >> net/virtio: remove reference to virtqueue in vrings >> net/virtio: allocate fake mbuf in Rx queue >> net/virtio: pack virtuqueue struct >> >> drivers/net/virtio/virtio_ethdev.c | 46 +++++++++++-------- >> drivers/net/virtio/virtio_rxtx.c | 36 +++++++-------- >> drivers/net/virtio/virtio_rxtx.h | 5 +- >> drivers/net/virtio/virtio_rxtx_packed_avx.c | 14 +++--- >> drivers/net/virtio/virtio_rxtx_simple.h | 2 +- >> .../net/virtio/virtio_rxtx_simple_altivec.c | 2 +- >> drivers/net/virtio/virtio_rxtx_simple_neon.c | 2 +- >> drivers/net/virtio/virtio_rxtx_simple_sse.c | 2 +- >> .../net/virtio/virtio_user/virtio_user_dev.c | 4 +- >> drivers/net/virtio/virtio_user_ethdev.c | 2 +- >> drivers/net/virtio/virtqueue.h | 24 ++++++---- >> 11 files changed, 72 insertions(+), 67 deletions(-) >> >> -- >> 2.29.2 > > Does this patchset have a apply issue? Locally I can't apply the patches and > Patchwork also shows apply issues. For got to mention, but the series applied on top of the big rework as it conflict with it, and the rework is more important. Cheers, Maxime > Thanks, > Chenbo >
On 12/21/20 5:14 PM, Maxime Coquelin wrote: > This series optimizes the cache usage of virtqueue struct, > by make a "fake" mbuf being dynamically allocated in Rx > virtnet struct, by removing a useless virtuque pointer > into the virtnet structs and by moving a few fields > to pack holes. > > With these 3 patches, the virtqueue struct size goes from > 576 bytes (9 cachelines) to 248 bytes (4 cachelines). > > Maxime Coquelin (3): > net/virtio: remove reference to virtqueue in vrings > net/virtio: allocate fake mbuf in Rx queue > net/virtio: pack virtuqueue struct > > drivers/net/virtio/virtio_ethdev.c | 46 +++++++++++-------- > drivers/net/virtio/virtio_rxtx.c | 36 +++++++-------- > drivers/net/virtio/virtio_rxtx.h | 5 +- > drivers/net/virtio/virtio_rxtx_packed_avx.c | 14 +++--- > drivers/net/virtio/virtio_rxtx_simple.h | 2 +- > .../net/virtio/virtio_rxtx_simple_altivec.c | 2 +- > drivers/net/virtio/virtio_rxtx_simple_neon.c | 2 +- > drivers/net/virtio/virtio_rxtx_simple_sse.c | 2 +- > .../net/virtio/virtio_user/virtio_user_dev.c | 4 +- > drivers/net/virtio/virtio_user_ethdev.c | 2 +- > drivers/net/virtio/virtqueue.h | 24 ++++++---- > 11 files changed, 72 insertions(+), 67 deletions(-) > Deferring to v21.05 release. Maxime