Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2583122yba; Sun, 7 Apr 2019 23:36:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwmkF4XWYLJlwfz8ZK4tpHs+wNB7tBui59qWjYZEomBzgKmnAGnafK67CT4uvR/++3QuIF X-Received: by 2002:a63:7150:: with SMTP id b16mr25602908pgn.83.1554705404924; Sun, 07 Apr 2019 23:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554705404; cv=none; d=google.com; s=arc-20160816; b=E4DTbg41rjyOOaR4v5lIJxmdwQwGearpuH+16Hgio40lzo8I1Q2T9ZWHg7vbg/QXj+ kDF3BLtlSyWJW61CTuSd+0aZ5t4Y7TGfkmcNJStBnEZHJbGqX9FwZhthmSONelVQ+4ei GqcA0gNHkm752lJ7Im3lWi3JbQY6+yCWi816jSIgn2rqysZeCVCxC8UjAOgTqGUfwU+b r56p4dV+aE1KD6WdCdXleKo5t+1OJ25Po9CnAqFfk6O5XxF9vtJtrYSi6Y/mQQSkYyP1 aN4Es50wupicci3uF/xCoME91lSeFdTla5YsnwEShMbMtGxEOlzgqwPjFSJp0h7UDRHV 2MQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=kcTVZJN7IKy3ok7+jr6rNnqWrUj/MrG9AsdV6QVF97k=; b=nBOlsKDYsZfDTM1MJ0DT6iTg7GpfsyYZIEteNYdlGobFwV3MfcpuEVz8axtKhIhbZp 76txYYtZKQkFeP2jCYRdOuus05bfcMow2wzNCfjgwyHd/mVcXS9ukhH6fV8YzZsr8DY5 L8RS6OXyer0gTdv7+5vkH/Z7/mWBd1f89Uf3pJyhSF7CiN6P06KLbuC75RdvQlVNaKJ4 H1lqVcoChZ7djm0PtUy1vKvtmib5E9hfjKPKXlycwRDAScH8QBhMzo2Z501fPuEVJVcR dj+NPYbpEuHCqpfG4Fasx5uAF8wPHZP4p+OX/x4Oixr0dIFMx2yoWHwMODherayyLfBI 9ktg== 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 o77si15684693pfi.247.2019.04.07.23.36.29; Sun, 07 Apr 2019 23:36:44 -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 S1726495AbfDHGfw (ORCPT + 99 others); Mon, 8 Apr 2019 02:35:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60218 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbfDHGfw (ORCPT ); Mon, 8 Apr 2019 02:35:52 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A573959473; Mon, 8 Apr 2019 06:35:51 +0000 (UTC) Received: from [10.72.12.140] (ovpn-12-140.pek2.redhat.com [10.72.12.140]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D3C31A267; Mon, 8 Apr 2019 06:35:38 +0000 (UTC) Subject: Re: [PATCH RFC 4/4] vsock/virtio: increase RX buffer size to 64 KiB To: Stefan Hajnoczi , "Michael S. Tsirkin" Cc: netdev@vger.kernel.org, Stefan Hajnoczi , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, "David S. Miller" , Stefano Garzarella References: <20190404105838.101559-1-sgarzare@redhat.com> <20190404105838.101559-5-sgarzare@redhat.com> <20190405084414.GE25152@stefanha-x1.localdomain> From: Jason Wang Message-ID: <947d9806-f661-a739-5752-ca6cd6500bd2@redhat.com> Date: Mon, 8 Apr 2019 14:35:37 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190405084414.GE25152@stefanha-x1.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 08 Apr 2019 06:35:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/4/5 下午4:44, Stefan Hajnoczi wrote: > On Thu, Apr 04, 2019 at 12:58:38PM +0200, Stefano Garzarella wrote: >> In order to increase host -> guest throughput with large packets, >> we can use 64 KiB RX buffers. >> >> Signed-off-by: Stefano Garzarella >> --- >> include/linux/virtio_vsock.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h >> index 6d7a22cc20bf..43cce304408e 100644 >> --- a/include/linux/virtio_vsock.h >> +++ b/include/linux/virtio_vsock.h >> @@ -10,7 +10,7 @@ >> #define VIRTIO_VSOCK_DEFAULT_MIN_BUF_SIZE 128 >> #define VIRTIO_VSOCK_DEFAULT_BUF_SIZE (1024 * 256) >> #define VIRTIO_VSOCK_DEFAULT_MAX_BUF_SIZE (1024 * 256) >> -#define VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE (1024 * 4) >> +#define VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE (1024 * 64) > This patch raises rx ring memory consumption from 128 * 4KB = 512KB to > 128 * 64KB = 8MB. > > Michael, Jason: Any advice regarding rx/tx ring sizes and buffer sizes? > > Depending on rx ring size and the workload's packet size, different > values might be preferred. > > This could become a tunable in the future. It determines the size of > the guest driver's rx buffers. In virtio-net, we have mergeable rx buffer and estimate the rx buffer size through EWMA. That's another reason I suggest to squash the vsock codes into virtio-net. Thanks