[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181107102837.GC27423@dhcp22.suse.cz>
Date: Wed, 7 Nov 2018 11:28:37 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
Arun KS <arunks@...eaurora.org>, keescook@...omium.org,
minchan@...nel.org, getarunks@...il.com,
gregkh@...uxfoundation.org, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
julia.lawall@...6.fr
Subject: Re: [PATCH v1 0/4]mm: convert totalram_pages, totalhigh_pages and
managed pages to atomic
On Wed 07-11-18 09:50:10, Vlastimil Babka wrote:
> On 11/7/18 8:02 AM, Konstantin Khlebnikov wrote:
[...]
> > Could you point what exactly are you fixing with this set?
> >
> > from v2:
> >
> > > 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?
> >
> >
> > Aligned unsigned long almost always stored at once.
>
> The point is "almost always", so better not rely on it :) But the main
> motivation was that managed_page_count_lock handling was complicating
> Arun's "memory_hotplug: Free pages as higher order" patch and it seemed
> a better idea to just remove and convert this to atomics, with
> preventing potential store-to-read tearing as a bonus.
And more importantly the lock itself seems bogus as mentioned here
http://lkml.kernel.org/r/20181106141732.GR27423@dhcp22.suse.cz
> It would be nice to mention it in the changelogs though.
agreed
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists