Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3671932yba; Tue, 9 Apr 2019 02:13:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwy9JL7USW/L3SINB3nyH2CeY+vPxWiByB5fBYBWdkNNdgz38uhMIba1BDFzJ+lPiGorVww X-Received: by 2002:a63:2b03:: with SMTP id r3mr33066096pgr.105.1554801238394; Tue, 09 Apr 2019 02:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554801238; cv=none; d=google.com; s=arc-20160816; b=u0LhfDHYMCwhARp7y2ZVHi1dODzDY7S+gqBL4fWjcAWUpv/xXi0QSEYQsD29K4FC0e xnkwZTijf3nUifGQsHI8NkU944DAK1rQl2suOeUz14iJAJbTS1AyTiiI83SD8k38HJGr hoVOdTJp8Z8UXtAIiG5MW+zJGhxLCvlP7IcDRL9+RR99RF9xpF1t1+MEt4MA6jvj8nfl pWpGK1Sm4Y2Fwl4Rs5Gsv/06J+15S5+0Z0NwP4WWjzAETikR8cC68Oxs5C3S1I1/MoOX kyBr/km6ev41z4AADc6QAJKdd1Tt8QfpeZ3EbTr7RoZPz6InIlliUpHZ2qsPt90Pi8FT +mnQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=EvkmXYCaWirnY1s+s7C/6aFEffoZoYGGkm+UIEVxfz0=; b=OMk9ocRlNZ1cjQhUAE1WPZhZTQrdhAQVGj3lbNI3bBZhySFYqC+18MHmbfwKZlgH7i xBpoVb8czspGYL/f5VwrRpkFHHc7ISGFV08YeaXSUCeWOSWPqm9Y2FS2LxNWKVUaqo9J NDloHxBsttZZi3wtt1pJeLV2oQaj++lljGZ5DM+p9PsM88NWOVrWHssfWA0y2ql+fr4h +r6nxQiI+kM8DIDe3OQ1zSQ8bhk3btVmhIfkK3xshFMChKrX/hMixPPPdtDvQ4n7rPUU rFJzu5whny88imaFe/YnsaPA9gtokjfwYYmVW8jHDZiCuJcJ7ZJvbXq3wz5HXhX1T3MO ABFg== 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 l39si29981851plb.143.2019.04.09.02.13.41; Tue, 09 Apr 2019 02:13:58 -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 S1726538AbfDIJNF (ORCPT + 99 others); Tue, 9 Apr 2019 05:13:05 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39356 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726371AbfDIJNF (ORCPT ); Tue, 9 Apr 2019 05:13:05 -0400 Received: by mail-wm1-f68.google.com with SMTP id n25so2401089wmk.4 for ; Tue, 09 Apr 2019 02:13:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=EvkmXYCaWirnY1s+s7C/6aFEffoZoYGGkm+UIEVxfz0=; b=OY2mCihC3L3Rgii7kJj5boa66VJr6ocTzZ1Zp7GFpzqCORYCLar/YgdQ9kUioq/QFE 7UT7wFAGe0vaKV6/1Nt6iI9nGQEdYIy9dzUurvqSiQa5Bn+bmOm2IXPhBVLkL8fk2l/q osFupG6CxKbAZ0fSh1aH9Z2m59Pt6yhdKxrJisF/yXZXTnMb6QMmDJz8JW2oUdmmsh6o 6Z77CBQaBheiQhJNhAF/EoB7oMfTbFGJCGGjWCso5uZ98etoYJXaIWV2zUxKKzTiN3kJ 3e9pFp+EGRb682v1H9P590jGAqbWkja/1PryaRjYE7kBmy3+wTKw5cy9GArNzyVsjlqA 8g/g== X-Gm-Message-State: APjAAAVq2ZFfDWG6n8pvllsJF7irrINcKJ2tK6Tf6LaPUd19B+vDF3Fc xfpSs+q6kCuhDi1YqLJh7Z6smw== X-Received: by 2002:a1c:4844:: with SMTP id v65mr20830195wma.139.1554801183174; Tue, 09 Apr 2019 02:13:03 -0700 (PDT) Received: from steredhat (host35-203-static.12-87-b.business.telecomitalia.it. [87.12.203.35]) by smtp.gmail.com with ESMTPSA id 7sm111242704wrc.81.2019.04.09.02.13.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Apr 2019 02:13:02 -0700 (PDT) Date: Tue, 9 Apr 2019 11:13:00 +0200 From: Stefano Garzarella To: Jason Wang Cc: netdev@vger.kernel.org, "Michael S. Tsirkin" , Stefan Hajnoczi , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, "David S. Miller" Subject: Re: [PATCH RFC 0/4] vsock/virtio: optimizations to increase the throughput Message-ID: <20190409091300.uozhdyikycb5blmn@steredhat> References: <20190404105838.101559-1-sgarzare@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 08, 2019 at 02:43:28PM +0800, Jason Wang wrote: > > On 2019/4/4 下午6:58, Stefano Garzarella wrote: > > This series tries to increase the throughput of virtio-vsock with slight > > changes: > > - patch 1/4: reduces the number of credit update messages sent to the > > transmitter > > - patch 2/4: allows the host to split packets on multiple buffers, > > in this way, we can remove the packet size limit to > > VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE > > - patch 3/4: uses VIRTIO_VSOCK_MAX_PKT_BUF_SIZE as the max packet size > > allowed > > - patch 4/4: increases RX buffer size to 64 KiB (affects only host->guest) > > > > RFC: > > - maybe patch 4 can be replaced with multiple queues with different > > buffer sizes or using EWMA to adapt the buffer size to the traffic > > > Or EWMA + mergeable rx buffer, but if we decide to unify the datapath with > virtio-net, we can reuse their codes. > > > > > > - as Jason suggested in a previous thread [1] I'll evaluate to use > > virtio-net as transport, but I need to understand better how to > > interface with it, maybe introducing sk_buff in virtio-vsock. > > > > Any suggestions? > > > My understanding is this is not a must, but if it makes things easier, we > can do this. Hopefully it should simplify the maintainability and avoid duplicated code. > > Another thing that may help is to implement sendpage(), which will greatly > improve the performance. Thanks for your suggestions! I'll try to implement sendpage() in VSOCK to measure the improvement. Cheers, Stefano