Received: by 10.192.165.148 with SMTP id m20csp1396674imm; Wed, 25 Apr 2018 18:22:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx48BErLY2QbRKXp9PUEeLshaXw/fE9iqwuvemD9umhrvENDfL88DH1Z1HJSVSnGocUkBmXOE X-Received: by 10.99.177.68 with SMTP id g4mr25403919pgp.253.1524705765679; Wed, 25 Apr 2018 18:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524705765; cv=none; d=google.com; s=arc-20160816; b=YCU8X2B5+cAWIxRFp/KSZTOVqeCzloBmWhzma8KL2ikHvChHy+rjMyav4aTiioexq6 0nxRPss/DovQ+jx+ML78On+yVwPI9Lqo1Qd6qsNSwBHBONmq3gPPW57V1f+U5MoqJrPf HvPcJNiWBTYzbkhrFoXgbMktYJJU4jN75PT1bb3BBoZkcjKINmbElw9uUZSEgoPvvG1y MCj9Oahg6wwOwhl392mPG7ok3vVVjpbysKsOYRAAVIYREFdSPNdWuibmkcXCn0l+jARA G+cHb97cXyYRsidCXsJ0nuBNvdFknMtNitWLU0+mJQ7xZhB+l9wRgsz/5pfWd3wPruYJ 7GJQ== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=xgXGGsIQlVoHZwDS8hsIPN6PQKXFybM3xKCWUo2kJGk=; b=0GhbzjSRb2oJ8w2afeGhgqaJHYpKfWJQ2g+GlabG7edKDp67YA7JJc/vJ6WsO2yxWa 3TVXQ48LNaq981vYHtwtZNdv8H62cFwQz8TUaIaEbmvCc6sFqY5VgJqqyxrRvLqGDUgD p2HvzByzwh3H2D3bqovRDosAkSgT1d1QYZ5M/hnBJ5s/gtKphd6891BTeJ2KWVXABXJ1 IvQeFbeuS6qEH2cG/2wkSolI/JnMck+940JFMpDF2Gtnv7bs96asKArsVjVGdMY7qVbz a4ktPoZZS62SVosAH28mdrUR/Cp2tq6Bwm9jvfMzwyBjzI4vl+rg5Md7JzimV95GJltG qjOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SM1iB3YQ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v2si14704557pgf.75.2018.04.25.18.22.31; Wed, 25 Apr 2018 18:22: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; dkim=pass header.i=@google.com header.s=20161025 header.b=SM1iB3YQ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751913AbeDZBVY (ORCPT + 99 others); Wed, 25 Apr 2018 21:21:24 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:37605 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750949AbeDZBVW (ORCPT ); Wed, 25 Apr 2018 21:21:22 -0400 Received: by mail-io0-f194.google.com with SMTP id y128-v6so29099759iod.4 for ; Wed, 25 Apr 2018 18:21:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xgXGGsIQlVoHZwDS8hsIPN6PQKXFybM3xKCWUo2kJGk=; b=SM1iB3YQlWxULgI87NVnMQog/kitV+u+XwaJ21vhUowqyWJjrmw52jUDl5n682iE8D /429OfuYu9SnmDajPXgay/+siJ1zE1b/5+ANbUYvyAjw3MneGNySid4tMFbnzE/uAUAh UJkucZorceyMng/hetRBNUS/GpcQf3jW4mEaYxbLZjxQr1wklUt2ADtprsGy5UkjWY39 m6au1xI4rji5fstqUhL0JX8QNyIjtUpiVSClBbFSVHSy1FF/XyUuw7n3muLzYYipLPqn DnuyBnFiqo1gZ+Pv0piYAYdqkRiZElfwCNvOYFlqhorLuJawfaAxE1hRPReUTjerCUdD cw2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xgXGGsIQlVoHZwDS8hsIPN6PQKXFybM3xKCWUo2kJGk=; b=ULUo/otC52xQ05iknoSxhJb5ujvFe/7bolLKQNNLG2IGeOiCbm0uZl1fP7Y6U+kBDg tP610L8b5cVcTqZdI0355/MVqSJwrQ37iuO17v0ahr4PTn2cAxRaAy+NoGQYSiOtGAT4 fYgsIAmkvK+7/Mdakp6d5YnqGRPFXzVjJVFG7KKXrQT3u9Bxxv1AzWUcXk5B7K636X2U b2JTC6YZux74g5THBw+k7hpYFwdieBDriHB4ZNQk32nVt5JAmEMMbPQxWsjRqCstnpJZ vZdduZCA4FCQ5RLHh8Jyx1oES8H5UZZBDELM/8ciRT8DrWQX20bcfvPgyUL2klkdmQoD BQ4Q== X-Gm-Message-State: ALQs6tCuL6qOC2Wer3FWT+NB7R1TrkW5b6nDUhbaFc698NpyGt5d0LKo pqIRxUCXUNBvb0xADYCxAtLvs1TYI5j4QCTVXyOOJA== X-Received: by 2002:a6b:3b42:: with SMTP id i63-v6mr31990914ioa.133.1524705681079; Wed, 25 Apr 2018 18:21:21 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:8641:0:0:0:0:0 with HTTP; Wed, 25 Apr 2018 18:20:40 -0700 (PDT) In-Reply-To: <20180425214307.159264-1-edumazet@google.com> References: <20180425214307.159264-1-edumazet@google.com> From: Soheil Hassas Yeganeh Date: Wed, 25 Apr 2018 21:20:40 -0400 Message-ID: Subject: Re: [PATCH v2 net-next 0/2] tcp: mmap: rework zerocopy receive To: Eric Dumazet Cc: "David S . Miller" , netdev , Andy Lutomirski , linux-kernel , linux-mm , Eric Dumazet 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 On Wed, Apr 25, 2018 at 5:43 PM, Eric Dumazet wrote: > syzbot reported a lockdep issue caused by tcp mmap() support. > > I implemented Andy Lutomirski nice suggestions to resolve the > issue and increase scalability as well. > > First patch is adding a new setsockopt() operation and changes mmap() > behavior. > > Second patch changes tcp_mmap reference program. > > v2: > Added a missing page align of zc->length in tcp_zerocopy_receive() > Properly clear zc->recv_skip_hint in case user request was completed. Acked-by: Soheil Hassas Yeganeh Thank you Eric for the nice redesign! > Eric Dumazet (2): > tcp: add TCP_ZEROCOPY_RECEIVE support for zerocopy receive > selftests: net: tcp_mmap must use TCP_ZEROCOPY_RECEIVE > > include/uapi/linux/tcp.h | 8 ++ > net/ipv4/tcp.c | 189 +++++++++++++------------ > tools/testing/selftests/net/tcp_mmap.c | 63 +++++---- > 3 files changed, 142 insertions(+), 118 deletions(-) > > -- > 2.17.0.441.gb46fe60e1d-goog >