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=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 0C0F5C433E7 for ; Fri, 16 Oct 2020 03:09:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF6C520897 for ; Fri, 16 Oct 2020 03:09:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602817781; bh=TqIIrFjmgVR+6mtPAFdgaYQO/q+Rk75RQaO79pqgqr8=; h=Date:From:To:Subject:In-Reply-To:Reply-To:List-ID:From; b=mGnGTtrU3SSHMj7O3hyQpmO4wPwKYi9amRipAiBjuCH7coFewz3i0F8Ys4Nma+bzI 5+N6NcVJ/bbwl0affQs/Sn+B9mgBvZ6c2tgR4XOe2ebUNnVbygSDz7a9j+0gyE5Akq G+VfcqJdREdY5uNe8F/UvqcS3TCQUe0iT+qVQb14= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732536AbgJPDJl (ORCPT ); Thu, 15 Oct 2020 23:09:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:47094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726528AbgJPDJl (ORCPT ); Thu, 15 Oct 2020 23:09:41 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 95E1D20789; Fri, 16 Oct 2020 03:09:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602817780; bh=TqIIrFjmgVR+6mtPAFdgaYQO/q+Rk75RQaO79pqgqr8=; h=Date:From:To:Subject:In-Reply-To:From; b=x4w2J/mPCdW4oH0DshYDcddA++8cfHPqUraLhJ9AQthflJY+Id5bOf71xDeuW7rei wqXMU/03cMJVu1N/qQifpeXYaTdkVS6AfPP3C6rotEddU+VT7fM3TmxqTkKKAPU3bt cyQJEU7v64ONaYNxezcmGB8b+s/zKejEYzzhBr+E= Date: Thu, 15 Oct 2020 20:09:39 -0700 From: Andrew Morton To: akpm@linux-foundation.org, alexander.h.duyck@linux.intel.com, cheloha@linux.ibm.com, dave.hansen@intel.com, david@redhat.com, haiyangz@microsoft.com, kys@microsoft.com, mgorman@techsingularity.net, mhocko@kernel.org, mhocko@suse.com, mm-commits@vger.kernel.org, mpe@ellerman.id.au, osalvador@suse.de, pankaj.gupta.linux@gmail.com, richard.weiyang@linux.alibaba.com, rppt@kernel.org, sthemmin@microsoft.com, torvalds@linux-foundation.org, vbabka@suse.cz, wei.liu@kernel.org, willy@infradead.org Subject: [patch 083/156] mm/memory_hotplug: update comment regarding zone shuffling Message-ID: <20201016030939.VKC5WdW3_%akpm@linux-foundation.org> In-Reply-To: <20201015194043.84cda0c1d6ca2a6847f2384a@linux-foundation.org> User-Agent: s-nail v14.8.16 Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org From: David Hildenbrand Subject: mm/memory_hotplug: update comment regarding zone shuffling 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. Link: https://lkml.kernel.org/r/20201005121534.15649-6-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang Acked-by: Michal Hocko 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 Cc: Haiyang Zhang Cc: "K. Y. Srinivasan" Cc: Matthew Wilcox Cc: Michael Ellerman Cc: Scott Cheloha Cc: Stephen Hemminger Cc: Wei Liu Signed-off-by: Andrew Morton --- mm/memory_hotplug.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) --- a/mm/memory_hotplug.c~mm-memory_hotplug-update-comment-regarding-zone-shuffling +++ a/mm/memory_hotplug.c @@ -858,13 +858,10 @@ int __ref online_pages(unsigned long pfn 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); _