Received: by 10.223.185.116 with SMTP id b49csp158116wrg; Tue, 13 Feb 2018 18:48:34 -0800 (PST) X-Google-Smtp-Source: AH8x2268cRcc38C+NWFVjAn/LNbv4V6WCP8HaAmTz+Ds2zws3eiFXbIgVbr2slzZu4t8VsrUW13Y X-Received: by 10.98.178.218 with SMTP id z87mr3256386pfl.88.1518576514255; Tue, 13 Feb 2018 18:48:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518576514; cv=none; d=google.com; s=arc-20160816; b=S6Agq1QEBsmBezxutQLp+QyPPQ5SMRMCDFDABD+jHxQmXeudZ2jGJu1d+VMyVTtalo EUv9UdJb8Tt2Pv9HMZuMtGLPBYnJRogO3fuWOhJLUwq9+luBAr94HXaYvUGD7aoujBqE HHdGZyqrOjobj+hXkwQ7W7gRpI/gDejN8hmcGxMaHqS70ecfxoGpQsunvysKGVYQguNA FI063duQ8zzEeltxKJC5prbFGcCrkPUinuD2MFiwCoEgMjJuT9UHJZ+2l3OTIYQCRsqz SnigUna/joaVMfYPX/2lXvZsqmTf/XrBCMjDgscOk+7fiH2IvIGRuWgAR0Njt2dlySIw YLVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=KmAMGjI/cGwUxzLknNvQhjVPATkwvaJmYNjqRUp10k0=; b=Ik/KxCXvRqX7AkBO6TpQ3E5N7SwOD/dZ4MvAQng7j3aYmovi66G29w7Q5CAHETsbNv zmO/pY5MvRYQl1XwxWr2DD40cQmicqFDEVhyBea8EZyAf6Dnq8bqHVXFK7qMtN33Bclg hyUFUXLTb7Rd7PvAxYu7sk+cnS11QYRwvDC0PM6MX7yrR4TmsmXbKJbDiVZ3skfUihg5 GZNRp7yXHRy1lWALsfl1mtFtqmf3CQoRnYC3ALpNxmd502VaqUIQSc67gYSBaxFvnkMw e6JjTwP+wOGBwlDWUIjuIJFbJ9JDX/b/Sgf3/eXhTZgsd0ncfYRlpCQ46SOdGxcAdlQL Gmrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si632469pfl.221.2018.02.13.18.48.19; Tue, 13 Feb 2018 18:48:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966642AbeBNCri (ORCPT + 99 others); Tue, 13 Feb 2018 21:47:38 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56370 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966497AbeBNCrg (ORCPT ); Tue, 13 Feb 2018 21:47:36 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1F27C7C81E; Wed, 14 Feb 2018 02:47:36 +0000 (UTC) Received: from redhat.com (ovpn-121-104.rdu2.redhat.com [10.10.121.104]) by smtp.corp.redhat.com (Postfix) with SMTP id 59D111007D71; Wed, 14 Feb 2018 02:47:34 +0000 (UTC) Date: Wed, 14 Feb 2018 04:47:34 +0200 From: "Michael S. Tsirkin" To: Jason Wang Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, wexu@redhat.com, jfreimann@redhat.com, tiwei.bie@intel.com Subject: Re: [PATCH RFC 0/2] Packed ring for vhost Message-ID: <20180214044634-mutt-send-email-mst@kernel.org> References: <1518575829-1431-1-git-send-email-jasowang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1518575829-1431-1-git-send-email-jasowang@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 14 Feb 2018 02:47:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 14 Feb 2018 02:47:36 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mst@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 14, 2018 at 10:37:07AM +0800, Jason Wang wrote: > Hi all: > > This RFC implement a subset of packed ring which was described at > https://github.com/oasis-tcs/virtio-docs/blob/master/virtio-v1.1-packed-wd07.pdf > . The code were tested with pmd implement by Jens at > http://dpdk.org/ml/archives/dev/2018-January/089417.html. Minor > change was needed for pmd codes to kick virtqueue since it assumes a > busy polling backend. > > Test were done between localhost and guest. Testpmd (rxonly) in guest > reports 2.4Mpps. Testpmd (txonly) repots about 2.1Mpps. How does this compare with the split ring design? > It's not a complete implemention, here's what were missed: > > - Device Area > - Driver Area > - Descriptor indirection > - Zerocopy may not be functional > - Migration path is not tested > - Vhost devices except for net > - vIOMMU can not work (mainly because the metadata prefetch is not > implemented). > - See FIXME/TODO in the codes for more details > - No batching or other optimizations were implemented ioeventfd for PIO/mmio/s390. > For a quick prototype, this series open code the tracking of warp > counter and descriptor index at net device. This will be addressed in > the future by: > > - Move get_rx_bufs() from net.c to vhost.c > - Let vhost_get_vq_desc() returns vring_used_elem instad of head id > > With the above, we can hide the internal (at least part of) vring > layout from specific device. > > Please review. > > Thanks > > Jason Wang (2): > virtio: introduce packed ring defines > vhost: packed ring support > > drivers/vhost/net.c | 14 +- > drivers/vhost/vhost.c | 351 ++++++++++++++++++++++++++++++++++--- > drivers/vhost/vhost.h | 6 +- > include/uapi/linux/virtio_config.h | 9 + > include/uapi/linux/virtio_ring.h | 17 ++ > 5 files changed, 369 insertions(+), 28 deletions(-) > > -- > 2.7.4