Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1687212
| From | Mel Gorman <mgorman@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 7/9] mm, page_alloc: remove stop_machine from build_all_zonelists |
| Date | 2017-07-14 12:00 +0200 |
| Message-ID | <u35ya-1D9-3@gated-at.bofh.it> (permalink) |
| References | <u33PH-El-3@gated-at.bofh.it> <u33PI-El-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Jul 14, 2017 at 10:00:04AM +0200, Michal Hocko wrote:
> From: Michal Hocko <mhocko@suse.com>
>
> build_all_zonelists has been (ab)using stop_machine to make sure that
> zonelists do not change while somebody is looking at them. This is
> is just a gross hack because a) it complicates the context from which
> we can call build_all_zonelists (see 3f906ba23689 ("mm/memory-hotplug:
> switch locking to a percpu rwsem")) and b) is is not really necessary
> especially after "mm, page_alloc: simplify zonelist initialization".
>
> Updates of the zonelists happen very seldom, basically only when a zone
> becomes populated during memory online or when it loses all the memory
> during offline. A racing iteration over zonelists could either miss a
> zone or try to work on one zone twice. Both of these are something we
> can live with occasionally because there will always be at least one
> zone visible so we are not likely to fail allocation too easily for
> example.
>
> Signed-off-by: Michal Hocko <mhocko@suse.com>
This patch is contingent on the last patch which updates in place
instead of zeroing the early part of the zonelist first but needs to fix
the stack usage issues. I think it's also worth pointing out in the
changelog that stop_machine never gave the guarantees it claimed as a
process iterating through the zonelist can be stopped so when it resumes
the zonelist has changed underneath it. Doing it online is roughly
equivalent in terms of safety.
--
Mel Gorman
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/9] cleanup zonelists initialization Michal Hocko <mhocko@kernel.org> - 2017-07-14 10:10 +0200
[PATCH 7/9] mm, page_alloc: remove stop_machine from build_all_zonelists Michal Hocko <mhocko@kernel.org> - 2017-07-14 10:10 +0200
Re: [PATCH 7/9] mm, page_alloc: remove stop_machine from build_all_zonelists Mel Gorman <mgorman@suse.de> - 2017-07-14 12:00 +0200
Re: [PATCH 7/9] mm, page_alloc: remove stop_machine from build_all_zonelists Michal Hocko <mhocko@kernel.org> - 2017-07-14 13:10 +0200
Re: [PATCH 7/9] mm, page_alloc: remove stop_machine from build_all_zonelists Mel Gorman <mgorman@suse.de> - 2017-07-14 14:50 +0200
Re: [PATCH 7/9] mm, page_alloc: remove stop_machine from build_all_zonelists Vlastimil Babka <vbabka@suse.cz> - 2017-07-14 13:30 +0200
Re: [PATCH 7/9] mm, page_alloc: remove stop_machine from build_all_zonelists Michal Hocko <mhocko@kernel.org> - 2017-07-14 13:50 +0200
Re: [PATCH 7/9] mm, page_alloc: remove stop_machine from build_all_zonelists Michal Hocko <mhocko@kernel.org> - 2017-07-14 13:50 +0200
[PATCH 2/9] mm, page_alloc: remove boot pageset initialization from memory hotplug Michal Hocko <mhocko@kernel.org> - 2017-07-14 10:10 +0200
Re: [PATCH 2/9] mm, page_alloc: remove boot pageset initialization from memory hotplug Mel Gorman <mgorman@suse.de> - 2017-07-14 11:50 +0200
[PATCH 5/9] mm, memory_hotplug: remove explicit build_all_zonelists from try_online_node Michal Hocko <mhocko@kernel.org> - 2017-07-14 10:10 +0200
Re: [PATCH 5/9] mm, memory_hotplug: remove explicit build_all_zonelists from try_online_node Michal Hocko <mhocko@kernel.org> - 2017-07-14 14:20 +0200
[PATCH 4/9] mm, memory_hotplug: drop zone from build_all_zonelists Michal Hocko <mhocko@kernel.org> - 2017-07-14 10:10 +0200
csiph-web