Messages in this thread | | | Date | Wed, 14 Nov 2018 19:21:54 +0000 | From | Pavel Tatashin <> | Subject | Re: [PATCH v5 2/4] mm: convert zone->managed_pages to atomic variable |
| |
On 18-11-13 12:03:08, 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. > > Main motivation was that managed_page_count_lock handling was > complicating things. It was discussed in length here, > https://lore.kernel.org/patchwork/patch/995739/#1181785 > So it seemes better to remove the lock and convert variables > to atomic, with preventing poteintial store-to-read tearing as > a bonus. > > Suggested-by: Michal Hocko <mhocko@suse.com> > Suggested-by: Vlastimil Babka <vbabka@suse.cz> > Signed-off-by: Arun KS <arunks@codeaurora.org> > Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> > Acked-by: Michal Hocko <mhocko@suse.com> > Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Pavel Tatashin <pasha.tatashin@soleen.com>
| |