Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp53889yba; Fri, 5 Apr 2019 01:45:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxOQwjKotrlCRGETx0x92Uhro4L3O/4inNeMi76BQ+2ZcPi18TFJBNMEeGVAA4nEIgo3yz X-Received: by 2002:a63:475e:: with SMTP id w30mr10155184pgk.308.1554453914291; Fri, 05 Apr 2019 01:45:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554453914; cv=none; d=google.com; s=arc-20160816; b=LBsKF9LwtS8Ld/M8oRM8++31t6f68lMDKQnIC7KtZV6VCTmtB+7NqWjRaHX4MUZLm/ EEAjLW+BfG2ZTSW2gvd12vS+v06vfUo8jHtEni4m2GMHz7stxbjYL2JdkDHy5HfYZ/OM 2KgbJJADF0x70OCrWMqb2gGn5H1jxxln549XJQZJzNa04uiT5ghpGjqDkvfk0cR3+ScZ NSGQz5RVRWM6eOe2X/WbS1j0XsOe9Oo2t7wGX3a/7Yr9clymvDhxCV+PqkHDABoBKelh G5U27jDVZShhNA9HcTjm7aq3gMaSIffe5Te9HEDWznRLCQvxtu30t0jsCY5HH5DunvkS Pr/A== 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; bh=xIS2CQxQf9TcEXWFdWdbRhxYcwgstEigJMkG4x8kPB0=; b=dkvZ2AkGezDAgR2wJdhPMeq7cSbEWzMn1WcbleOzYfsMo5Vvvsk++WI/1g7CVd+jxG 16Efy98l4n27IzOz0xHtiMV9fT7ei9lo5PzRQb44OfVovp80MFS++ivjptHFHf0tvXZC WJMRWUqXh+NfixMZym0xMVfNQswRciuhNDi9+enofPhvDCbVbKOFVC1w0/njZtsFr/vy 1109Oqa4p5DaMa1QI+uKTMXTbTm6fU28Mcqej53ACXtIDAvQjoKVqbyvFdU3zU5WKDXb G05Kg4XFyBZx+J43gSgH3QZ5jMssFGmzonZZ1p2f0OL9GhX2zxAy60ygP1M03H1cJbHW wIBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZLBGpLwy; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r26si5572923pgv.523.2019.04.05.01.44.59; Fri, 05 Apr 2019 01:45:14 -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=@gmail.com header.s=20161025 header.b=ZLBGpLwy; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730438AbfDEIoT (ORCPT + 99 others); Fri, 5 Apr 2019 04:44:19 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41517 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfDEIoS (ORCPT ); Fri, 5 Apr 2019 04:44:18 -0400 Received: by mail-wr1-f65.google.com with SMTP id r4so6962318wrq.8; Fri, 05 Apr 2019 01:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xIS2CQxQf9TcEXWFdWdbRhxYcwgstEigJMkG4x8kPB0=; b=ZLBGpLwy3hcuYfns8pVP8c4L71bgX312Z8lNKOxy4sryxcm8RhwIlthx9RygZIgq3g 3t1doEKW31OfQt7En/ScVEIhV8oIgos9baWjg0lmynOWjnriEUUmSI08fFuy/FEKlHGX j1Td/gjAKU1TIHzj4cu4v37c3HzBekF4dPa4kk9ZpyzZuUUGIP4Gj4NwKsrx2lpmIfel BJ2sKhz3hsb3gZd1lM1FbHDiTUqVuwqHYJERGci6rJ4oNV/Ik/DU5fWmEzjw/j6QebJ0 LfPW3iZ8hXGzI+x8qf84s1njROIAMdXrGjHYPzNkNF2kXzElxuGa6WTnPoVGuIzKeZr+ v0sA== 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=xIS2CQxQf9TcEXWFdWdbRhxYcwgstEigJMkG4x8kPB0=; b=kVugPbh2ctpIk44jeFV78Xk8FrHQXNRmCjFGSfj7V8C5S7uecpteFQRUoqBJ8bedK4 S+MLgwIR7diKtebgA114mqAfa1iaiVM1vLV0zZtt0fjvPIlAntv+/cTS8QDw14USx1uJ V2GwvYcBwO5UvkMBZBmtocONN42fGQPhHWm7GOrJheuvArH5/ZGf2jG8zzLUkUEyZbBb IPjyB1+AUixItF4eNeES0twqBe3eVQsW+KwfSRwDx4Gqzh9Qn33cExKJKXlLLWjKCebt g2glNrtnEhwmXZir4d8pbqKNZJ37r0VGh718d/Abv6WAMvVmdNbL5W5pYY8ljpspN64Z 4xMA== X-Gm-Message-State: APjAAAUBoCvaFY2gViQ0VC/gb7lViGRzAOrcwv4iylIK9FtKB0eJ6SdI ytGzGWraeYXpSaxyQsef7OUXHsdt X-Received: by 2002:a05:6000:1250:: with SMTP id j16mr7374631wrx.135.1554453856542; Fri, 05 Apr 2019 01:44:16 -0700 (PDT) Received: from localhost ([51.15.41.238]) by smtp.gmail.com with ESMTPSA id p6sm14425275wrs.6.2019.04.05.01.44.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Apr 2019 01:44:15 -0700 (PDT) Date: Fri, 5 Apr 2019 09:44:14 +0100 From: Stefan Hajnoczi To: Jason Wang , "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 Subject: Re: [PATCH RFC 4/4] vsock/virtio: increase RX buffer size to 64 KiB Message-ID: <20190405084414.GE25152@stefanha-x1.localdomain> References: <20190404105838.101559-1-sgarzare@redhat.com> <20190404105838.101559-5-sgarzare@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h56sxpGKRmy85csR" Content-Disposition: inline In-Reply-To: <20190404105838.101559-5-sgarzare@redhat.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --h56sxpGKRmy85csR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Stefano Garzarella > --- > include/linux/virtio_vsock.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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 =3D 512KB to 128 * 64KB =3D 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. --h56sxpGKRmy85csR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJcpxVeAAoJEJykq7OBq3PIhtsIAIxorF0RmP5eAJziHtgy2yLQ MlHya7rpnvkF6xSqnCmYAATiZRsnWrPr2hCF/EvYsISlH2Tb+1obPERpSkfdgs0D LX1QekHhiGKo3fHeWRsKWFVXaFTCyVEQxgngBf0tiYAbYIxFuj54cyUm3tI0OwAi 7JHueqlDJ9HyFVHT2Sdob3NhRyb67aHw/hNKH/ocAduD0NmTx/5V8/0gIxy91ojS sho3R/CPRJm1mNFUTgiwQWJH3TFrSa5KGu5t2fO8NcXDjAd/5hwgSMtgU3ypSYas bCTyFBsO7srrP1wzz5YLVLcc5VFQBGrakOLKtmL4GeoyMTl4VZCCWbtN2VQpwWE= =pBj5 -----END PGP SIGNATURE----- --h56sxpGKRmy85csR--