From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_NEOMUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 575B9C282CE for ; Tue, 9 Apr 2019 09:13:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2FFCE20833 for ; Tue, 9 Apr 2019 09:13:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726532AbfDIJNF (ORCPT ); Tue, 9 Apr 2019 05:13:05 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54813 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726370AbfDIJNF (ORCPT ); Tue, 9 Apr 2019 05:13:05 -0400 Received: by mail-wm1-f68.google.com with SMTP id c1so1107749wml.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=L9gxGPN67aF/tv1DbIQgSfrraBXGOWBTKaqWXSFVbKYrfkNCEx8ZTz/QHGPcHH5b0+ 8sH1xnFzouGvv4DFI5qr92orw7kg3mGJDqyTh6VAa+ED0ZgmCACx+MpovGDBfBlZqmSr Ne+XCqKNaffLm9M1qo8jVGPiFYNw4COPnk/QXrgY2ecgeX+oJwc/lFa1gSEdk1cMCvWc m6lncODhsJWAKyIpK5EWlS24I9r22396fShOufwRKlSEOTzLmlt3xXuR20rMOKVRM28o m7vDCFChtBAncOFED5yK5Bw6UHIjh/0/BzfTAKV+AcDLQQluWHiklCYpPhJ0169JDZR/ z4CQ== X-Gm-Message-State: APjAAAW0+1iAGT3Hj9qAxoeFFzc162DO4j66Tg+6iMNldWijpQKwTmm2 ipKd3L+gcK+2dNcuZaiGgqR3IA== X-Google-Smtp-Source: APXvYqyq1D2PodB/LAaL3pI7nizSvTWVjhg+LXuQhttc67bepRP3YJvEu+lDTl1A/gCxqVjc8P1kRA== 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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