From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4643C4346E for ; Tue, 29 Sep 2020 09:40:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 730CE20757 for ; Tue, 29 Sep 2020 09:40:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727700AbgI2Jk0 (ORCPT ); Tue, 29 Sep 2020 05:40:26 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:50140 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727698AbgI2Jk0 (ORCPT ); Tue, 29 Sep 2020 05:40:26 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=15;SR=0;TI=SMTPD_---0UATyNsI_1601372421; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0UATyNsI_1601372421) by smtp.aliyun-inc.com(127.0.0.1); Tue, 29 Sep 2020 17:40:21 +0800 Date: Tue, 29 Sep 2020 17:40:21 +0800 From: Wei Yang To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-hyperv@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, Andrew Morton , Alexander Duyck , Mel Gorman , Michal Hocko , Dave Hansen , Vlastimil Babka , Wei Yang , Oscar Salvador , Mike Rapoport Subject: Re: [PATCH v1 5/5] mm/memory_hotplug: update comment regarding zone shuffling Message-ID: <20200929094021.GD36904@L-31X9LVDL-1304.local> Reply-To: Wei Yang References: <20200928182110.7050-1-david@redhat.com> <20200928182110.7050-6-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200928182110.7050-6-david@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org 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 >Cc: Alexander Duyck >Cc: Mel Gorman >Cc: Michal Hocko >Cc: Dave Hansen >Cc: Vlastimil Babka >Cc: Wei Yang >Cc: Oscar Salvador >Cc: Mike Rapoport >Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang >--- > 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 -- Wei Yang Help you, Help me