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 824C1C2D0EE for ; Fri, 27 Mar 2020 07:44:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 472DC20705 for ; Fri, 27 Mar 2020 07:44:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="P7EwGWtF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 472DC20705 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 AED356B0010; Fri, 27 Mar 2020 03:44:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A9D106B0032; Fri, 27 Mar 2020 03:44:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B2096B0036; Fri, 27 Mar 2020 03:44:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0120.hostedemail.com [216.40.44.120]) by kanga.kvack.org (Postfix) with ESMTP id 819BB6B0010 for ; Fri, 27 Mar 2020 03:44:43 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2E504582D for ; Fri, 27 Mar 2020 07:44:43 +0000 (UTC) X-FDA: 76640355246.20.road67_c0e91b6d0a3a X-HE-Tag: road67_c0e91b6d0a3a X-Filterd-Recvd-Size: 4556 Received: from mail-yb1-f193.google.com (mail-yb1-f193.google.com [209.85.219.193]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Fri, 27 Mar 2020 07:44:42 +0000 (UTC) Received: by mail-yb1-f193.google.com with SMTP id 204so4064131ybw.5 for ; Fri, 27 Mar 2020 00:44:42 -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=fuJBH1/qFJ0xcFrTragWViWx3N3gcqaqROLp9eE2znM=; b=P7EwGWtFPjtTjEzIV0rKm6jn99Yc1fMjxaFRXJ1zH6pEW8ueA6Y6ksIM0Jc7DNqF8p rgxpJlJ042hYCS7ekPQefhJWZAWqMAGpmIwZg1VGogMthR0SuKq1CahCLOWZ4YgfK//l neFT2gm6oKLmcbdiVPxifGuQqPmtiLVQ/bDPk0E5xz3rzPxLIjSwMgeXwdedkOYeznn1 uLsJBBd/XmvExI0hVcB0bMSdN65LuAMItjbNMWaNgVLmOyKD603LHdWpfRtxC7UUUzYp 5BkYOKLd32ZzxusItUg94/LR/yu5BKCkyaeAJTC4Ku/NPkxulfGPTlP9Ce8Ep/mFbYDF bsww== 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=fuJBH1/qFJ0xcFrTragWViWx3N3gcqaqROLp9eE2znM=; b=GMj8ai+xifer7PwUP6LYPF6UtppJw/gFFzDEx+36RCbgcrisJGzl/ppXu5BIY95MRG d1u7oTJXEofANa4bPk2uuYWW/8mSaj0bfy2o3DV2k/T983N/xk3j4rAGifgcTWJxgwHH YrIBCW6U7O2dzPj7oPh1V6HO3pefsAibBHbTk2F2HLsb88yiZTPpKlyRd9ci8VEV0z5V 72FgufxhOB4LoIBpu7FdtLTtbm91ieWQxnmIS/JGpy7b4yxLqx9VET0dZOqfBwaYGbpF tSsztENA6eAi7633iiCM/XZ+NzVm6AGTHGH+aDgjXL5I+FLzY/eZ3cUJGj1l2G4PXviX oj7w== X-Gm-Message-State: ANhLgQ0YEm75yGHv3uB+/vc+TDKCMEpuaoY8RsyXV/+FSGq8/ptRjEZn f5srfOqAlf2ZhzBax1efAXfjBQoPE7dCnEMQchTmvg== X-Google-Smtp-Source: ADFU+vuq4HJ6geuH9mDBbQTCLLZdmNY6A4XEtkti7le78Dg4PDcoGQ027nMwXseJyxdatD0xpwnX38cOtr1cMkaCAHI= X-Received: by 2002:a25:ccd0:: with SMTP id l199mr19110500ybf.446.1585295081895; Fri, 27 Mar 2020 00:44:41 -0700 (PDT) MIME-Version: 1.0 References: <20200327021058.221911-1-walken@google.com> <20200327021058.221911-5-walken@google.com> In-Reply-To: From: Michel Lespinasse Date: Fri, 27 Mar 2020 00:44:29 -0700 Message-ID: Subject: Re: [PATCH v2 04/10] mmap locking API: use coccinelle to convert mmap_sem rwsem call sites To: Markus Elfring Cc: linux-mm , LKML , Coccinelle , Andrew Morton , Vlastimil Babka , Matthew Wilcox , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Jason Gunthorpe , Peter Zijlstra , Laurent Dufour , 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 Fri, Mar 27, 2020 at 12:22 AM Markus Elfring wro= te: > > > This change converts the existing mmap_sem rwsem calls to use the new > > mmap locking API instead. > > > > The change is generated using coccinelle with the following rules: > > Would you like to apply only a single SmPL rule here? I think this version of the patch is already a single rule, similar to what you suggested ? > > // spatch --sp-file mmap_lock_api.cocci --in-place --include-headers --= dir . > > Command parameters like =E2=80=9C--jobs 8 --chunksize 1=E2=80=9D can be a= lso helpful > for a parallel execution of the desired software transformation. > > I suggest to consider another possibility for a bit of fine-tuning in the= shown > SmPL script if you would eventually care for nicer run time characteristi= cs > for the application of such a SmPL disjunction. > How do you think about to order the elements according to a probable > function call frequency? I'm not sure it matters that much, as long as it produces the correct end result. The run takes about 25 seconds before any optimizations, which I find very acceptable. --=20 Michel "Walken" Lespinasse A program is never fully debugged until the last user dies.