Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp665335ybt; Wed, 1 Jul 2020 07:19:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIndeRC4n6wVc8GY5Ww5VQdogdLQ33POyqkbZdPS7murnOe9fPuToxQ2eCnT0hMgtCmTFV X-Received: by 2002:a05:6402:1778:: with SMTP id da24mr17055819edb.126.1593613164004; Wed, 01 Jul 2020 07:19:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593613163; cv=none; d=google.com; s=arc-20160816; b=hvOiTChny+A3T+f66Tn0t9ppbupgKRT9n+3RvxV8jOyrnW8XQa5eAJf0f0WKXWPK6Q WizIbyP5aqLyAs5j+z8PA32fftzwJEttZxg1gnoK9VAQ3fcN8u2uDV18eoyYrE2cXk5I o5xGu+6RPnTX5FelwxC8i7IFaJwO0jc+Ji5uP0AwsV7WkR7lI1batrZVQ0Rc1DHXSJI8 70EyIeSa/ET8qdJZVGy57bNJJjpWVfzJH05N5SuUEb6MokU1UNP0wKVxWvcmU85yl2Zg eY/vvb4IBFN+T7q0ikU9epZwyFcC2PtIgvQaie2ZtC5xCgFwfosnl/x/X3RZT4iDSWg5 9C7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WXANX7e/4PKUrgXNjDH8epRg0aU4bUifT+MRphx7SbI=; b=O1iyv29x/vfkat9YbQMrl7Ua4sAE3C/gSSacmf2JB184/B9Apm4HcNJPk0awijhqfx eaISBb49sddJKpdiWqHnhCPzzu6g90Q+5tGd220Iv4dNQm1HXXBbKm5xduZ4QuEiH3xq Q40sMVBr1Fp6r3UMwJD6njRsab1FTMiPGPO0/m7EpFr/Wsry7RQkSRAtj+IlMLVw0MEZ paII4pKu6KuihcfKEL7GhiCOTfSwgYwnvFDrBY1QBawb88XXssWi5i+5j/37gmNHzCE3 tJq9SqbInPQ2BW2ZgdsEeZ0kRvlExQzhCSo5rv2E23RdznGF8Vu7mVodAoWB9b3kFQhy +CnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NN1VtqhH; 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 rs1si3463416ejb.64.2020.07.01.07.19.00; Wed, 01 Jul 2020 07:19:23 -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=NN1VtqhH; 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 S1731517AbgGAOSq (ORCPT + 99 others); Wed, 1 Jul 2020 10:18:46 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:42204 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731501AbgGAOSn (ORCPT ); Wed, 1 Jul 2020 10:18:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593613121; 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=WXANX7e/4PKUrgXNjDH8epRg0aU4bUifT+MRphx7SbI=; b=NN1VtqhH+DRrERqGv7j39we1nD0Lhax9C9uYMyp38yTDrR6Urr1AGKOzdKmbbwOIydCCVr mQ8KEny8lH3/vpiapg4PKxHSBMpt8TbT8WzDOpbapqq3EdTb7zdQnIFKmLSmw5dv+yM9as BzX0Qb1OaNjWdlsfp2W/8M2S9G52QMs= 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-402-8ISAIio-PKymnyTfUtGACQ-1; Wed, 01 Jul 2020 10:18:37 -0400 X-MC-Unique: 8ISAIio-PKymnyTfUtGACQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 013D3805EEE; Wed, 1 Jul 2020 14:18:36 +0000 (UTC) Received: from t480s.redhat.com (ovpn-112-52.ams2.redhat.com [10.36.112.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1DDC65C1C5; Wed, 1 Jul 2020 14:18:30 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-s390@vger.kernel.org, linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Christian Borntraeger , Heiko Carstens , Michael Holzheu , Mike Rapoport , Philipp Rudo , Vasily Gorbik Subject: [PATCH v2 0/2] s390/mm: don't set ARCH_KEEP_MEMBLOCK Date: Wed, 1 Jul 2020 16:18:28 +0200 Message-Id: <20200701141830.18749-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series is based on the latest s390/features branch, which contains "s390/zcore: remove memmap device". [1] Looking into why we still create memblocks for stdnaby/hotplugged memory (via add_memory()), I discovered that we might not need ARCH_KEEP_MEMBLOCK on s390x after all. This is relevant in the context of virtio-mem, where we hotplug a lot of small memory blocks (and want to avoid managing unused metadata). But also for existing setups, it might help to free up some memory after boot. Compile-tested on s390x, pseries, arm64, i386, mips64, powernv, sh, and x86_64. [1] https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?h=features v1 -> v2: - "mm/memblock: expose only miminal interface to add/walk physmem" -- Use inline function for __next_physmem_range -- Rewrite some comments RFC -> v1: - "s390/zcore: traverse resources instead of memblocks" has been replaced on s390/features by "s390/zcore: remove memmap devic" - Add "mm/memblock: expose only miminal interface to add/walk physmem" -- Sort out section mismatch errors when using physmem after boot without ARCH_KEEP_MEMBLOCK - "s390/mm: don't set ARCH_KEEP_MEMBLOCK" -- Rephrase description David Hildenbrand (2): mm/memblock: expose only miminal interface to add/walk physmem s390/mm: don't set ARCH_KEEP_MEMBLOCK arch/s390/Kconfig | 1 - arch/s390/kernel/crash_dump.c | 6 ++-- include/linux/memblock.h | 28 ++++++++++++++--- mm/memblock.c | 57 ++++++++++++++++++----------------- 4 files changed, 55 insertions(+), 37 deletions(-) -- 2.26.2