Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp952100ybe; Wed, 11 Sep 2019 07:14:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHpKnsldCRWFNTL4BKXR0MguxJB64fNIMBvOUVuAgmWJsbwTollkFjh8rL/Px33hKb+Pgp X-Received: by 2002:a17:906:3443:: with SMTP id d3mr7745892ejb.221.1568211251065; Wed, 11 Sep 2019 07:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568211251; cv=none; d=google.com; s=arc-20160816; b=ZwUm0Ih1ANqqt0EBan1x4PReTiJLVDLitIz+nGOsbzRoJsGzHYtt+WdlN5UB5aF9mm QJmmJZTFoXKlEbOBQZJEAiAtHvBWaF8/Mu3Q90WmvcsDsjUKPDb7WYPvMteDevcXIfMw 4CA0AAuiODA98eCn6KE3+c0fe0NeH58s4l93PJNj5AEQWYl9d0FnzNP2qida1KwOVMVv hCLT7/dNufMmirETWja0nC49kz95qaA9+BbLFs0lkYz91+708tN4WKB5PVba5FrURyIo xiZCw+RCYFryAtAmOZIVnrSedtXfx2gX5dk1YEafzTBGz5HdJGe/EorFA2ilAREsWFqs FQ/w== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=PX7hAD/s6G1gH8kjqB19cscAApDowSWeOBmJ/zWuvGU=; b=CcV0XLJcYjFIIXzYF3Tgu1EZd17PjePaiVmzjOfqCJHGCFDYDuz2Vn5hTLjKe7t1gW XkBRWgdQDIxLdbDrVbbeQoz+D29J+Ni2gAkdIQDCf+32cA3G0KMb9H7OnHgtTdFIAuW/ VaFKOH3dv5rucHkAEq2y9YiR/g3BvyuAKNw1+rdgneks1xKzvOay6CcpYUht8KQAhRai s0yWFbGoOrzK8wOeYh0QJJHgS85NUuuJN9/uDGeYkKTWZ5zcTxWP6g98RtPiR39c3pIl gQdXQZvi7D/9ic1kAx847BuawfgcWnEBN2fBqzLc4Z/ZqWHKrIKbeTNPsIyBsTW5URKD sL6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z6si7583573edm.316.2019.09.11.07.13.46; Wed, 11 Sep 2019 07:14:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728034AbfIKOJl convert rfc822-to-8bit (ORCPT + 99 others); Wed, 11 Sep 2019 10:09:41 -0400 Received: from mx2.suse.de ([195.135.220.15]:50984 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726510AbfIKOJl (ORCPT ); Wed, 11 Sep 2019 10:09:41 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 667AAB7F7; Wed, 11 Sep 2019 14:09:39 +0000 (UTC) Date: Wed, 11 Sep 2019 16:09:39 +0200 From: Thomas Bogendoerfer To: Mike Rapoport Cc: Paul Burton , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: Re: [PATCH] mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM Message-Id: <20190911160939.19f776535770d12ff51a2af7@suse.de> In-Reply-To: <20190910113243.GA19207@rapoport-lnx> References: <1567662477-27404-1-git-send-email-rppt@kernel.org> <20190905152150.f7ff6ef70726085de63df828@suse.de> <20190905133251.GA3650@rapoport-lnx> <20190905154831.88b7853b47ba7db7bd7626bd@suse.de> <20190905154747.GB3650@rapoport-lnx> <20190905233800.0f6b3fb3722cde2f5a88663a@suse.de> <20190906130223.GA17704@rapoport-lnx> <20190909182242.c1ef9717d14b20212ef75954@suse.de> <20190910113243.GA19207@rapoport-lnx> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Sep 2019 12:32:44 +0100 Mike Rapoport wrote: > [..] Patch below works on the same Origin. Does memblocks_present() deal better with the one reserved page per node than sparse_memory_present_with_active_regions() ? Or is there a better explanation ? My debug prints didn't make sense out of it... Thomas. diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index d50fafd7bf3a..e4b02b5f3487 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -669,6 +669,7 @@ config SGI_IP22 config SGI_IP27 bool "SGI IP27 (Origin200/2000)" select ARCH_HAS_PHYS_TO_DMA + select ARCH_SPARSEMEM_ENABLE select FW_ARC select FW_ARC64 select BOOT_ELF64 @@ -2633,18 +2634,9 @@ config ARCH_FLATMEM_ENABLE def_bool y depends on !NUMA && !CPU_LOONGSON2 -config ARCH_DISCONTIGMEM_ENABLE - bool - default y if SGI_IP27 - help - Say Y to support efficient handling of discontiguous physical memory, - for architectures which are either NUMA (Non-Uniform Memory Access) - or have huge holes in the physical address space for other reasons. - See for more. - config ARCH_SPARSEMEM_ENABLE bool - select SPARSEMEM_STATIC + select SPARSEMEM_STATIC if !SGI_IP27 config NUMA bool "NUMA Support" diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c index fb077a947575..370f2ba14a89 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c @@ -410,8 +410,6 @@ static void __init node_mem_init(cnodeid_t node) memblock_reserve(slot_firstpfn << PAGE_SHIFT, ((slot_freepfn - slot_firstpfn) << PAGE_SHIFT)); - - sparse_memory_present_with_active_regions(node); } /* @@ -444,6 +442,7 @@ void __init prom_meminit(void) } __node_data[node] = &null_node; } + memblocks_present(); } void __init prom_free_prom_memory(void) -- SUSE Software Solutions Germany GmbH HRB 247165 (AG M?nchen) Gesch?ftsf?hrer: Felix Imend?rffer