From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D8EFC433E0 for ; Wed, 20 May 2020 07:32:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A92A1205CB for ; Wed, 20 May 2020 07:32:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="sKQjNrWs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A92A1205CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2D02280007; Wed, 20 May 2020 03:32:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 28B37900002; Wed, 20 May 2020 03:32:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1963F80007; Wed, 20 May 2020 03:32:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0063.hostedemail.com [216.40.44.63]) by kanga.kvack.org (Postfix) with ESMTP id 03F05900002 for ; Wed, 20 May 2020 03:32:56 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B48182A87 for ; Wed, 20 May 2020 07:32:56 +0000 (UTC) X-FDA: 76836280752.13.dolls83_8e13711ff441b X-HE-Tag: dolls83_8e13711ff441b X-Filterd-Recvd-Size: 4501 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Wed, 20 May 2020 07:32:56 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 20 May 2020 00:32:42 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 20 May 2020 00:32:54 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 20 May 2020 00:32:54 -0700 Received: from [10.2.90.179] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 20 May 2020 07:32:54 +0000 Subject: Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock To: Michel Lespinasse CC: Matthew Wilcox , Laurent Dufour , Andrew Morton , linux-mm , LKML , Peter Zijlstra , Vlastimil Babka , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Daniel Jordan References: <20200422001422.232330-1-walken@google.com> <20200422001422.232330-11-walken@google.com> <20200422015829.GR5820@bombadil.infradead.org> <20200423015917.GA13910@bombadil.infradead.org> <20200424012612.GA158937@google.com> <20200424013958.GC158937@google.com> <20200519131009.GD189720@google.com> <7c540ac9-ba44-7187-5dc2-60b4c761e91c@linux.ibm.com> <20200519153251.GY16070@bombadil.infradead.org> <10d48b77-5c6e-2e10-84e6-16cdd76a45f1@nvidia.com> From: John Hubbard X-Nvconfidentiality: public Message-ID: <9c45327f-5542-c033-ec5e-201e9b0583aa@nvidia.com> Date: Wed, 20 May 2020 00:32:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1589959962; bh=VfcekzJCan2B7C+vng8WaKitp9wnyMh8WoZOorv+eKA=; h=X-PGP-Universal:Subject:To:CC:References:From:X-Nvconfidentiality: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=sKQjNrWs7FFZ5lMu/k6F8hbVIhDRoE1dadrgLMiGhCOG+Impk1HvTYGl6l/l0TpY5 GnD0bQS4zFK82fSIzAmzD6Cq5lJYQUFnIadRE+xNaIhZrxB9Z5OclF+Xfmm9oJEdmW YWs31UueL0HhlA2UhytrcYxLA+AjZylmGRguiyIFg3gTaDQmp0SKJe9SJMd2nqXORF hkKGCnHoY7g82M18x+Tgd+zL+U5WqB1n2b/AbbKR5/9fdwm95rk8gYXEWJ7QMuGdAL vTSAJzOdDAAUTdUBQw+7nTKnUJhHdT+QXaiHb48sZyXzuJ3glfEps8t6mTT3p4Npw+ k1IPqqsDB6rgQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2020-05-19 19:39, Michel Lespinasse wrote: ... >> That gives you additional options inside internal_get_user_pages_fast(), such >> as, approximately: >> >> if (!(gup_flags & FOLL_FAST_ONLY)) >> might_lock_read(¤t->mm->mmap_lock); >> >> ...not that that is necessarily a great idea, seeing as how it merely changes >> "might lock" into "maybe might lock". :) > > I think that is completely fine, makes sure everyone not using > FOLL_FAST_ONLY realizes that the call could block. > > Can I ask you to add that assertion in your patchset ? Based on > Matthew's feedback, I would do it in my patchset, but it doesn't seem > worth doing if we know this will conflict with your changes. > Sure, that's no problem. Although it looks like my changes may land in mmotm first, and then your patchset, so maybe the right move is to make this change *after* both of those things happen, yes? thanks, -- John Hubbard NVIDIA