Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3128752ima; Tue, 23 Oct 2018 00:24:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV63V3zQVvTD6VPNgo+qN3DJ7tO2mMOknSKlAwHqZ90Z7UYcYRr+KbVDDFZvuLhJTGJ5yUW1m X-Received: by 2002:a17:902:8646:: with SMTP id y6-v6mr47405747plt.86.1540279468908; Tue, 23 Oct 2018 00:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540279468; cv=none; d=google.com; s=arc-20160816; b=M7r/isxOJ8Z4aNijEOjIlsp+dOiB1YtyRDqkg1aXU9ZhIc+JBWQyQrSQLGcAXHpFIj PUvcnaRl+akviBs2sjXLa/rN49360osVAYNvZiczMWeseo/lJYnf67cUteY72k7pLph9 T5AUrZdChCWtGkwZrK/l+H27XDrb8yd4UQuAIwrzOAQIU3o6o2ja/r/wziXIFPk/4MsZ vPWyAC6UMndDFFgYZEhLr1yN6IDzbcu7RkGZY1TTmN6rdAOPM3kbKUMobo0lrEqTIDTk VKk79SRJ5CM3gQUozC3CHR4WspldZePwvT1v8DpHz0KMBZEauQLNyJ9VSed8DFSqgBaA QSBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=tAUoW4GPMceex9vKPnxYK5d2K6OG73bxqiDXkLVgDpI=; b=Ev3AI5ukz4qbeJ2V6yAJYMCo369TDjzgCylsxNnF1sZpkfjceM73xnX5A4tT86u2SP NmgipGXFOnPWy3gtPk4GeVLgJq1qdKu50+W3qQzCGI/qic6MfzLNDH6S6bSddolNt6v8 6P1Di0iRdhReZGFT4FOtZUxm0u7//Qz5a59owbcs7d6axTo70MYSdCHMjiIy6RYMPtgF z5l09WLj8uEK/jg8TqpmpbSnUIysWLFtO+88hLnDF0rVFp2b9F0j6VI7V8JxA/VjLkbF it9fjBQmEyZGqda/1hLL89ddMzNSZ0S3RrkBJcUxO/RvZMvvKnl0GRW48OkPmoCr5IE+ TctQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="c2UMzSG/"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b35-v6si475598plh.177.2018.10.23.00.24.13; Tue, 23 Oct 2018 00:24:28 -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=@gmail.com header.s=20161025 header.b="c2UMzSG/"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727503AbeJWPdj (ORCPT + 99 others); Tue, 23 Oct 2018 11:33:39 -0400 Received: from mail-yb1-f194.google.com ([209.85.219.194]:46948 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726885AbeJWPdj (ORCPT ); Tue, 23 Oct 2018 11:33:39 -0400 Received: by mail-yb1-f194.google.com with SMTP id o8-v6so123613ybk.13 for ; Tue, 23 Oct 2018 00:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tAUoW4GPMceex9vKPnxYK5d2K6OG73bxqiDXkLVgDpI=; b=c2UMzSG/4b6FgoZJ5pABqK/m8ll3XNqCNGSupB0N1Z90jdOJwlXjzcxb4AhLywVVhL eGrfdnMD9FnnN3vr3CioHZnUsQ7rCmUA1IBvOHUHhMbwPWu22zj/VQ7hLpnl8SJ/nHKT y/EE4YzZEALyQjNfj4FlfmnOxCDQNrWAmdr0z5rkTkfC68RmWBORYE8jFI9aTur/ZsDd p6cI7iG9H24awBgLxSFpdyb9KvrJnlAU1jx9D1CGXoiYzYQPpQJj3RtLQuRiN7H5VVsC RFzJfDVswKZs7VQ9E9qsi444vhuC4wucOZttBI1u8/m/FDc1epV2cmi0Sh//MoAF8rJ5 98uA== 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; bh=tAUoW4GPMceex9vKPnxYK5d2K6OG73bxqiDXkLVgDpI=; b=fJF0Toi/ocnITHe0dR4j9abHiFfT11AlLc04HqVZOfuU1CZqnFVVg8ZZzQZ40rE8bt GPthJHZINdOWT9TH21isdUDMdPMcEyhNejFDSXevR9VNWEDzSfpTOol7S1SHcMzaGpI0 7Cf8bK8jhfx/kv1EjwVr43aWwJuIwd6Yd7vhLpdYgNAvaD6/oZWp5ue63zXLbf6pu9Zi FBhYYzid6knUdu+mfijgVoMB59xr0/F0gv9iKF8mYi/TRvGheQ7WRIvBzjCZug7CiJHq y/q53rQ6gZ/WaYvrMvNunmklufinoUQj9h0GDybPRhQ0Le/UJHhnIjrYCGsY9Wht0yJa Ka/g== X-Gm-Message-State: ABuFfohpBjvxVCLW/y7zW+7sxMOjlbAN17vAQiqIcIL8uRC9hyj4z7sy MP99IlcZrujQSczMB3K7suDVeBGlxHOqaclFUFE= X-Received: by 2002:a25:3c7:: with SMTP id 190-v6mr34754584ybd.457.1540278691334; Tue, 23 Oct 2018 00:11:31 -0700 (PDT) MIME-Version: 1.0 References: <1540229092-25207-1-git-send-email-arunks@codeaurora.org> <20181022181122.GK18839@dhcp22.suse.cz> <20181023053359.GL18839@dhcp22.suse.cz> In-Reply-To: From: Arun Sudhilal Date: Tue, 23 Oct 2018 12:41:19 +0530 Message-ID: Subject: Re: [PATCH] mm: convert totalram_pages, totalhigh_pages and managed_pages to atomic. To: julia.lawall@lip6.fr Cc: mhocko@kernel.org, arunks@codeaurora.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, minchan@kernel.org, mhocko@suse.com, gregkh@linuxfoundation.org, Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 23, 2018 at 12:11 PM Julia Lawall wrote: > > > > 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. Thanks Julia. I m starting with, http://coccinelle.lip6.fr/papers/backport_edcc15.pdf Regards, Arun > > julia