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=-11.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 3C4A7C41604 for ; Tue, 20 Oct 2020 17:21:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AEC5222244 for ; Tue, 20 Oct 2020 17:21:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEC5222244 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1DDBE6B005C; Tue, 20 Oct 2020 13:21:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1BA676B0062; Tue, 20 Oct 2020 13:21:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0F2B06B0071; Tue, 20 Oct 2020 13:21:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0239.hostedemail.com [216.40.44.239]) by kanga.kvack.org (Postfix) with ESMTP id D5D616B005C for ; Tue, 20 Oct 2020 13:21:54 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 757CA180AD806 for ; Tue, 20 Oct 2020 17:21:54 +0000 (UTC) X-FDA: 77392971348.20.pain83_2c1136927241 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 484D8180C07AF for ; Tue, 20 Oct 2020 17:21:54 +0000 (UTC) X-HE-Tag: pain83_2c1136927241 X-Filterd-Recvd-Size: 3823 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Tue, 20 Oct 2020 17:21:53 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C225CADFF; Tue, 20 Oct 2020 17:21:52 +0000 (UTC) Subject: Re: [PATCH v2 5/5] mm/memory_hotplug: update comment regarding zone shuffling To: David Hildenbrand , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-hyperv@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, Andrew Morton , Matthew Wilcox , Wei Yang , Michal Hocko , Alexander Duyck , Mel Gorman , Michal Hocko , Dave Hansen , Oscar Salvador , Mike Rapoport , Pankaj Gupta References: <20201005121534.15649-1-david@redhat.com> <20201005121534.15649-6-david@redhat.com> From: Vlastimil Babka Message-ID: <79f2eb3b-d3db-3187-ff7e-1b7bb8e769a3@suse.cz> Date: Tue, 20 Oct 2020 19:21:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: <20201005121534.15649-6-david@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 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 > Acked-by: Michal Hocko Acked-by: Vlastimil Babka > 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 > Cc: Pankaj Gupta > Signed-off-by: David Hildenbrand > --- > 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); > >