Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3045777ima; Mon, 22 Oct 2018 22:35:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV61RkbMX1l/y8urrTk4au7LOvi5AJvCmkEDtMJMvqfaVmrNeysvblyqLysxDF3eDLNxSEIRG X-Received: by 2002:a63:e841:: with SMTP id a1-v6mr23757870pgk.4.1540272900838; Mon, 22 Oct 2018 22:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540272900; cv=none; d=google.com; s=arc-20160816; b=YpTkw2tVfQqwthtNRymyaeT2j8oy3Agz3FXm/9HbAaxinIF4RdKGf8e+3zAzYe8PWA BGc2JJTrOrf3rWImKP4rhePKn0vR8ewNeBxzzGZX7B5MKoVFBdS9Y7pRggtEP42wNW9k i+jtOB01t5r0iu4B3lR94uK4ZJZm34FjX5Tq8plyEZgxghH8czAJ/mz3J9jNXNF2SbPI q7hRxMDSBlK7n5QvHYPbAdnvaRmaqL2WiM7YF+ziDBDSHTVww/L8/gXd3v95K9GxvwZu zkoKZLf30R3Uc99+vV0vLqzOJtRph9g0YAgvXgyzCJEufnvogebCQ3Z3edGEuZh/pBdM qSaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=KKhztvskcfXz1oGGyGiOdZVkco06SQ304olxqZTNj9w=; b=JKqmJHiKc81Brh+xbeV1Bkeq1tuz7AbSDS+9H0NbW7vSH0X3IYHaxGkrnpvdJX+7se fXDXRaQGdrJfGAmgHVC5/+SYM2XhI+Igzvz6xEuT984A3FKPN8icWUmA/zQA7madXwfd KYOUCGsh289xAFFxi8tpeyPQLDC0yARBoSWbsaYl2s+nrFy4YkgxvrywtoXJxuvh0Qnp N1zuinl2Q57ZzmdzmwQDkcvpjPA6Zl4/kRYgqmfO+8Ag8P0s0rdnga9NAoKQR44F2ex+ 2TVmLWnllr8+0iqdTCTS5bSA9dxjQzusbkNH5eq9Nl+d88XA9N0d8x0vRtPEDg1lDDVO OCgw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k185-v6si218387pgk.183.2018.10.22.22.34.45; Mon, 22 Oct 2018 22:35:00 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727208AbeJWNzt (ORCPT + 99 others); Tue, 23 Oct 2018 09:55:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:35536 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726764AbeJWNzt (ORCPT ); Tue, 23 Oct 2018 09:55:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 0846BAEAC; Tue, 23 Oct 2018 05:34:01 +0000 (UTC) Date: Tue, 23 Oct 2018 07:33:59 +0200 From: Michal Hocko To: Arun Sudhilal Cc: Arun KS , linux-kernel@vger.kernel.org, linux-mm , Minchan Kim , Michal Hocko , Arun Sudhilal , Greg Kroah-Hartman , Andrew Morton , Julia Lawall Subject: Re: [PATCH] mm: convert totalram_pages, totalhigh_pages and managed_pages to atomic. Message-ID: <20181023053359.GL18839@dhcp22.suse.cz> References: <1540229092-25207-1-git-send-email-arunks@codeaurora.org> <20181022181122.GK18839@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [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. -- Michal Hocko SUSE Labs