[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/5] mm/memory_hotplug: update comment regarding zone shuffling
 
- To: David Hildenbrand <david@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
 
- From: Vlastimil Babka <vbabka@xxxxxxx>
 
- Date: Tue, 20 Oct 2020 19:21:52 +0200
 
- Cc: linux-mm@xxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>, Wei Yang <richard.weiyang@xxxxxxxxxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Alexander Duyck <alexander.h.duyck@xxxxxxxxxxxxxxx>, Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>, Pankaj Gupta <pankaj.gupta.linux@xxxxxxxxx>
 
- Delivery-date: Tue, 20 Oct 2020 17:21:55 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
On 10/5/20 2:15 PM, 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.
Reviewed-by: Wei Yang <richard.weiyang@xxxxxxxxxxxxxxxxx>
Acked-by: Michal Hocko <mhocko@xxxxxxxx>
 
 
Acked-by: Vlastimil Babka <vbabka@xxxxxxx>
 
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Alexander Duyck <alexander.h.duyck@xxxxxxxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Wei Yang <richard.weiyang@xxxxxxxxxxxxxxxxx>
Cc: Oscar Salvador <osalvador@xxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxx>
Cc: Pankaj Gupta <pankaj.gupta.linux@xxxxxxxxx>
Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
---
  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 03a00cb68bf7..b44d4c7ba73b 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -858,13 +858,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);
  
 
 
 
    
     |