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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 39FDBC54FCB for ; Wed, 22 Apr 2020 22:54:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C614520724 for ; Wed, 22 Apr 2020 22:54:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="grccDY5g" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C614520724 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2C69F8E0006; Wed, 22 Apr 2020 18:54:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 277A98E0003; Wed, 22 Apr 2020 18:54:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 18D9F8E0006; Wed, 22 Apr 2020 18:54:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0079.hostedemail.com [216.40.44.79]) by kanga.kvack.org (Postfix) with ESMTP id F3E068E0003 for ; Wed, 22 Apr 2020 18:54:46 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B5AEF5DF9 for ; Wed, 22 Apr 2020 22:54:46 +0000 (UTC) X-FDA: 76736997372.06.pail33_c953f08e9c21 X-HE-Tag: pail33_c953f08e9c21 X-Filterd-Recvd-Size: 3949 Received: from mail-yb1-f194.google.com (mail-yb1-f194.google.com [209.85.219.194]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Wed, 22 Apr 2020 22:54:46 +0000 (UTC) Received: by mail-yb1-f194.google.com with SMTP id o139so2084317ybc.11 for ; Wed, 22 Apr 2020 15:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1hkThsyt9bGtB9j8NC1A75L5tYk+krUsD870wYCpjgo=; b=grccDY5gsDJ5hIEWCdBAC3aLQKWnBAH9o+1yZqpLA7oE0WwwyFQbq8mPDFLPXItXaE O3tD1g/qkiIqUkY1o/8lANVEHsCexzPsfHg5zuJRE1uYzzdvHVr8lPyOkcU7A7uYUH6Y 50bz25QJG/pr4eVVPeIA0fZCsNK47MTFZVPTiWkozxgiz+tSDOypKiVtaT8pmG9Z5o+2 i/NSLKKbOLjtzaAwHC3OGBFOHg2eqr+UaS3QgwDP6whVswYMpMRi7Q+8Q3WjXtM4O8mG G/zRGqyTMP6vT1RwK8qv4vs4Hcr/abLrFTt3ZFJ9rc0tA0ImMDoZz1age+oO++Z7bLe6 en7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1hkThsyt9bGtB9j8NC1A75L5tYk+krUsD870wYCpjgo=; b=esREb7xtxDA4T5zmuZr+JdwNICnibdtDFNVxdM9sP7IQR32OLmYSOwUE21Z4Re7Pf3 rbAsuEjlNDrXQczbJjBEFAQyifEuxTFBXmiHlEHRC9VHaOO8kancBkij28f5bPMVzDjQ mcRh5kKFrFGRGQ5nG7+jVPaFaG1JsgOygt1xVrxEwHL+7t5/SEvXS+gwBABYdVQ2h7nR hm/66KFji07XqPJl6Yc8mQtpEC0KcTbrisR3aKQ+4wabGK/FUGWgIYYoIe9EA2e//ev/ AowK52xQoA7Y9Oi2ZZuGEZt4Nv1sOFc48kOfn0h053uk7TUuWDCr/xfWjxCQnVa8/whE JBBw== X-Gm-Message-State: AGi0PuaufOn8yJ5KrQD8bnfybh8lItE3cCBEryHpgXLB/7tfHMI4cuyz /xjXQm+r6F/Q80+x/kjGKH3x6oJ7SxAX/gVh7l1GVA== X-Google-Smtp-Source: APiQypKSA3iG8RJ4S9ABuuHBi5v+zPHefh7pQMT1p5WEIRRe2JN/cU34UXFN5xqaBgolc6AC5fz3XpktcZtm8dVfsD0= X-Received: by 2002:a25:4c07:: with SMTP id z7mr1966878yba.298.1587596085501; Wed, 22 Apr 2020 15:54:45 -0700 (PDT) MIME-Version: 1.0 References: <20200422001422.232330-1-walken@google.com> <20200422001422.232330-11-walken@google.com> <20200422015829.GR5820@bombadil.infradead.org> In-Reply-To: <20200422015829.GR5820@bombadil.infradead.org> From: Michel Lespinasse Date: Wed, 22 Apr 2020 15:54:32 -0700 Message-ID: Subject: Re: [PATCH v5 10/10] mmap locking API: rename mmap_sem to mmap_lock 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 Content-Type: text/plain; charset="UTF-8" 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, 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. 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...