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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 2D419C388F9 for ; Wed, 21 Oct 2020 10:59:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B67222173E for ; Wed, 21 Oct 2020 10:59:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ENzNLNVw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441840AbgJUK66 (ORCPT ); Wed, 21 Oct 2020 06:58:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439214AbgJUK65 (ORCPT ); Wed, 21 Oct 2020 06:58:57 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61359C0613CE; Wed, 21 Oct 2020 03:58:57 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id z5so2690223iob.1; Wed, 21 Oct 2020 03:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GICSwgN3sNFkPLzb9ZiuRIa+ZIKU5hbtJb9zZM8PdNs=; b=ENzNLNVw380JSauwEXTsNIwfSS+Pfic6wIwk3mcDkx2ZI8vSJTG9T4To95nV5K++3S wXrPtza7/nKOZyWO6GUYg/19vJCSiI3irHrOtUq4HfvmyEmN9+Er/0f8hl5JC3NY9rCU 4VXyirx16ZxcwPrFkWNc5+fdgPzJzwoqh23QZ4siuTOAmG7kAyniMqDNFkdjAyBLV9KU 6xUTE1fU2WS7Y2iHpg238szVhAOmVhcjtjhCua1z7pgont9fb1+CXR9apRekKvjEBXQ4 Mjsvsuixy9gpE8FbEhU64igpCUNBdcJC/8ogPwXvQvXYuRk8lqRCeWNgGrCpzH1AQQOC Q+4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GICSwgN3sNFkPLzb9ZiuRIa+ZIKU5hbtJb9zZM8PdNs=; b=rLdhoZC9O9WwK5sULKry9MxuKsBFwmj9Xvpx5eNnh0TUL52qhTWqIAmV5ktSsh8oX9 rTKg3aPda7RA41CbrrCPx38QuMVwRbNW1kWfTLycxfiPYLUpvr0JGq6KvpjJ3NynJiCF D3tJuv5Q6fPtnZFAiss5pl7srYiW0q+jT3vrgsULvlGPPM5cZhdEJnlcaDGEl8JfA4GI Q+IRS4qYqBc0fD2GVbIBxiCc6zuvRMMO0jObum7sjiHhi5edOoakqP4dg4/8JMBEmUv7 HnOixyI07cygGk2UPqYJDIpyzKa6bcfik13MSV+Fz1LedAsSAnGweJDLelGg4lTFy+lQ hMWA== X-Gm-Message-State: AOAM533wbJ1uunInniEBCFniJfy+siDzOqLuS5EhnA3ojkMeUpBYVfTk tM7HSmuxTz94tGpIZ9xwZboyOI73d8nBr0ZQvvY= X-Google-Smtp-Source: ABdhPJxVGoa8oGWf7NMjH5r135bL5msWqxriS77JIexiAMhTvnG4ddTh5FYX+VcY2vpk3tlFdrFb/MgirSrWDhsBaEo= X-Received: by 2002:a5d:87c7:: with SMTP id q7mr2174472ios.162.1603277936222; Wed, 21 Oct 2020 03:58:56 -0700 (PDT) MIME-Version: 1.0 References: <20201005121534.15649-1-david@redhat.com> <20201005121534.15649-6-david@redhat.com> In-Reply-To: <20201005121534.15649-6-david@redhat.com> From: Pankaj Gupta Date: Wed, 21 Oct 2020 12:58:45 +0200 Message-ID: Subject: Re: [PATCH v2 5/5] mm/memory_hotplug: update comment regarding zone shuffling To: David Hildenbrand Cc: LKML , Linux MM , 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 , Vlastimil Babka , Oscar Salvador , Mike Rapoport Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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); > Acked-by: Pankaj Gupta