Message ID | 20200928182110.7050-6-david@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm: place pages to the freelist tail when onling and undoing isolation | expand |
On Mon, Sep 28, 2020 at 08:21:10PM +0200, David Hildenbrand wrote: >As we no longer shuffle via generic_online_page() and when undoing >isolation, we can simplify the comment. > >We now effectively shuffle only once (properly) when onlining new >memory. > >Cc: Andrew Morton <akpm@linux-foundation.org> >Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com> >Cc: Mel Gorman <mgorman@techsingularity.net> >Cc: Michal Hocko <mhocko@kernel.org> >Cc: Dave Hansen <dave.hansen@intel.com> >Cc: Vlastimil Babka <vbabka@suse.cz> >Cc: Wei Yang <richard.weiyang@linux.alibaba.com> >Cc: Oscar Salvador <osalvador@suse.de> >Cc: Mike Rapoport <rppt@kernel.org> >Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Wei Yang <richard.weiyang@linux.alibaba.com> >--- > mm/memory_hotplug.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > >diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c >index 9db80ee29caa..c589bd8801bb 100644 >--- a/mm/memory_hotplug.c >+++ b/mm/memory_hotplug.c >@@ -859,13 +859,10 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, > undo_isolate_page_range(pfn, pfn + nr_pages, MIGRATE_MOVABLE); > > /* >- * When exposing larger, physically contiguous memory areas to the >- * buddy, shuffling in the buddy (when freeing onlined pages, putting >- * them either to the head or the tail of the freelist) is only helpful >- * for maintaining the shuffle, but not for creating the initial >- * shuffle. Shuffle the whole zone to make sure the just onlined pages >- * are properly distributed across the whole freelist. Make sure to >- * shuffle once pageblocks are no longer isolated. >+ * Freshly onlined pages aren't shuffled (e.g., all pages are placed to >+ * the tail of the freelist when undoing isolation). Shuffle the whole >+ * zone to make sure the just onlined pages are properly distributed >+ * across the whole freelist - to create an initial shuffle. > */ > shuffle_zone(zone); > >-- >2.26.2
On Mon 28-09-20 20:21:10, David Hildenbrand wrote: > As we no longer shuffle via generic_online_page() and when undoing > isolation, we can simplify the comment. > > We now effectively shuffle only once (properly) when onlining new > memory. > > Cc: Andrew Morton <akpm@linux-foundation.org> > Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com> > Cc: Mel Gorman <mgorman@techsingularity.net> > Cc: Michal Hocko <mhocko@kernel.org> > Cc: Dave Hansen <dave.hansen@intel.com> > Cc: Vlastimil Babka <vbabka@suse.cz> > Cc: Wei Yang <richard.weiyang@linux.alibaba.com> > Cc: Oscar Salvador <osalvador@suse.de> > Cc: Mike Rapoport <rppt@kernel.org> > Signed-off-by: David Hildenbrand <david@redhat.com> Acked-by: Michal Hocko <mhocko@suse.com> > --- > mm/memory_hotplug.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index 9db80ee29caa..c589bd8801bb 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -859,13 +859,10 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, > undo_isolate_page_range(pfn, pfn + nr_pages, MIGRATE_MOVABLE); > > /* > - * When exposing larger, physically contiguous memory areas to the > - * buddy, shuffling in the buddy (when freeing onlined pages, putting > - * them either to the head or the tail of the freelist) is only helpful > - * for maintaining the shuffle, but not for creating the initial > - * shuffle. Shuffle the whole zone to make sure the just onlined pages > - * are properly distributed across the whole freelist. Make sure to > - * shuffle once pageblocks are no longer isolated. > + * Freshly onlined pages aren't shuffled (e.g., all pages are placed to > + * the tail of the freelist when undoing isolation). Shuffle the whole > + * zone to make sure the just onlined pages are properly distributed > + * across the whole freelist - to create an initial shuffle. > */ > shuffle_zone(zone); > > -- > 2.26.2
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 9db80ee29caa..c589bd8801bb 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -859,13 +859,10 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, undo_isolate_page_range(pfn, pfn + nr_pages, MIGRATE_MOVABLE); /* - * When exposing larger, physically contiguous memory areas to the - * buddy, shuffling in the buddy (when freeing onlined pages, putting - * them either to the head or the tail of the freelist) is only helpful - * for maintaining the shuffle, but not for creating the initial - * shuffle. Shuffle the whole zone to make sure the just onlined pages - * are properly distributed across the whole freelist. Make sure to - * shuffle once pageblocks are no longer isolated. + * Freshly onlined pages aren't shuffled (e.g., all pages are placed to + * the tail of the freelist when undoing isolation). Shuffle the whole + * zone to make sure the just onlined pages are properly distributed + * across the whole freelist - to create an initial shuffle. */ shuffle_zone(zone);
As we no longer shuffle via generic_online_page() and when undoing isolation, we can simplify the comment. We now effectively shuffle only once (properly) when onlining new memory. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Michal Hocko <mhocko@kernel.org> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Wei Yang <richard.weiyang@linux.alibaba.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Mike Rapoport <rppt@kernel.org> Signed-off-by: David Hildenbrand <david@redhat.com> --- mm/memory_hotplug.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)