Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp64990ybz; Thu, 23 Apr 2020 18:28:15 -0700 (PDT) X-Google-Smtp-Source: APiQypInrm7O2WKQV4OnreALOHa3Uc2uVJyL6WEv/8//6kFECI0icYmwac/WvwQrbwP6VKQq0tUS X-Received: by 2002:a17:906:8549:: with SMTP id h9mr4904838ejy.145.1587691694884; Thu, 23 Apr 2020 18:28:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587691694; cv=none; d=google.com; s=arc-20160816; b=OkFaX/luPv1EuFU1MiE6Ck5z36hwVffHhSb4kQ3aYF0eY9CV33icoh1tIyq608Cbmi L6Jc2Bq8nGrQyn3u6l2zf8OBN1mW9GVd1m1cWS5OOrH/oGUym8V55i79bOy7AcmAWr2o P4f8fo0krvNjt1T2rPeBKP+0SXM8vdO5EiX4Mybwf3o2SrBdihiRA9x4XU0Dvx/xsC7h RyrT08yJg40ce/Ze6o8GBSa/8enSBMi6oSXRFCM64Tb8Zm9aT0LUGt6pOpEZZz0SOB42 UAHsIdMern2QbXLLIkMl+fV0GsuIJIOR98FnVS1R+ysdrQDcTJFTAiA4pXl+6tKzPbX1 hM3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=NC0XHk8DQ3We4ZUfMs3NMjRQujIHbpO9VgcwaCx/kO0=; b=Gh96xiNL2mIhJjNNDkiasxBXZFcPOuq8IuRLvVSUtSSyCyglZ1R1Z3Y0Dqa+q34BwA VQUxgmVktpxMrCx4farGXgre51G8vkUgKXZynW27zX1PC/cOB/e/yAEG5Zipe9hv9+LJ h+DyXlukcfODh0/W6WRR7O+YdIxXiI3Pzjhns7al8v20ltO/xd9tho4oidM/vg2QiqCz AfgE7g2ppL2WIc4cy8bnI1TZWXfk56TGTF1HfB0PF3BAkyVSrzuwEhNLv6z/tsIjwJTA dfra7AJlQaP8PvSvLYoNMkJa9ivfNyTU/p+wBbtW82y7QFSwTlnsOtnj2qk91SFmoWpx IeOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ig3oOK65; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id m7si2063051edv.557.2020.04.23.18.27.50; Thu, 23 Apr 2020 18:28:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ig3oOK65; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727902AbgDXB0S (ORCPT + 99 others); Thu, 23 Apr 2020 21:26:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725888AbgDXB0R (ORCPT ); Thu, 23 Apr 2020 21:26:17 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA8F5C09B042 for ; Thu, 23 Apr 2020 18:26:17 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id o10so3827802pgb.6 for ; Thu, 23 Apr 2020 18:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=NC0XHk8DQ3We4ZUfMs3NMjRQujIHbpO9VgcwaCx/kO0=; b=ig3oOK65f7HvPazjGSWn8LXJCkLx1h6pDj1wg/l1sGgKh7vU8p9lD/lLFXQG2VdpRg S/+ST8aWjhIHom4pKFuzxsE/VbfOIOcTHr4QLO5B20mg+miTUWrqBpnQ0I0YBz6peQoG 03qqX2Zqe92JUyBw2bBw3RBraBfc9ASWbd3cz1x8zIf03Mo/reg01ZLs00nK1NjVrzoI G7V93jM5WcpvZ3LZGh7x7FreEqehtwKPum4wQld5JrHwnNbQoDzoJ2PpvZCafzR6zQVE BeDrXZFUzeRTiiIWWW5VFeN7Sz8Qk9yKHYV7MKE5tu2JEL0JC/DV9xPIUaJahmdEoLJi W6HQ== 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; bh=NC0XHk8DQ3We4ZUfMs3NMjRQujIHbpO9VgcwaCx/kO0=; b=koopxQ39PMJeme1+mVWFkrhsvg5PpDBl9rQixB9VTANXsGvRdB8ikHXfPcSg4GDRPR hAHsg8Eax5fj3kZ/aafXUrfmDpWu0qao4bheOuXEHxEXLp/jUmIDB7aONfRS6tJs59+f Ua2Vn9TyfRn5xdGsGjg6xEztEBCg7A8cbCemJnmGVi28w7WlocJIDdYlZIbSLLAgFDAO ufsl743j7o9ts15PtdKSA7KNdJ7Ht0z2bfGc+l+4Ry0vhy70RWaUtAdG6RBWfL+rEzGP nzvDVoBeUuvxxE9N6gkebYfEQRnmkUHgpBszc1TGxCbA4Nb/25uBV1Ka1FIxirW8u5gv Zg5A== X-Gm-Message-State: AGi0PubvjwrOSpK8Y7OFGAoqD53QaRBXxsRl06h0JBoUlVBJ2pYQLP4z 3r3hhk1nNi84tEa03J5tV2MYKQ== X-Received: by 2002:aa7:8a9a:: with SMTP id a26mr6377618pfc.77.1587691576899; Thu, 23 Apr 2020 18:26:16 -0700 (PDT) Received: from google.com ([2620:15c:2cd:202:2523:d194:de3b:636f]) by smtp.gmail.com with ESMTPSA id q201sm3978352pfq.40.2020.04.23.18.26.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2020 18:26:14 -0700 (PDT) Date: Thu, 23 Apr 2020 18:26:12 -0700 From: Michel Lespinasse To: Matthew Wilcox Cc: Andrew Morton , linux-mm , LKML , Peter Zijlstra , Laurent Dufour , Vlastimil Babka , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Daniel Jordan Subject: Re: [PATCH v5 10/10] mmap locking API: rename mmap_sem to mmap_lock Message-ID: <20200424012612.GA158937@google.com> References: <20200422001422.232330-1-walken@google.com> <20200422001422.232330-11-walken@google.com> <20200422015829.GR5820@bombadil.infradead.org> <20200423015917.GA13910@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200423015917.GA13910@bombadil.infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 22, 2020 at 06:59:17PM -0700, Matthew Wilcox wrote: > On Wed, Apr 22, 2020 at 03:54:32PM -0700, Michel Lespinasse wrote: > > On Tue, Apr 21, 2020 at 6:58 PM Matthew Wilcox wrote: > > > > > > On Tue, Apr 21, 2020 at 05:14:22PM -0700, Michel Lespinasse wrote: > > > > Rename the mmap_sem field to mmap_lock. Any new uses of this lock > > > > > > Shouldn't some of these be folded into the previous patch? > > > > So, I didn't do it because previous patch only handled rwsem_is_locked > > call sites. I leaned towards adding as few new API functions as > > possible until we figure out exactly what is required. > > > > That said, I agree it seems reasonable to split mmap_assert_locked() > > into mmap_assert_read_locked() and mmap_assert_write_locked(), and > > convert the lockdep asserts to use these instead. > > Just add mmap_assert_write_locked() -- some of these places can be called > with the rwsem held for either read or write; it doesn't matter which. > Others need it held for write. There aren't any places (that I'm aware > of) that need to assert that it's held for read, and not held for write. > > > I'm not sure we need to do it right away though; we are at least not > > losing any test coverage with the existing version of the patchset... > > It seems like a better way to remove users of the term 'mmap_sem' than > just converting them to use the new 'mmap_lock'. Hmmm, OK. I updated changes 09/10 and 10/10 based on this feedback. I do not want to resend the entire series, so I am going to send just these two changes as replies to this message and call these v5.5 :) -- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies.