Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4264058ybp; Mon, 14 Oct 2019 01:39:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqy45hcjnzSYMjXnZYrOv0m4zQHTQ9z2nlqGpML0aYkCE92tChBp/xVLxWB4bZputM/thJwI X-Received: by 2002:a17:906:684:: with SMTP id u4mr26514690ejb.155.1571042385633; Mon, 14 Oct 2019 01:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571042385; cv=none; d=google.com; s=arc-20160816; b=eWQ3M3AB6Vr5rJoeFjuvPV+Ni4tE+Y947Uf0uNbOUzsVggBoSeFQuYlTxbXwvH9bHP BgRHOQZ3Qb8WOfBVV8kI9HC9I9XOKWcRvPqMGTngRniN2RAuBGy/J1llk1XdUfNhUv01 o2JkgihuPVAxOy1E75tOpqZxf54hhq0OUasQOJnM5wlDmih7OuYXUEAVS9CkryyB0BaR 2JxJ0sFsGW4pSbafq8suqWqvXqoP57McbznBsxSF8Yu3rrtQ+AHH3+Fv/NV+e1/obkis hJDyvZ7xXWvH8H0vx2nXFIYuKHMiyoGaq6hV5I6D1nuUVhgT/1jb7DbFGI3t8lR4PZZv kAaA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=zgV9pC+zt0gI/V422zTkhHPL1PoCXjjbpPu+KeAB0w0=; b=nIhfvJechgwN9LfCA2nDNg1UIYmrWX5h5VAkfSC3hFhuSrlu9GEwqiChCuHx2d7lGT 9NQd+lBUYOWGOh/MX2wqQ/i7tSy6cs/kSWujPZRjar5RSqlNyr5mKSoOJ5eDxplYxpxo WQxy8q7PjPjVkUb1ioigHG4QrMiJtAw1tln9Jtspzvd8F+CJeNeU4+onHfONLpt+3jiL HaE+lJYwknPdfFYXIb2SBfiXZ9UCbw2WBEeh0vzFmbOlCIqxwCNlkSn57UO/+wOxWnSw jc59KxRMld4YG1t1t2rBVQvPvYgp/86o/U5+FYPhsrjw1wxbV4QkNp6gBDw0yHkqKfYD TyFw== 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 q5si10148093ejb.174.2019.10.14.01.39.22; Mon, 14 Oct 2019 01:39:45 -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 S1730281AbfJNIim (ORCPT + 99 others); Mon, 14 Oct 2019 04:38:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40966 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729928AbfJNIil (ORCPT ); Mon, 14 Oct 2019 04:38:41 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8EAE6C0568FD for ; Mon, 14 Oct 2019 08:38:41 +0000 (UTC) Received: by mail-wm1-f72.google.com with SMTP id o188so6835273wmo.5 for ; Mon, 14 Oct 2019 01:38:41 -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=zgV9pC+zt0gI/V422zTkhHPL1PoCXjjbpPu+KeAB0w0=; b=oXn4BbJRhYEeUuWd0snXJhOlXwwk80OAR0sPcfaxqWTwC4CljRQhGcSzQWRhQ9Uzdr wnUD0DdsVIato0nw3bsFNNQtREOXKXZ36NhrwCto8N270ilnLc0n7F1tOJECu1lMIKmp nWfVTunvRxdW59g2Cc6pY3MB8zwZy1qYLzocGs9PgNWGHgkX4y7WudjwPGSfVquSabx7 fiDeHMW9E6TeJaNJSB8a11FvCyYfPFwPqWhEoen6UiS9M0tnY0uLjzxSfmLEhv0/DucC Lv/MItavoTmLBedSgRP20KSYKjCnu9nvivY9EPLjZ7ca20LNyCHs9X/vd7nsW713Y9GY 7fEg== X-Gm-Message-State: APjAAAWmiCpuHzPrAWHJWhchGcnsu2wrHrcsMcxvknhc+CQ2F+kPPjVA /1bWGqNB3Ty9ej0EdJlkcPBAAjO1zfKS+Ut4G3j+O87zGZQigTLROr5MzZXNTsIMhsNwLo0iXsm 9oaL/jZs6E3rCYyEXYzZo38qw X-Received: by 2002:a1c:3284:: with SMTP id y126mr14533750wmy.164.1571042320318; Mon, 14 Oct 2019 01:38:40 -0700 (PDT) X-Received: by 2002:a1c:3284:: with SMTP id y126mr14533736wmy.164.1571042320048; Mon, 14 Oct 2019 01:38:40 -0700 (PDT) Received: from steredhat (host174-200-dynamic.52-79-r.retail.telecomitalia.it. [79.52.200.174]) by smtp.gmail.com with ESMTPSA id x5sm22881456wrt.75.2019.10.14.01.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 01:38:39 -0700 (PDT) Date: Mon, 14 Oct 2019 10:38:36 +0200 From: Stefano Garzarella To: Jason Wang , Stefan Hajnoczi Cc: Stefan Hajnoczi , "Michael S. Tsirkin" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , virtualization@lists.linux-foundation.org, kvm Subject: Re: [PATCH v4 1/5] vsock/virtio: limit the memory used per-socket Message-ID: <20191014083836.fumqbp4sfn5usys6@steredhat> References: <20190717113030.163499-1-sgarzare@redhat.com> <20190717113030.163499-2-sgarzare@redhat.com> <20190729095956-mutt-send-email-mst@kernel.org> <20190830094059.c7qo5cxrp2nkrncd@steredhat> <20190901024525-mutt-send-email-mst@kernel.org> <20191014081724.GD22963@stefanha-x1.localdomain> <2398c960-b6d7-8af3-fa25-d75344335db7@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2398c960-b6d7-8af3-fa25-d75344335db7@redhat.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 14, 2019 at 04:21:35PM +0800, Jason Wang wrote: > On 2019/10/14 下午4:17, Stefan Hajnoczi wrote: > > SO_VM_SOCKETS_BUFFER_SIZE might have been useful for VMCI-specific > > applications, but we should use SO_RCVBUF and SO_SNDBUF for portable > > applications in the future. Those socket options also work with other > > address families. > > I think hyperv_transport started to use it in this patch: ac383f58f3c9 hv_sock: perf: Allow the socket buffer size options to influence the actual socket buffers > > I guess these sockopts are bypassed by AF_VSOCK because it doesn't use > > the common skb queuing code in net/core/sock.c:(. But one day we might > > migrate to it... > > > > Stefan > > > +1, we should really consider to reuse the exist socket mechanism instead of > re-inventing wheels. +1, I totally agree. I'll go this way. Guys, thank you all for your suggestions!