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=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 72C7EC433E0 for ; Wed, 20 May 2020 12:48:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1968E207D3 for ; Wed, 20 May 2020 12:48:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="NKiIB31r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1968E207D3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 678BF900003; Wed, 20 May 2020 08:48:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 650B5900002; Wed, 20 May 2020 08:48:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56572900003; Wed, 20 May 2020 08:48:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id 3F967900002 for ; Wed, 20 May 2020 08:48:20 -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 E883D2C1E for ; Wed, 20 May 2020 12:48:19 +0000 (UTC) X-FDA: 76837075518.13.bells65_82e40b593b93b X-HE-Tag: bells65_82e40b593b93b X-Filterd-Recvd-Size: 4817 Received: from mail-qv1-f67.google.com (mail-qv1-f67.google.com [209.85.219.67]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Wed, 20 May 2020 12:48:19 +0000 (UTC) Received: by mail-qv1-f67.google.com with SMTP id r3so1239423qve.1 for ; Wed, 20 May 2020 05:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=je/KbnslOZKPvi+gdbk2BorRQK9HerFcoy4nD5X6lMM=; b=NKiIB31rUNec8vPy5B581Ac3XHacW4bKFkiRsrE64Ih4KYBq8+vE7e6JqfUsABdEEs vpEWvb2tq7FEsIQQ7SlWvqCtsFj8Y6eQz8bHkER5KF5DxHCd3cF8ddiES1gge5xyggyC woCsKccdrLS1Pa2+DKIj1RFtH4b/rdouJtV4rI89ssc0/a0Pfvbnrdcbpj5X1PYFe/du NlfzXFkUIsb/bxVA1uLZfeUJib3SXDMEgFDgU+pr04YShYQZ1xwhYE3oe3BxJg+ltOav rSDV7Wnut8vVcWwyY3O2fDe6KMHW5muXkuRMe6RltEdiK3sknldDfVTCcTf5EcwVoyMv c5aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=je/KbnslOZKPvi+gdbk2BorRQK9HerFcoy4nD5X6lMM=; b=j3/XR4dbSoyV8C7ncvqs9Xsq+lNa4G/oF16a3HZuFf/xcdoplIlckbkwnBjqhZGMW3 8jzGzJH3GH4zQTHMmc4MI/sgGiQ6zr1Il/8lsGmI5bGxe0Ulzxr6X6whMDNdfEJXRUQG +sNEj7FoMVUcO/Xf0qo3GMdBM9sRTCBO/8FahCQTRHrWJsQXnZ/wkv1wHeb1wvfk8a7w BAf8ITxpI+UzoxD2HEtjjBU+mKpXpRyFpWCnyV7lwtNPuxISSuCsMCTaV/8P4cmZCxUN EzPxxXGSmigjcAJPnscKa6Ht0XMRgyCtzgrmK6/fx30er9xv3XkyVrYmy4EzNHcwG030 Ceig== X-Gm-Message-State: AOAM531H++Raww+OE5b+a+LH6ZPwGxAvgg+AGFFMIGicp41OlBvIpnZq RgrwNlzXRR3oVFbFsCrHrpv67w== X-Google-Smtp-Source: ABdhPJxB9IgoFEYhXyhWQbtJRUK6zs/WfyptsnOZKIDXlwXkNioof1JO/WpAsbbm3+41MY2mjsIJLg== X-Received: by 2002:a05:6214:42f:: with SMTP id a15mr4609714qvy.212.1589978898653; Wed, 20 May 2020 05:48:18 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id j83sm1912436qke.7.2020.05.20.05.48.17 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 May 2020 05:48:18 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jbO8v-00063L-Du; Wed, 20 May 2020 09:48:17 -0300 Date: Wed, 20 May 2020 09:48:17 -0300 From: Jason Gunthorpe To: Michel Lespinasse Cc: John Hubbard , 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 , Daniel Jordan Subject: Re: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock Message-ID: <20200520124817.GG31189@ziepe.ca> References: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) 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 Tue, May 19, 2020 at 07:39:30PM -0700, Michel Lespinasse wrote: > > > I think this assertion should be deleted from this driver. It's there > > > in case get_user_pages_fast() takes the mmap sem. It would make sense to > > > have this assertion in get_user_pages_fast() in case we take the fast path > > > which doesn't acquire the mmap_sem. Something like this: > > I like this idea a lot - having might_lock assertions in > get_user_pages_fast makes a log more sense than doing the same at the > call sites. +1 I've wanted to see more complete lockdep annotations in gup.c for a while now.. There has been a number of bugs this would have caught Jason