Received: by 10.213.65.68 with SMTP id h4csp991119imn; Sun, 25 Mar 2018 20:41:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx49u8ccAF+ucaQDfIRkxiWYJpPbBRZ0PrhMqu/SpDLWH0MdJpMF6nF6+cnSBnkMBKntoc8Ph X-Received: by 10.101.100.203 with SMTP id t11mr4463033pgv.129.1522035660955; Sun, 25 Mar 2018 20:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522035660; cv=none; d=google.com; s=arc-20160816; b=0ZG8T8EWV68tZNP9z4xiQe52IBIWxrYesuziOH6i10Lx0/32h+Rcc34sIdiM0Wefb/ CWlaHPL+LmtD+59d1eUZieXiAgkB5J63zASbHMMTW2ftGajk6A88uqDJChM5uIGJct/y r2uq7tkvizuDBO9hOZNpR2Hmlhwcnc+Bn75H9hLYydvG465aTscrpOcNF8JE0dRz25Ym r5nqKjPgOE40Yrl5Qh1XNhZxZKo5HvByK+pusKbDmNWXrYijb0mIVuTuVQ4daoGEeitm YklL3q2B3byi5L39fDlHObBkSv9XAvhFAzW8udeRsTU8fTFsCn1Tgho2aDyECUuO0wSq FF+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=UMtjoNraSEirRQZ2NwN1nMlLFl/R7Lxmj+Jf4veGXrI=; b=1CFK9MWzcR2Xd+Gq4/YtXZrmYJZpJqdcPjpV9kB8Fiv6CYNHB/s9plFny3U9d/vXX5 PaY1NKLYrEOeU0kWHeWHKOZb87gl5JEFcXSMOaZIhd2KkUqdp61V3HVxOeRHoBsdvIsR i3jyFrDiAkld0vluyND0+JkmEwAhu9QaSSzlY6Qj2z3qxuavS1KgGTVJgtLPHF1JfSf7 7FXw6A4FiEYC8PnaVUagDrS57zLlsz+m9xvnk09tkF7qqo3+XoT66Uv/A6PGPN2aQ3RU WAcnwv1R5bQYiT9RtvrFFOgNT6KtPBiLaMTWCtIxBXAqffo6vfwadFzPlEh3dtuQlFbS qTaQ== 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 92-v6si14050867pli.455.2018.03.25.20.40.37; Sun, 25 Mar 2018 20:41:00 -0700 (PDT) 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 S1751913AbeCZDjJ (ORCPT + 99 others); Sun, 25 Mar 2018 23:39:09 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57574 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751074AbeCZDjI (ORCPT ); Sun, 25 Mar 2018 23:39:08 -0400 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 6B416EBFF4; Mon, 26 Mar 2018 03:39:07 +0000 (UTC) Received: from jason-ThinkPad-T450s.redhat.com (ovpn-12-110.pek2.redhat.com [10.72.12.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id 945D6111DD01; Mon, 26 Mar 2018 03:38:57 +0000 (UTC) From: Jason Wang To: mst@redhat.com, virtualization@lists.linux-foundation.org Cc: kvm@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jason Wang Subject: [RFC PATCH V2 0/8] Packed ring for vhost Date: Mon, 26 Mar 2018 11:38:45 +0800 Message-Id: <1522035533-11786-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.1]); Mon, 26 Mar 2018 03:39:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 26 Mar 2018 03:39:07 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jasowang@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all: This RFC implement packed ring layout. 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. Notes: The event suppression /indirect descriptor support is complied test only because of lacked driver support. Changes from V1: - Refactor vhost used elem code to avoid open coding on used elem - Event suppression support (compile test only). - Indirect descriptor support (compile test only). - Zerocopy support. - vIOMMU support. - SCSI/VSOCK support (compile test only). - Fix several bugs For simplicity, I don't implement batching or other optimizations. Please review. Thanks Jason Wang (8): vhost: move get_rx_bufs to vhost.c vhost: hide used ring layout from device vhost: do not use vring_used_elem vhost_net: do not explicitly manipulate vhost_used_elem vhost: vhost_put_user() can accept metadata type virtio: introduce packed ring defines vhost: packed ring support vhost: event suppression for packed ring drivers/vhost/net.c | 138 ++----- drivers/vhost/scsi.c | 62 +-- drivers/vhost/vhost.c | 818 ++++++++++++++++++++++++++++++++++--- drivers/vhost/vhost.h | 46 ++- drivers/vhost/vsock.c | 42 +- include/uapi/linux/virtio_config.h | 9 + include/uapi/linux/virtio_ring.h | 32 ++ 7 files changed, 921 insertions(+), 226 deletions(-) -- 2.7.4