Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2205049ybb; Fri, 27 Mar 2020 00:46:35 -0700 (PDT) X-Google-Smtp-Source: ADFU+vujp6gfvrN3WlNpEPdeJ6K1Aw9V3O+WNQEZrULAn5M/KDktjpcV7XHBgPpAi2ynN/q+9aoD X-Received: by 2002:aca:1e1a:: with SMTP id m26mr3122738oic.39.1585295195654; Fri, 27 Mar 2020 00:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585295195; cv=none; d=google.com; s=arc-20160816; b=BRxehmFtDoIHGd3hn5xLyahDcBJeSJJI7nqMnCMZabp/BJDIBJqaFMIGQf8gBkYdKv 1ulsvnpLShy8IUNYtCBNSXEhWfvwK44BwM9nIIWnpFPckD/i63CTQSMWP+uVqbr6cq6M mMzr/c0e5vUEt373pWBodbn0qcLx85bJ7n76U69mxjXUYCDfezlsxRDzMWACqpEcKH7z cVUgv7IzxrdWByK1dRP3OX9EBsHoWBfbePhHclgVd0WPQdhYSmQh7J7vurLEkH3mlmTS vBMtdZz+p8gIjh1ukIx3biUOFjRtrKgXByiNWSyjra0tOFOCAGdURZcsj2V5oIuIE3fE 01KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=fuJBH1/qFJ0xcFrTragWViWx3N3gcqaqROLp9eE2znM=; b=qbfLLkTC+LYLHXibaNJ7bPmOn898778iXLVEZeiFxmyv+tM9bUVsrJHuPpVd96yZ6P nhyEdPAfS9QN/W3QC+bkrSW89uw7xaYeXcVWEhsqB4acGtK0ePmIObAdZ6D+ykDY0oWN 093cNtpAH2qmfC8SpfBLkKu5W+W1bldNcHrO06IlCBF7deeEut5ySKNYTNqx0fBUsuw5 UaXZSdTJzMz+iZ1IYuSM3zqiL9TuA++0dMZFk63x2FEJhNb9yG1yDkgrnrm+zpPJoyWw 1Z5HrZ87QLPm8Rzd/rCXQQSiJhD2/5wLWrQwwPIOp5zcON9ZTci+OoKcPL6w0JyY0k2L Px9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=P7EwGWtF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id z126si2078273oia.187.2020.03.27.00.46.23; Fri, 27 Mar 2020 00:46:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=P7EwGWtF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726383AbgC0Hop (ORCPT + 99 others); Fri, 27 Mar 2020 03:44:45 -0400 Received: from mail-yb1-f194.google.com ([209.85.219.194]:46455 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725942AbgC0Hoo (ORCPT ); Fri, 27 Mar 2020 03:44:44 -0400 Received: by mail-yb1-f194.google.com with SMTP id r16so4035489ybs.13 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=Hxx/3Qu7+sUAm0S83nx1pUPj7nkFZC9JrtBynRcjVLXWmMMhN4FD16th8NUOLPNuWf eTR9ku67jQj+WjENzeWsk941tQ6itLHLzkDPIY/aqjirX93dfga2yas0V++j0w6hsr1k 2860VfbvQ2Etulz2N6+ANFG+Ru4FjcQwhHzeFMMjCLjYEosvyXjpEfWhs1cw/zpAjya5 D7AqQj2HLIYUscBZ/HnKXbyZyiQScUrBMbBnrYk79YdCs2YQpdr69ZsKr5frgnayyXGB rct5m/8gwuo300GviBzLeTVenPLmbpGr5QHKDKu6o0h/NSE3dwFwZfEkEQHMtSHgPvlP 8SQg== X-Gm-Message-State: ANhLgQ1q8Uwc+6qQ8d85U8JVw/tk0hTmWeh5Qaj70jtyS1VyuzXjWoDR uJn1/7BjVKIXkfPsWt5DFzY6Ljtd9ZsJ7ykUbFgbJA== 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.