Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4951782pxu; Wed, 21 Oct 2020 09:14:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxww3QakxwNTBAwR8O8j+lO1sLCH7pPstytxU8Na+niy9LsPWoAS+G6Tf08qEAhEXVwhpKZ X-Received: by 2002:a17:907:435b:: with SMTP id oc19mr4027584ejb.311.1603296858694; Wed, 21 Oct 2020 09:14:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603296858; cv=none; d=google.com; s=arc-20160816; b=r0jvWI2hk2fFchbLvXLsmfvxkxzU8cb+FA/CEHZ+wr0nmxK+4X/NaLQihIwH26fGBN 8swwxOXyLjugw2AZhNQtVEsywF1XltcxLu6J58zUH7HWQYxR5oA0xa9Z+uS97XP3lffC cINOj99th8KZPDvgVO2V/zYl8cucV7LvIrutaDf8ymcssTwJx1mMSPzoABneYVt83AM0 JqN+1yxvOU7eZjUOOu/cNqGt3XaglRvnoXo0jOvVCTEtsmAXUn2BLQyKuCEe6+2FC+7K hnMeXUCsmwsqIfF+7pqWxi/iojedb30i8vxsMWbfnaT/0KBTvh9QqTL0LxNEj1fTX/kH dMjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=ldvXYa7EDWjUA4rU92KPx8nRZ1DbNLb5w3Ukg442L40=; b=Zy6L6K256pzYV0Yi587+4A1NuuR4n1SqjPbn6dxdnbdVQ/R9Y5BCYQ0YrlGsz4k1UN GSHr2b20jrK61SzRTqDUAZY5OxMoHDUEh9nCGAd+bsHXDy6+s8E2cju35QgHxckVHkbf 3E6rab+bqsmD9INEMRIaHy8mA5OqrHnAL9YENcmsKIcsIRs/nHRARAmcbVsAXeWFYOQg Kie58jiEldEV3LMTFrvYWi2v08buTUC7uk/DMXIhlGq/9JP5OgRTOZGrq0aoXRohO598 2CikxBIHstwZ/GScRjEy1A86jIDgH2/AFTrVh7NRz6u+JWbrph1hU8/tI/pawLsxKML4 BmPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r26si2216936ejb.114.2020.10.21.09.13.56; Wed, 21 Oct 2020 09:14:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395359AbgJTRVy (ORCPT + 99 others); Tue, 20 Oct 2020 13:21:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:54646 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390846AbgJTRVy (ORCPT ); Tue, 20 Oct 2020 13:21:54 -0400 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 > 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); > >