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 D32ADC2BA19 for ; Mon, 6 Apr 2020 13:04:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 882B320781 for ; Mon, 6 Apr 2020 13:04:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qaBk2+HT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 882B320781 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 30A4C8E0014; Mon, 6 Apr 2020 09:04:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2BA608E000D; Mon, 6 Apr 2020 09:04:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D0BB8E0014; Mon, 6 Apr 2020 09:04:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0217.hostedemail.com [216.40.44.217]) by kanga.kvack.org (Postfix) with ESMTP id 0666A8E000D for ; Mon, 6 Apr 2020 09:04:33 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B3B06181AEF10 for ; Mon, 6 Apr 2020 13:04:32 +0000 (UTC) X-FDA: 76677449184.29.snake44_279e36870f01f X-HE-Tag: snake44_279e36870f01f X-Filterd-Recvd-Size: 4087 Received: from mail-yb1-f195.google.com (mail-yb1-f195.google.com [209.85.219.195]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Mon, 6 Apr 2020 13:04:32 +0000 (UTC) Received: by mail-yb1-f195.google.com with SMTP id f14so8684632ybr.13 for ; Mon, 06 Apr 2020 06:04:32 -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:content-transfer-encoding; bh=Hqays/GgCtOUvwT2vqd65B6v/EdiY+pv7CQuSIyzhwk=; b=qaBk2+HTmwMXeDkQvZgAbChKseeTvOYD0s6k+kZQI+PzqFj6/pTDGTBqkgNXU3TWBA PNuBz09nHXgEmrJb1lJ/db+fFxgHdGEqHbzhkkhDmAADdcs3ujBUL7/fsS9+1yKJrXLP S2RQnTHeZa52m287uOjJUrwkXlGpcsK/n/T02tjoAH/U5o0m/CYnjG5lPCeKeeCrrust 3myXYEK6uLDdm2m1eVbNSMXqQiaQQwFHoJKX7OgxfFlheTE6zuInCGSINWcCdW2PbRmD 4d0xPAecAxwTiUicAvfOGNS/kJSRGqqjKPjTATFyp/ud4FIUB944l0B8DJ8oo4D9GLPr SZ7g== 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:content-transfer-encoding; bh=Hqays/GgCtOUvwT2vqd65B6v/EdiY+pv7CQuSIyzhwk=; b=B+mCEGtpXxtqwTL0ubq/xuMDUELfLbJxK4tTQLBlSF+zhfoHwKY9xg6OTd5Hr9wMuU bhmvm1B6cfnPF0Kj8vKgzZHKFVLtQQJRhNVa7RVWSDxmm1CWeT57r/Z43FZ+/HT0SEKo 6IFqEMkeaNl2Eyn/NLwYiZFLrU4CCXKsIJe6+Os0QOm6kih2lMXIfsR2FlEuHWAw+K/4 E+WeFtzdt6IymQ8r/cCnESQvAtve/vq0J9itFS8BbEbdsZiY8uZoYjsncxkYCGS7o0IU bexkXRCP82tAzVKLAM0hsC32KRUIiklkbFYb1itMXctgCtUbxi5V0rphdwSZxXjyqf1p zCtQ== X-Gm-Message-State: AGi0PuYOnuPkkIJ8+GoefGvmUQGKERxD5YSfCIVuWi9WrOBRTjcTfjGy A6JMyItYvzLhn7xmVBajEUDxzr72NZzFOuqYDNdD1w== X-Google-Smtp-Source: APiQypI2IEkYW9hmYrDfNANzdNQ5jVMW479+9pqFos58Wn9zjkZKryk5SxnCwhVQD+cDhAHP9pSOQmeN/x1cix9yEuk= X-Received: by 2002:a5b:cc7:: with SMTP id e7mr35902157ybr.7.1586178270122; Mon, 06 Apr 2020 06:04:30 -0700 (PDT) MIME-Version: 1.0 References: <20200326070236.235835-1-walken@google.com> <20200326070236.235835-8-walken@google.com> <1c463464-1d72-287e-e785-f077a95ccf20@linux.ibm.com> In-Reply-To: <1c463464-1d72-287e-e785-f077a95ccf20@linux.ibm.com> From: Michel Lespinasse Date: Mon, 6 Apr 2020 06:04:16 -0700 Message-ID: Subject: Re: [PATCH 7/8] mmap locking API: add MMAP_LOCK_INITIALIZER To: Laurent Dufour Cc: Andrew Morton , linux-mm , LKML , Peter Zijlstra , Vlastimil Babka , Matthew Wilcox , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Ying Han Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Mon, Apr 6, 2020 at 2:46 AM Laurent Dufour wrote= : > > Le 26/03/2020 =C3=A0 08:02, Michel Lespinasse a =C3=A9crit : > > Define a new initializer for the mmap locking api. > > Initially this just evaluates to __RWSEM_INITIALIZER as the API > > is defined as wrappers around rwsem. > > I can't see the benefit of this change. > The overall idea is to hide the mmap_sem name. Here the macro > MMAP_LOCK_INITIALIZER() doesn't hide the name. The idea for the initializer is that it makes it easier to change the underlying implementation - if we do, we can change the initializer without having to change every place where it is used. I actually do that in my other patch series converting the mmap_sem to a range lock. But you are correct that it does not help with renaming the mmap_sem field - my next commit in this series still has to do that in every place this initializer is used.