Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1126137ybm; Wed, 22 May 2019 18:02:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIShDNX7tsKf4Vh8IP7UcNLoSPKIrHkIfPlqpQi1wEJV2IMHUMINeTtfyNiGhwoRGMRZPS X-Received: by 2002:a17:902:3363:: with SMTP id a90mr13006792plc.153.1558573341589; Wed, 22 May 2019 18:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558573341; cv=none; d=google.com; s=arc-20160816; b=cSJXfUTH31Amrzp3lq5tCp8HszrbvPYpcqIC977VlwT6XFSJQoD8X+OxVftreo/hqe KZcYF44qtgDubwNMKcOccyOYLKY7kZmTOx7ObZO6SdhUZ2QwI+p/LtSH9A0+kedNVmbu u23jaLIMFJgR+gk+sCFllvAcF+BfJVMh8EEmwF6b48Q3PKwjgwf45aX3+9xUiX4bu0tU aAHcA/axVtWtnkZjP7v8v2B5P99OWd7ElCmHN6eQ6drm/9Zr9/Cjf/fRmssw6Wec4WNv MGflo2oQpdTxXPfyzeqhQKXaMXsCCfJNa/vTgaEXWJs4aIC4PmfmabRxiSh8W29tu0Jo Wl9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=5LBa0eGz4oreq1bUhK+Ji1GIFUpl4cV40ggW22cBvPM=; b=IwX2a50m/syNtwu7+KBDp5IPZZV4jevstD1bqeOVVVzLIFTvdWHDH0mbFHeS3LZYcr qCA9pn1qRs196t5cCgkjpAnHaef0BMNwzaA/zPPek9h82chxTmo8pboVe/J6hRGcRZYM kYjRHmk05VPEhOel1Vbqvh1p3hydOqJ/QMoy6nRwPHvpwbbf+qTCDDyqU1C3uxQXaCim wgQIBBO34KB2I+5hFSxl+BRY17rYFgtkTXI7CijJtxvbL3pCI5yNjiRP8i6vM6Rnxy0j wUet38k5xFAcaLxgUVPneKlHyaLSxviqEnpnDNT9V4Xg9QU7YnSjPlIlwxRYVta59sKS YiMQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si27571868plr.156.2019.05.22.18.02.06; Wed, 22 May 2019 18:02:21 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729781AbfEWBAt (ORCPT + 99 others); Wed, 22 May 2019 21:00:49 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:37188 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727691AbfEWBAt (ORCPT ); Wed, 22 May 2019 21:00:49 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d8]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 7B78615043932; Wed, 22 May 2019 18:00:48 -0700 (PDT) Date: Wed, 22 May 2019 18:00:47 -0700 (PDT) Message-Id: <20190522.180047.238715219030499893.davem@davemloft.net> To: sunilmut@microsoft.com Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, sashal@kernel.org, decui@microsoft.com, mikelley@microsoft.com, netdev@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] hv_sock: perf: Allow the socket buffer size options to influence the actual socket buffers From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 22 May 2019 18:00:48 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sunil Muthuswamy Date: Wed, 22 May 2019 22:56:07 +0000 > Currently, the hv_sock buffer size is static and can't scale to the > bandwidth requirements of the application. This change allows the > applications to influence the socket buffer sizes using the SO_SNDBUF and > the SO_RCVBUF socket options. > > Few interesting points to note: > 1. Since the VMBUS does not allow a resize operation of the ring size, the > socket buffer size option should be set prior to establishing the > connection for it to take effect. > 2. Setting the socket option comes with the cost of that much memory being > reserved/allocated by the kernel, for the lifetime of the connection. > > Perf data: > Total Data Transfer: 1GB > Single threaded reader/writer > Results below are summarized over 10 iterations. ... > Signed-off-by: Sunil Muthuswamy Applied.