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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 97EB5C433DF for ; Wed, 19 Aug 2020 18:00:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4BEEF20786 for ; Wed, 19 Aug 2020 18:00:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZKwVT2hv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BEEF20786 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9FBA88D0049; Wed, 19 Aug 2020 14:00:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9AB1B8D0002; Wed, 19 Aug 2020 14:00:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 89A6D8D0049; Wed, 19 Aug 2020 14:00:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0207.hostedemail.com [216.40.44.207]) by kanga.kvack.org (Postfix) with ESMTP id 71A3D8D0002 for ; Wed, 19 Aug 2020 14:00:15 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A59A6180ACEE9 for ; Wed, 19 Aug 2020 18:00:14 +0000 (UTC) X-FDA: 77168082348.28.fang89_4917c882702a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id ECBD76D78 for ; Wed, 19 Aug 2020 18:00:11 +0000 (UTC) X-HE-Tag: fang89_4917c882702a X-Filterd-Recvd-Size: 4902 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Aug 2020 18:00:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597860010; 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; bh=Fq+L0FZ4E9O8B1gKyErYfXmAA9+wPlbWuNN02iDq7Jw=; b=ZKwVT2hvVu3j1adzEfQsngq2u9j8ifLHYcqWOoo/7PUDq9dSltgzhirZSkNxALhl5DtkO5 iKntyT5blsujVjzcxlnVx01gznsu02QjTd7w/EY0aWap1ywzFn/3uThGAbr2KaWFjL/f3D eJv3X6Phr1oGL8jYWsxslpEu4ICTUcQ= 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-105-EOCKc3dONAGr4GU_Uvxa4A-1; Wed, 19 Aug 2020 14:00:06 -0400 X-MC-Unique: EOCKc3dONAGr4GU_Uvxa4A-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 608308030AF; Wed, 19 Aug 2020 18:00:04 +0000 (UTC) Received: from t480s.redhat.com (ovpn-114-11.ams2.redhat.com [10.36.114.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id E22F310027A6; Wed, 19 Aug 2020 17:59:57 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Baoquan He , Charan Teja Reddy , Dan Williams , Fenghua Yu , Logan Gunthorpe , "Matthew Wilcox (Oracle)" , Mel Gorman , Michal Hocko , Michel Lespinasse , Mike Rapoport , Oscar Salvador , Pankaj Gupta , Tony Luck , Wei Yang Subject: [PATCH v2 00/10] mm/memory_hotplug: online_pages()/offline_pages() cleanups Date: Wed, 19 Aug 2020 19:59:47 +0200 Message-Id: <20200819175957.28465-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Rspamd-Queue-Id: ECBD76D78 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 Content-Transfer-Encoding: quoted-printable 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: These are a bunch of cleanups for online_pages()/offline_pages() and related code, mostly getting rid of memory hole handling that is no longe= r necessary. There is only a single walk_system_ram_range() call left in offline_pages(), to make sure we don't have any memory holes. I had some of these patches lying around for a longer time but didn't have time to polish them. In addition, the last patch marks all pageblocks of memory to get onlined MIGRATE_ISOLATE, so pages that have just been exposed to the buddy cannot get allocated before onlining is complete. Once heavy lifting is done, the pageblocks are set to MIGRATE_MOVABLE, such that allocations are possible. I played with DIMMs and virtio-mem on x86-64 and didn't spot any surprise= s. I verified that the numer of isolated pageblocks is correctly handled whe= n onlining/offlining. v1 -> v2: - "mm/memory_hotplug: enforce section granularity when onlining/offlining= " -- Extended the patch description regarding alignment requirements -- Fixed a typo - Squashed "mm/memory_hotplug: simplify offlining of pages in offline_pages()" and "mm/memory_hotplug: simplify checking if all pages= are isolated in offline_pages()", resulting in "mm/memory_hotplug: simplify= page offlining" - Added ACKs David Hildenbrand (10): mm/memory_hotplug: inline __offline_pages() into offline_pages() mm/memory_hotplug: enforce section granularity when onlining/offlining mm/memory_hotplug: simplify page offlining mm/page_alloc: simplify __offline_isolated_pages() mm/memory_hotplug: drop nr_isolate_pageblock in offline_pages() mm/page_isolation: simplify return value of start_isolate_page_range() mm/memory_hotplug: simplify page onlining mm/page_alloc: drop stale pageblock comment in memmap_init_zone*() mm: pass migratetype into memmap_init_zone() and move_pfn_range_to_zone() mm/memory_hotplug: mark pageblocks MIGRATE_ISOLATE while onlining memory arch/ia64/mm/init.c | 4 +- include/linux/memory_hotplug.h | 7 +- include/linux/mm.h | 3 +- mm/Kconfig | 2 +- mm/memory_hotplug.c | 156 ++++++++++++++------------------- mm/memremap.c | 3 +- mm/page_alloc.c | 64 ++++---------- mm/page_isolation.c | 7 +- 8 files changed, 98 insertions(+), 148 deletions(-) --=20 2.26.2