Received: by 10.192.165.148 with SMTP id m20csp430881imm; Fri, 20 Apr 2018 09:02:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx48oPb2A59gLOhEgexTdzIk51gW+ZuN9oXoWaQYbFYwSbGZNMrHKOzYFyHwImEmAT1HimpLn X-Received: by 10.99.42.137 with SMTP id q131mr8930060pgq.379.1524240144257; Fri, 20 Apr 2018 09:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524240144; cv=none; d=google.com; s=arc-20160816; b=B19GmHGPLEEuqyUfqumD+KMdjNXMHh1DM1Kv++N/y2RwK/2X1HgMgvrdsNxMGNBxh/ 4j0Bx/2WIIdbXxDJGf30IPOjCR93Q10QKooMrwVcQzAJQdRGoNf827LHiIzjxppTKTr7 dVN2DWmHOeRDmDBAZ12vvLyx2CfSSaIxDUEKbHAYl2+IuZSJ3f00rxuMOFije81TWm76 bevhVXdGHWcSIxoM31JJfuW1tIGRAfdSQQ7MnBUhnFjzdTJY9LluNMoLrPgMua8ZCMI3 wHm8IWEeN9KJNA0qTlQ5d2pyiS67IHEG+K+h5L7kgbSx1CIMOTvW/+juiJQcD9WLDkbX UG7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=aYDinun7nq5s/DDDCz7qjnPoqXihHZDVdrxCRXuazos=; b=LBGu1mpYPfCGW/2krbuneABLvpX5/IUa+mEz4+FhvfksPkqBIw3vMTtwUapXrpkNSl r/w/KGRN6x3h6ubxFDEZIwgYP0V/79MDX0G8PrYZHweop3QjL73EFjLnl+0n1xyVCbS8 9btjIaE9SeUNxwV5uBX8b+pt1JmL+L15e6B/gP893vDQ7wGAiMGupSrLfo0jTsfV5hYs kRj/dg4dJBz55Z9q2L1GJm0a4oPhER2JuQL2YsJ4pITWJNVmJk9wI57kY1G24C8q8Xkw vHZcohzSl1mju+2sKpczM0FW+ppO+f2ZxNMvzHBD1PyMuuwEr41He0fN8axDYSIUgIun ptvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=T8w9cqWf; 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 g11si5145412pgn.368.2018.04.20.09.02.09; Fri, 20 Apr 2018 09:02:24 -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=T8w9cqWf; 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 S1755821AbeDTPzs (ORCPT + 99 others); Fri, 20 Apr 2018 11:55:48 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:40710 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755531AbeDTPzq (ORCPT ); Fri, 20 Apr 2018 11:55:46 -0400 Received: by mail-pl0-f68.google.com with SMTP id t22-v6so5492116plo.7 for ; Fri, 20 Apr 2018 08:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=aYDinun7nq5s/DDDCz7qjnPoqXihHZDVdrxCRXuazos=; b=T8w9cqWfCDYFtPWgV39YKNzbYU8A8oTFkT45HO2R468gQTxlUnpI5rtwvn6JAKY2dF PQwdUsGcT28MTydDm8j8gMod/kk49E4PuZgL2KVoQS+ewDXYEoJWQlm9qIiO1AfC/IdW 7TaFrQhoCEDsZJrE2frYAy7SNZ5PXStnr3JDUMM79QKLfTxe+5trysJRMSV3U/b1RX5Q bFy5QtdtZBrgPxmOy8emkebf3OVk8GjU01/JC7B0a6/Geyms/y+3LXeon4oS+C205cFr P/rVrSteOXdGtpwOJbO2qThXNMpcnBMJX+cKeSqakmiMZvcqNrsn7BCu3Srs0yIPkAF2 aNyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=aYDinun7nq5s/DDDCz7qjnPoqXihHZDVdrxCRXuazos=; b=UN437cfQj4Y/xkviwynKoRvdFd8NoGKCUxeLZ8agDcf7W3VvP/8CwGgd527s6WsbfZ yDaLuLyCFORRRVs5Cs2IfvJPtqKeOcQpz7adiTpzVjaleRUDDWVRmisUF1UNJuwsqYwl ss1TV7dsfXf43z6URrGVbZPpd5bE2y8LU+rhUwJv1Fh9eWz6mrsSQy3g8z1/Oqn6ZW1i dHp0ofBJ8iLZJQnLlT/jnRV20y6AdCyFkiTHiCflAOyG6LppLWuXqhMRAaz/tkI21qQJ e1vl2U5nTAsDZeF+j5fjTJKY4z89AllFGfJzXBYepgCUrofelpCvf7PUfMAT0vjj9gD/ IN8w== X-Gm-Message-State: ALQs6tCsXcmudWVcgzerPWJT81rg5Ovo3+4Df7hf7u4XGPVIuqKUuhlz Jb/f+KETS6cbHyJfrermNMEQUg== X-Received: by 2002:a17:902:a70b:: with SMTP id w11-v6mr10660904plq.353.1524239745651; Fri, 20 Apr 2018 08:55:45 -0700 (PDT) Received: from localhost ([2620:15c:2c4:1:7e6f:1e60:1805:893c]) by smtp.gmail.com with ESMTPSA id c3sm12941297pfd.28.2018.04.20.08.55.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Apr 2018 08:55:44 -0700 (PDT) From: Eric Dumazet To: "David S . Miller" Cc: netdev , linux-kernel , Soheil Hassas Yeganeh , Eric Dumazet , Eric Dumazet Subject: [PATCH net-next 0/4] mm,tcp: provide mmap_hook to solve lockdep issue Date: Fri, 20 Apr 2018 08:55:38 -0700 Message-Id: <20180420155542.122183-1-edumazet@google.com> X-Mailer: git-send-email 2.17.0.484.g0c8726318c-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series provide a new mmap_hook to fs willing to grab a mutex before mm->mmap_sem is taken, to ensure lockdep sanity. This hook allows us to shorten tcp_mmap() execution time (while mmap_sem is held), and improve multi-threading scalability. Eric Dumazet (4): mm: provide a mmap_hook infrastructure net: implement sock_mmap_hook() tcp: provide tcp_mmap_hook() tcp: mmap: move the skb cleanup to tcp_mmap_hook() include/linux/fs.h | 6 ++++++ include/linux/net.h | 1 + include/net/tcp.h | 1 + mm/util.c | 19 ++++++++++++++++++- net/ipv4/af_inet.c | 1 + net/ipv4/tcp.c | 39 ++++++++++++++++++++++++++++++--------- net/ipv6/af_inet6.c | 1 + net/socket.c | 9 +++++++++ 8 files changed, 67 insertions(+), 10 deletions(-) -- 2.17.0.484.g0c8726318c-goog