Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3074990ima; Mon, 22 Oct 2018 23:13:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV63w77JwDsLLy1kQ1OC0jtL0O3s7NaN+WY1bhr3j/V/6+05C+uMAgvQcc8YOh72nk5vDljj0 X-Received: by 2002:a17:902:710e:: with SMTP id a14-v6mr48510227pll.179.1540275232287; Mon, 22 Oct 2018 23:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540275232; cv=none; d=google.com; s=arc-20160816; b=0Geaxze71A7/Nl2DNpAKbwORR+dF1p3fFf3kWnE7cwhJ3eacdzb9e7WI5FrYsMaqPm 25hOV6813Nu02UQuPk864FmRDUkZNWxFjuDmtUzuOvaTzlnxoSZQAUBtn5djVB9Vmfzv /6YQLsU3ixMsz7mvJi/84TIjALseCtE1hEVScPcVbE/NeOOopOxoJXF0nb+r2LJ/gcVR NCbpKO927ZaFzc2PC+LAZk0XhSs0TZ+kJ0RZPe52663Ltgdj51fD0QVWVFK/6iuzJc6e tImAstxU9NsZf+L/uMGzg7gV2Js6HWApga1T3rX+LmKD5M1wBAWmBWzS5zJ2xJ8bc7hi kAiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=GH+xkBoa1nw/hnUTaFpcChqZCziA6UlTvTUnyH6rI0Q=; b=QDuQ6yPsB6Fa2xozrfmibk4P7m13zgSmnqRuX7cYvPxIMPIoXzIV8mhODmx9gDa9r8 Slka3RPJeAO3/SB3WGx5HYI8PHddb6ko35EMWXCJLpPdxT31ZixP7nM1YNb9+3Ob+F5u ftjMfLIy1buVH4lWghXsc8DZ52wi0MyS27XQXFZOse2Bmdpx7s9R59IEepC6V9enXSTS ANqOzu9Fl/S9EReHxAqIVQAghTq20sCFJmlRWrlnnwMBhRcpbcKI1sdJQ9mjM7+cr5kf KZx612EWbRtin4gpWlu1BqUCdBLOgDvMf8LpfcUIpAc5/GaNJprsk18qbcUdX8OYO5Hc qTXQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e199-v6si248966pfh.289.2018.10.22.23.13.35; Mon, 22 Oct 2018 23:13:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727610AbeJWOfI (ORCPT + 99 others); Tue, 23 Oct 2018 10:35:08 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:24761 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726764AbeJWOfI (ORCPT ); Tue, 23 Oct 2018 10:35:08 -0400 X-IronPort-AV: E=Sophos;i="5.54,415,1534802400"; d="scan'208";a="283003085" Received: from 30.9-255-62.static.virginmediabusiness.co.uk (HELO [172.16.7.66]) ([62.255.9.30]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 08:13:10 +0200 Date: Tue, 23 Oct 2018 07:13:09 +0100 (BST) From: Julia Lawall X-X-Sender: jll@hadrien To: Michal Hocko cc: Arun Sudhilal , Arun KS , linux-kernel@vger.kernel.org, linux-mm , Minchan Kim , Michal Hocko , Greg Kroah-Hartman , Andrew Morton Subject: Re: [PATCH] mm: convert totalram_pages, totalhigh_pages and managed_pages to atomic. In-Reply-To: <20181023053359.GL18839@dhcp22.suse.cz> Message-ID: References: <1540229092-25207-1-git-send-email-arunks@codeaurora.org> <20181022181122.GK18839@dhcp22.suse.cz> <20181023053359.GL18839@dhcp22.suse.cz> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 Oct 2018, Michal Hocko wrote: > [Trimmed CC list + Julia - there is indeed no need to CC everybody maintain a > file you are updating for the change like this] > > On Tue 23-10-18 10:16:51, Arun Sudhilal wrote: > > On Mon, Oct 22, 2018 at 11:41 PM Michal Hocko wrote: > > > > > > On Mon 22-10-18 22:53:22, Arun KS wrote: > > > > Remove managed_page_count_lock spinlock and instead use atomic > > > > variables. > > > > > > > Hello Michal, > > > I assume this has been auto-generated. If yes, it would be better to > > > mention the script so that people can review it and regenerate for > > > comparision. Such a large change is hard to review manually. > > > > Changes were made partially with script. For totalram_pages and > > totalhigh_pages, > > > > find dir -type f -exec sed -i > > 's/totalram_pages/atomic_long_read(\&totalram_pages)/g' {} \; > > find dir -type f -exec sed -i > > 's/totalhigh_pages/atomic_long_read(\&totalhigh_pages)/g' {} \; > > > > For managed_pages it was mostly manual edits after using, > > find mm/ -type f -exec sed -i > > 's/zone->managed_pages/atomic_long_read(\&zone->managed_pages)/g' {} > > \; > > I guess we should be able to use coccinelle for this kind of change and > reduce the amount of manual intervention to absolute minimum. Coccinelle looks like it would be desirable, especially in case the word zone is not always used. Arun, please feel free to contact me if you want to try it and need help. julia