Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3252645pxk; Mon, 5 Oct 2020 05:20:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk6XogaOZhRTUqocud80qF4mDby4xcMxvvS1IKQVxl+7uU1TlGlZEf/iZpA6Yh3iqVv9+Z X-Received: by 2002:a17:906:7f82:: with SMTP id f2mr9379030ejr.264.1601900440012; Mon, 05 Oct 2020 05:20:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601900440; cv=none; d=google.com; s=arc-20160816; b=ETxDqnP3S6G8H29X/rWxnEm5yreftBUYz1eg+TJ+5fKWSM/eguJDX/DwCTAJ8EY8OM JscKAv2uUrgnpjfDuqqMt3xM0bwAaArNWfF7IKvoSWgvSB7sz88zi4W8C64uZD417CFH /p8pDOng/OtBKIgvWHKHPd7XFCxgzhzEwua+kFqy2Opb4e1CfeTlwBxw33nNiKFHHsSC WEnTDO2qX7MNJwJEnDgvtX3/2rN/3utfKWyizLbSgmuzNM1fXO0YIIENUxR36wY0lJgi i6+lmdXO4GXgSzi/AIXtMRxBUe9HkSk/YQLVmzrTrN8OtvOU0J/BSYAN3aXZ8QVhi2gK KYKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0AsZOi2g9AlkyekUiDSDSjeyhdmKjvuUsI97IJKTuTs=; b=dQAfy3WWmogVK0vZSOt7m8agsiplZtDsRl9A7Q5LLtTKYa2D2f/QUrAi9+0hXGZPht Jad+56CpG1sdAuALa6BQ2HlcKdUBXDstYtJIyMEXCpOk2U2G938xItf6PhIIQbGE+dBi U+oTL7lMqz/+FUoPuABlJKlqOkGs1n4iwmP7lrlVL+JL0IXKOUJC5omnD6ssvDdFvGUE OiZ87NKID6yEmj7EM6R0QJ7YlEPHKOiI9Br4fURN6/rZiyvGyCUvk4emwpf4qoDMP4tK PSn5XgWZjbs4QwCjnzeev/CX7T5WgxLkKb583rqiUSuSBsMam2GvbzKMqdSazgqzYwgR 0CwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ic+D7sC4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mv6si7175218ejb.481.2020.10.05.05.20.17; Mon, 05 Oct 2020 05:20:39 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ic+D7sC4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbgJEMQ7 (ORCPT + 99 others); Mon, 5 Oct 2020 08:16:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:48493 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbgJEMQv (ORCPT ); Mon, 5 Oct 2020 08:16:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601900209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0AsZOi2g9AlkyekUiDSDSjeyhdmKjvuUsI97IJKTuTs=; b=ic+D7sC4ZfZuNEKbtQv8oeu8IIy37KaR3P49BBhgbeAb1izamQ96ydf5IN7P+HF2h0Yi1U YpsIfSCyeKtKWPPL29HKNoM239QISArroBWsyMHU5JhCItKUPl3Hw3rNckzGdnZF7+01GW w5rM/BsDliBg6j4nriLC1X00qZt5xRQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-70-7gZGHkSGNu2LzffQTpddTg-1; Mon, 05 Oct 2020 08:16:45 -0400 X-MC-Unique: 7gZGHkSGNu2LzffQTpddTg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 887B4801AB1; Mon, 5 Oct 2020 12:16:43 +0000 (UTC) Received: from t480s.redhat.com (ovpn-114-222.ams2.redhat.com [10.36.114.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id A40231A8EC; Mon, 5 Oct 2020 12:16:36 +0000 (UTC) From: David Hildenbrand To: 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 , David Hildenbrand , Wei Yang , Michal Hocko , Alexander Duyck , Mel Gorman , Michal Hocko , Dave Hansen , Vlastimil Babka , Oscar Salvador , Mike Rapoport , Pankaj Gupta Subject: [PATCH v2 5/5] mm/memory_hotplug: update comment regarding zone shuffling Date: Mon, 5 Oct 2020 14:15:34 +0200 Message-Id: <20201005121534.15649-6-david@redhat.com> In-Reply-To: <20201005121534.15649-1-david@redhat.com> References: <20201005121534.15649-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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); -- 2.26.2