Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3649259yba; Tue, 9 Apr 2019 01:39:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxiGtD/dCvBn9x7xTaxjEuzAZukLaIEcF5ddNU7GUzu8sEZ+k49P6taW+oLHLHAi+E7/6y X-Received: by 2002:aa7:8d17:: with SMTP id j23mr35405323pfe.62.1554799140658; Tue, 09 Apr 2019 01:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554799140; cv=none; d=google.com; s=arc-20160816; b=ARv3ZH8W71QfBtTGgVrVpmpa9I3XK+tywA1BFgszziJpfNJxHkG8SNzRHcn4/GFeOj tvgtWrKbZmSKGy94dZLoKQHAwF7BkYSRN1OgLHlz8D3Pqa7QDNptaZxPg5019H9aJvQM e+n+ZYvgA5AFuzVWzxY6sjo+WAF/tCnnCVV0NnCCBn/zd3armHuxW+1+fFIFFs4a9mQ+ z/qFGTA1FhMkxoFe1xK8FqBTp2JHHgOxKznqLQarOGnlAsE3CihGofuvKUL1GCegNP9C pQwo/leium2ojyDbQbPX3kaB9ObBeLCyfuNbLW0IgL8QZ/M5mCFduoI5cOjmCDg7pk2/ lptA== 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=b+PaXAG7rIj5XgsDbLdHAeTCjd3Lo/WIpta9U28I7Oo=; b=ikJIRn6Re84fgCmypVe67+KBy3sAB4WNe7aUTWlOs612k6E4dPsXL1DAYeTiXpZBhZ NLYLFFOdJYydTBGDvBKEK9AN6SpTDJmKGNHKkTnYB7b8CoxiHpsPtew+DPaC5qFY9KAF 9MHUI6MAgBbCbbU5AjCmYZUzobWN+xwPtdawFAOjCp92ofmr8KDUVodV3qZUhdzy48Ui 7a+/hiHlaxZ3+KsbNlPnGaaxBQzKeOmzJOhvW9tar/eHnEO3o3vMMSICO+BOnJL1oTQA alSPguOLKr8FC2vXpTH0J4u0gx2LlH7/8bPUF36y7k1OJnApyuojaCqmJx2t7pbRmXUQ hPWA== 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 h18si27346632pgj.47.2019.04.09.01.38.44; Tue, 09 Apr 2019 01:39:00 -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 S1726861AbfDIIge (ORCPT + 99 others); Tue, 9 Apr 2019 04:36:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40632 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726001AbfDIIge (ORCPT ); Tue, 9 Apr 2019 04:36:34 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7DA057DCE0; Tue, 9 Apr 2019 08:36:34 +0000 (UTC) Received: from [10.72.12.67] (ovpn-12-67.pek2.redhat.com [10.72.12.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id C443F69185; Tue, 9 Apr 2019 08:36:23 +0000 (UTC) Subject: Re: [PATCH RFC 0/4] vsock/virtio: optimizations to increase the throughput To: Stefan Hajnoczi Cc: Stefano Garzarella , netdev@vger.kernel.org, "Michael S. Tsirkin" , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, "David S. Miller" References: <20190404105838.101559-1-sgarzare@redhat.com> <20190408094416.GQ15001@stefanha-x1.localdomain> From: Jason Wang Message-ID: <1484dbc0-0413-b21a-6a48-be58da9cb722@redhat.com> Date: Tue, 9 Apr 2019 16:36:22 +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: <20190408094416.GQ15001@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.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 09 Apr 2019 08:36:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/4/8 下午5:44, Stefan Hajnoczi wrote: > On Mon, Apr 08, 2019 at 02:43:28PM +0800, Jason Wang wrote: >> Another thing that may help is to implement sendpage(), which will greatly >> improve the performance. > I can't find documentation for ->sendpage(). Is the idea that you get a > struct page for the payload and can do zero-copy tx? Yes. > (And can userspace > still write to the page, invalidating checksums in the header?) > > Stefan Userspace can still write to the page, but for correctness (e.g in the case of SPLICE_F_GIFT describe by vmsplice(2)), it should not do this. For vmsplice, it may hard to detect the time to reuse the page. Maybe we MSG_ZEROCOPY[1] is better. Anyway, sendpage() could be still useful for sendfile() or splice(). Thanks [1] https://netdevconf.org/2.1/papers/netdev.pdf