Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp18022yba; Fri, 5 Apr 2019 00:50:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9fHaiPyodFRyCOKRnW81G5ypxlWmnAr5DZQJ5PHIjvFKB4TqCBU8OJCXELGg7CF8hqxQU X-Received: by 2002:a17:902:a506:: with SMTP id s6mr10948319plq.164.1554450613735; Fri, 05 Apr 2019 00:50:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554450613; cv=none; d=google.com; s=arc-20160816; b=uLY5jzdO1kJrKBequlxZ3eIMubh0bwipGTwImE8QtNL4uM9NvEftGajIZkXa7vdM/y AL4BLmwoCVst19oBjy+KA1lNpSzvi4n3wR9B59jOFlhDbnyMnBCiuaTv2z0Jd4uqxOlI JKeSW7L3oleD7S10JUxCVfQG32PUd7wTgIn/KI7UmZ0wKKJO0DetDkVn9m2DIJAaNqKB hkdSZJOuGXpd9m4KiooH7p72TAP8N+Mn5d/C4GjN7tIEYCy98UvdHW2rdwBw/dkN0cjR CrvhwF2ZtJ8XETh2Rw2H6sqW1iuIt1BxCNMiNQuSyJMX1oMFkVBmCYWFbdkEiTa6j1VU Y9nA== 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; bh=U8q/dV+jUyLM8P4IzxbEg7fTh9kBuUuI18cx/4ZklsM=; b=NURAAlX9H+iHeRQffKWTU3an7tUBnnxupwfalPQyZhWUSZIkTnyNUQXNymqiX3WLmM 6OdJSfg1RQmaecusiLUsueUfpLXzpPD3033l3R9yxeMBnDDIX+LgkpOeutCPkFocMTo3 /g3BnLwyl8RxJJaCGz/j4vUbvvZ8ETZC/7YQfTTU98T0zRJ82FlZZIMTDqOxZegH4wNO YPOmr2vz88DVVMgOh/URKnzAVVibUa5ZhYuGWOXHaqBdnbhAF9nFzJVkPcU3H9Kfmdl/ WoC2LJllSG4Q5tMwLB7Eoq4g5Qc3WrcCdq/AvjNapFEGt2J5VR3mV7FUxIP8V0y9Z+Tc vTlg== 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 c11si18495543pga.350.2019.04.05.00.49.58; Fri, 05 Apr 2019 00:50:13 -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 S1730236AbfDEHtW (ORCPT + 99 others); Fri, 5 Apr 2019 03:49:22 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:37158 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729833AbfDEHtW (ORCPT ); Fri, 5 Apr 2019 03:49:22 -0400 Received: by mail-wr1-f67.google.com with SMTP id w10so6797287wrm.4 for ; Fri, 05 Apr 2019 00:49:21 -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:in-reply-to:user-agent; bh=U8q/dV+jUyLM8P4IzxbEg7fTh9kBuUuI18cx/4ZklsM=; b=n1Y2ZsRzUxCq6gLS6TxCBqgR3BPEpgnhVi8DmYQzSzKg5NH84CKXWOaOrydop/5qpx lMINDFYxYmdUs9lWKiEp9RhihvVU6E54A1Reu+d+GaAWBbejsrY3pajYeQ7DUAct6L57 y5ULuUMntKYsfSR1W/me/dQefyPGE3fwRyIYgb3LGhwBSo72h58+33BwR0OaKWZ216eM Stzxo5BCTbUT4Wy0UEVRlLEpBHLqxui0sid3KkZGSaTYOjNCvv8ZVuFAK0DKK033VEa6 7Kvg7JE/d4oBz77J+4CgPCZncJ/+xhNgpKw6WRNj0BpRgQtYfbFVCijq5A0cXwzp47e9 xWdA== X-Gm-Message-State: APjAAAXUi7iRiFY1Yo0ChrYoYs6JMcnfDlbzvoFlbLucG1hub4ZI1iqp brbgOPsfRTG5E5WGw2Q8/FCkyw== X-Received: by 2002:a5d:68cf:: with SMTP id p15mr7107520wrw.301.1554450560539; Fri, 05 Apr 2019 00:49:20 -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 d17sm29653957wrw.88.2019.04.05.00.49.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Apr 2019 00:49:19 -0700 (PDT) Date: Fri, 5 Apr 2019 09:49:17 +0200 From: Stefano Garzarella To: "Michael S. Tsirkin" Cc: netdev@vger.kernel.org, Jason Wang , 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: <20190405074917.ooftpalmploq6x3b@steredhat> References: <20190404105838.101559-1-sgarzare@redhat.com> <20190404114643-mutt-send-email-mst@kernel.org> <20190404164715.sycigtccwq2rziuz@steredhat> <20190404140345-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190404140345-mutt-send-email-mst@kernel.org> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 04, 2019 at 02:04:10PM -0400, Michael S. Tsirkin wrote: > On Thu, Apr 04, 2019 at 06:47:15PM +0200, Stefano Garzarella wrote: > > On Thu, Apr 04, 2019 at 11:52:46AM -0400, Michael S. Tsirkin wrote: > > > I simply love it that you have analysed the individual impact of > > > each patch! Great job! > > > > Thanks! I followed Stefan's suggestions! > > > > > > > > For comparison's sake, it could be IMHO benefitial to add a column > > > with virtio-net+vhost-net performance. > > > > > > This will both give us an idea about whether the vsock layer introduces > > > inefficiencies, and whether the virtio-net idea has merit. > > > > > > > Sure, I already did TCP tests on virtio-net + vhost, starting qemu in > > this way: > > $ qemu-system-x86_64 ... \ > > -netdev tap,id=net0,vhost=on,ifname=tap0,script=no,downscript=no \ > > -device virtio-net-pci,netdev=net0 > > > > I did also a test using TCP_NODELAY, just to be fair, because VSOCK > > doesn't implement something like this. > > Why not? > I think because originally VSOCK was designed to be simple and low-latency, but of course we can introduce something like that. Current implementation directly copy the buffer from the user-space in a virtio_vsock_pkt and enqueue it to be transmitted. Maybe we can introduce a buffer per socket where accumulate bytes and send it when it is full or when a timer is fired . We can also introduce a VSOCK_NODELAY (maybe using the same value of TCP_NODELAY for compatibility) to send the buffer immediately for low-latency use cases. What do you think? Thanks, Stefano