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 4DDFAC4346E for ; Tue, 29 Sep 2020 09:40:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BE76B208FE for ; Tue, 29 Sep 2020 09:40:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE76B208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D077D6B005C; Tue, 29 Sep 2020 05:40:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CB7C36B0062; Tue, 29 Sep 2020 05:40:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA5F46B006C; Tue, 29 Sep 2020 05:40:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id A2A396B005C for ; Tue, 29 Sep 2020 05:40:29 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5AFF9181355DF for ; Tue, 29 Sep 2020 09:40:29 +0000 (UTC) X-FDA: 77315603778.23.sock56_270a97027189 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 3A82138DF1 for ; Tue, 29 Sep 2020 09:40:29 +0000 (UTC) X-HE-Tag: sock56_270a97027189 X-Filterd-Recvd-Size: 3800 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Tue, 29 Sep 2020 09:40:27 +0000 (UTC) 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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