Received: by 10.192.165.148 with SMTP id m20csp2619913imm; Thu, 26 Apr 2018 14:18:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+o+LMTaoLF5RGFcuW1eTXRudz1E6h5ycRzTntEVCNlwqTW/Rnu/3duwMv+VI4P0dQNN0eD X-Received: by 10.98.77.2 with SMTP id a2mr33983126pfb.213.1524777510373; Thu, 26 Apr 2018 14:18:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524777510; cv=none; d=google.com; s=arc-20160816; b=Xevd5zDFN6iX7CkErlCDnoMqgQNX0bA+7LLqaLiD0kiOesZz9EIQQV7CVzPPtTr9d0 zrhwph72pJzDX78+h1QNU6xAkF3WcqQYwDXEMiUc0sRw5LjirA1OIlwQDIOpFA97BmEG UKXaLyVTUc9LZykNw1oe0XYIHveF53PYXilb0K+mbbVvZFSYMR3oEvKh0k72AHorGCMj GLkKP3apaeTqujQmdRdf2pR53wFFcNmvd4EQZWIPaU54T/MoaPlY92wTI5sND6HM+ZTO f4D03WafHm5A0K02vm8+smKIlR2NHwJPuA5Kfx5gsJumi2sUp3lWH3xY+XAYsPY6J19t C8Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dmarc-filter :arc-authentication-results; bh=cbgF9O4vU3vJ+++48/iFMK5RbzhHvpc8JmwsNDVu+yQ=; b=vol+CkGc3fOi4jKxu1ER9Bz0Hx2cOORJSsqT6oQFQq/HAO33+B14hEp3NZCBGpmDGc gWdRQFQTbKoSnw1u2gwXEcTe4nqvequl6CuetPqwUjN/jjWblCrQl2IwVNsR3Fjh15cK iMECv7inJjDpkK5bRuxDgELecnPjps643X45g6iU1U6f3fqpLIHB2zBiq/02yKg+Z8Ci bmhcwefOS0rwRsVVjswGL44iFlEF7llekco84EnhSs3E6dl02fsbKR+cPSaqxT5geJgs 6IMKIMbTiLFb5K35lMurXx1Fq9yva9zrUFwwC/kVyMloMNR+1YPJ25bN36S3o9vNWi6z rD3g== 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 e66si11747923pgc.466.2018.04.26.14.18.15; Thu, 26 Apr 2018 14:18:30 -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 S1757046AbeDZVRM (ORCPT + 99 others); Thu, 26 Apr 2018 17:17:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:46616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756518AbeDZVRH (ORCPT ); Thu, 26 Apr 2018 17:17:07 -0400 Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 28AFA21838 for ; Thu, 26 Apr 2018 21:17:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28AFA21838 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org Received: by mail-wm0-f41.google.com with SMTP id l1so20701wmb.2 for ; Thu, 26 Apr 2018 14:17:07 -0700 (PDT) X-Gm-Message-State: ALQs6tADvToc/Qr/AfCbxFjpynFsl4EWcLSwYWs9b4l0NbwNFiVwsdxX l0oOJ6goV3k8QnrDSyemztUB/YP+OMFmfoLUkoS5vQ== X-Received: by 10.28.71.146 with SMTP id m18mr50076wmi.144.1524777425580; Thu, 26 Apr 2018 14:17:05 -0700 (PDT) MIME-Version: 1.0 References: <20180425214307.159264-1-edumazet@google.com> In-Reply-To: From: Andy Lutomirski Date: Thu, 26 Apr 2018 21:16:55 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 net-next 0/2] tcp: mmap: rework zerocopy receive To: Eric Dumazet Cc: Soheil Hassas Yeganeh , Eric Dumazet , "David S. Miller" , Network Development , Andrew Lutomirski , LKML , Linux-MM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At the risk of further muddying the waters, there's another minor tweak that could improve performance on certain workloads. Currently you mmap() a range for a given socket and then getsockopt() to receive. If you made it so you could mmap() something once for any number of sockets (by mmapping /dev/misc/tcp_zero_receive or whatever), then the performance of the getsockopt() bit would be identical, but you could release the mapping for many sockets at once with only a single flush. For some use cases, this could be a big win. You could also add this later easily enough, too.