From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by kanga.kvack.org (Postfix) with ESMTP id 7D52C6B04D1 for ; Wed, 7 Nov 2018 03:57:53 -0500 (EST) Received: by mail-ed1-f69.google.com with SMTP id c2-v6so9146229edi.6 for ; Wed, 07 Nov 2018 00:57:53 -0800 (PST) Received: from mx1.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id cg5-v6si173159ejb.288.2018.11.07.00.57.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 00:57:52 -0800 (PST) Subject: Re: [PATCH v2 2/4] mm: Convert zone->managed_pages to atomic variable References: <1541521310-28739-1-git-send-email-arunks@codeaurora.org> <1541521310-28739-3-git-send-email-arunks@codeaurora.org> From: Vlastimil Babka Message-ID: <9379a2c2-d791-2f2a-9019-2ff091dac5db@suse.cz> Date: Wed, 7 Nov 2018 09:57:51 +0100 MIME-Version: 1.0 In-Reply-To: <1541521310-28739-3-git-send-email-arunks@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Arun KS , akpm@linux-foundation.org, keescook@chromium.org, khlebnikov@yandex-team.ru, minchan@kernel.org, mhocko@kernel.org, osalvador@suse.de, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: getarunks@gmail.com On 11/6/18 5:21 PM, Arun KS wrote: > totalram_pages, zone->managed_pages and totalhigh_pages updates > are protected by managed_page_count_lock, but readers never care > about it. Convert these variables to atomic to avoid readers > potentially seeing a store tear. > > This patch converts zone->managed_pages. Subsequent patches will > convert totalram_panges, totalhigh_pages and eventually > managed_page_count_lock will be removed. > > Suggested-by: Michal Hocko > Suggested-by: Vlastimil Babka > Signed-off-by: Arun KS > Reviewed-by: Konstantin Khlebnikov > Acked-by: Michal Hocko Acked-by: Vlastimil Babka