Received: by 10.192.165.148 with SMTP id m20csp3799383imm; Mon, 23 Apr 2018 12:34:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+w1bPOAvejU9gqnLP9dRL8FJEknrIWPTTFoxHLHx6haMqjS0SJ0tj72SXdTLwz+6tF+1uZ X-Received: by 2002:a17:902:b48c:: with SMTP id y12-v6mr21591591plr.212.1524512071678; Mon, 23 Apr 2018 12:34:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524512071; cv=none; d=google.com; s=arc-20160816; b=MSa9mNmizvdzmMWzM2YXEYQuNwIqYCiAal0U9JmW9eb+7zK+uR/h0CruL6LkOHwTLC SFBW6Kr+7ev3+lH8mN6F3oEu9WIXg+zHCBKFuoXly9scNfdE91k5pAAFt2ihzKyefGXm PIrvXmEhheXEEUqG9DmpYm98qqFxXsyS7k+jrdJJwf7JSr+gF/7yH3XER9a0I1vh/OHT KQLWqWr05bxB1zDFe3zSpqjqxwWwb+fUDRPcticMVgxVYnMtabgxV97tT+vbdiclNuGm BRZ11eb4dkpCBuLPqy7JmiNR9OIjIMsOb4VqMT1ASKIlt+1SSzp4tTjtagaStcG2GuZC +KEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=2rh2riH5ts1VTCuEtYhmPEOqvL8cxQ2ynmyrqS4rddE=; b=RmUaCnrgNhIFdM4bGrbOvUOmKjdbmwLkTYR+ryeSuNmhGJEcdTQV/u/NafJUlCwXB4 6gP6pFw3Bm9qq0Ic6EV4mFLythYN3Z/+mP6a2GDZxywRbYPrP16SPw1Qx7yK7mnWgKrw s3US5wQhzHe0o+rEwvdBkrvhjNEq/KjekH0zuJmSe33YYkZKecgU+gc2fgzaW8rhtpti jMOLDRibLiPISlW5QC3zAo9RKY7gaNU9/Sj8EXzoh9fNXE82jX1AWDyeYpycoAxO+kN4 UHfOce+4i6vSaGfNGwd+f/Gv3fJOIL1b9X/qJG+GVCL26zWt1jmBNzPXbn8PAso19n5r 7i7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=jTIAUTJJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a73si11409521pfe.23.2018.04.23.12.34.02; Mon, 23 Apr 2018 12:34:31 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=jTIAUTJJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932462AbeDWTcE (ORCPT + 99 others); Mon, 23 Apr 2018 15:32:04 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:46548 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932235AbeDWTb6 (ORCPT ); Mon, 23 Apr 2018 15:31:58 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3NJQFaD111894; Mon, 23 Apr 2018 19:31:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=2rh2riH5ts1VTCuEtYhmPEOqvL8cxQ2ynmyrqS4rddE=; b=jTIAUTJJsS8b/1KFDR2NFF/e+wkVgfhuVGmCBQzrYAdIHXtE9WDpjOXvtnM6GgVGu23x a36/9YB2aYcL+LnysT35koDl0XqVugm85C1UgNZMRFVuiCzoqsXxFsTJ+n6RFW916xTw y1N9j4Rwi/W3BNvqRBIViTmNiLGTsJS/vULpbpWJlskdNUd9vZRqQIB3sqshNNuNBuC8 rl+C1b6UZ8hAdbDizmol5bWcSBASt4RF/SU99UPrLZ7elS1UYAGNxeVLIk2XPkwcXZ0Y 3f+GJZgxEQmHexdgSGdxclrI9PmlBinSXjC31urFHmGe08TGzhm09sfORF0o/2ypP62n 6Q== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2hfw9a6wu4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Apr 2018 19:31:23 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w3NJVM3V028266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Apr 2018 19:31:23 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w3NJVLqQ013116; Mon, 23 Apr 2018 19:31:22 GMT Received: from char.us.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 23 Apr 2018 12:31:21 -0700 Received: by char.us.oracle.com (Postfix, from userid 1000) id 863986A0057; Mon, 23 Apr 2018 15:31:20 -0400 (EDT) Date: Mon, 23 Apr 2018 15:31:20 -0400 From: Konrad Rzeszutek Wilk To: Jason Wang Cc: mst@redhat.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, tiwei.bie@intel.com, jfreimann@redhat.com, wexu@redhat.com Subject: Re: [RFC V3 PATCH 0/8] Packed ring for vhost Message-ID: <20180423193120.GD30033@char.us.oracle.com> References: <1524461700-5469-1-git-send-email-jasowang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1524461700-5469-1-git-send-email-jasowang@redhat.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8872 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804230194 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 23, 2018 at 01:34:52PM +0800, Jason Wang wrote: > Hi all: > > This RFC implement packed ring layout. The code were tested with > Tiwei's RFC V2 a thttps://lkml.org/lkml/2018/4/1/48. Some fixups and > tweaks were needed on top of Tiwei's code to make it run. TCP stream > and pktgen does not show obvious difference compared with split ring. I have to ask then - what is the benefit of this? > > Changes from V2: > - do not use & in checking desc_event_flags > - off should be most significant bit > - remove the workaround of mergeable buffer for dpdk prototype > - id should be in the last descriptor in the chain > - keep _F_WRITE for write descriptor when adding used > - device flags updating should use ADDR_USED type > - return error on unexpected unavail descriptor in a chain > - return false in vhost_ve_avail_empty is descriptor is available > - track last seen avail_wrap_counter > - correctly examine available descriptor in get_indirect_packed() > - vhost_idx_diff should return u16 instead of bool > > 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. > > 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 | 136 ++---- > drivers/vhost/scsi.c | 62 +-- > drivers/vhost/vhost.c | 824 ++++++++++++++++++++++++++++++++++--- > drivers/vhost/vhost.h | 47 ++- > drivers/vhost/vsock.c | 42 +- > include/uapi/linux/virtio_config.h | 9 + > include/uapi/linux/virtio_ring.h | 32 ++ > 7 files changed, 926 insertions(+), 226 deletions(-) > > -- > 2.7.4 >