Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6600266rwn; Tue, 13 Sep 2022 06:38:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR7XP8rEOc+rX3mCj26TS1On795Xgwo444o0JpEKkkKeZXvlZ7I9MNbnik91zbw//nGDMoKo X-Received: by 2002:a63:2b48:0:b0:434:eb45:9c6a with SMTP id r69-20020a632b48000000b00434eb459c6amr25999876pgr.508.1663076318912; Tue, 13 Sep 2022 06:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663076318; cv=none; d=google.com; s=arc-20160816; b=s5cMPzOJvZZeZ4kJDvHyLdGh7LBEj0Wtkt60IHRQjBqnEB+H8w4pJ7BMXhj/pVS4+n jH0Rc2Lz961vI/4bAtwbktccDD8EGwNkoKYM2mFTFZyhjWdyGUEneODvfOgzIZOohJi6 1s2qwRjhuCY8ZogcltSKyMnTbdhDILVtNu+nr4YUcEww4HU8u4OVop5MXHGtddFhT/EO 5PJ2InuIWIcpzOcTvq0bLdBPE+J2+tZu+Tqa04gGAyjwfo12GJPtO+8t+qTnuKKeIrmC DPTL96qAfc2UYUAP3dDymkCFuWY42GoPuEL2lsqKfVxkimk5PwtI0wwBS9yD2mVVc0XE S4bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=s9J21hyrh4j55zvjzq/31Cc0E06iI7V26uyUCFKQ9uE=; b=lFXoF5WhqtPZDqyId8MDrD4REpYLomR8czxeJ4VcafvcyocaNqY9SCZf6XXiSrQrkS 3t0424QvgXNM5GxnzNjbSsUi/DWctbdkEDj+iFdsfI2JIaRyiSBDczdhAurqWzy7C7QO XpsRVg3FY0lEHxNoEIIGT/WZfhkG0fXrbhrZTWDh9oxVpa6WTfAQ3KySF8hW1nlKWFrv JDsPyFo5SnEIPzRv8+D2xaEirUoAVnHuJvtFet7OI3uPj5vcd3DU61fDeTYORGiN1Svm eUNGeNfF7IpzXnyIwQO5/8hOdTuwOJUiPcIOrGVzc0t5r8qJjsN//vR23lIixt47/7uc i9NQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u21-20020a63d355000000b00434e876612asi10131469pgi.241.2022.09.13.06.38.24; Tue, 13 Sep 2022 06:38:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232109AbiIMMgh (ORCPT + 99 others); Tue, 13 Sep 2022 08:36:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232179AbiIMMgU (ORCPT ); Tue, 13 Sep 2022 08:36:20 -0400 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A477631363 for ; Tue, 13 Sep 2022 05:36:15 -0700 (PDT) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4MRjcs6wMpz9swL; Tue, 13 Sep 2022 14:36:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J-_IE-R0VMXd; Tue, 13 Sep 2022 14:36:13 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4MRjcs67g9z9swK; Tue, 13 Sep 2022 14:36:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C1A868B780; Tue, 13 Sep 2022 14:36:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id l5GnJCXuci9M; Tue, 13 Sep 2022 14:36:13 +0200 (CEST) Received: from [192.168.232.91] (unknown [192.168.232.91]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 412E88B763; Tue, 13 Sep 2022 14:36:13 +0200 (CEST) Message-ID: <4f540391-37dc-8e22-be0a-74543082504d@csgroup.eu> Date: Tue, 13 Sep 2022 14:36:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: Fragmented physical memory on powerpc/32 Content-Language: fr-FR From: Christophe Leroy To: =?UTF-8?Q?Pali_Roh=c3=a1r?= , Mike Rapoport Cc: Ash Logan , "paulus@samba.org" , "mpe@ellerman.id.au" , "robh+dt@kernel.org" , "benh@kernel.crashing.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "j.ne@posteo.net" , "linux-mm@kvack.org" References: <20220520080454.c3cqodsdbfbkmg56@pali> <935b426a-6c64-beb0-907f-8c3f0a089ab7@heyquark.com> <20220520123002.rd46p5ty6wumi7cc@pali> <20220609222420.ponpoodiqmaqtwht@pali> <20220808184034.lskqrk6z3gb5q76r@pali> <219cda7b-da4b-7a5a-9809-0878e0fc02ba@csgroup.eu> <20220908153511.57ceunyusziqfcav@pali> <20220908201701.sd3zqn5hfixmjvhh@pali> <9fbc5338-5e10-032a-8f55-e080bd93f74b@csgroup.eu> <20220912211623.djb7fckgknyfmof7@pali> <1c95875c-29f8-68b7-e480-fed8614f3037@csgroup.eu> In-Reply-To: <1c95875c-29f8-68b7-e480-fed8614f3037@csgroup.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 13/09/2022 à 08:11, Christophe Leroy a écrit : > > > Le 12/09/2022 à 23:16, Pali Rohár a écrit : >>> >>> My guess would be that something went wrong in the linear map setup, >>> but it >>> won't hurt running with "memblock=debug" added to the kernel command >>> line >>> to see if there is anything suspicious there. >> >> Here is boot log on serial console with memblock=debug command line: >> > ... >> >> Do you need something more for debug? > > Can you send me the 'vmlinux' used to generate the above Oops so that I > can see exactly where we are in function mem_init(). > > And could you also try without CONFIG_HIGHMEM just in case. > I looked at the vmlinux you sent me, the problem is in the loop for highmem in mem_init(). It crashes in the call to free_highmem_page() #ifdef CONFIG_HIGHMEM { unsigned long pfn, highmem_mapnr; highmem_mapnr = lowmem_end_addr >> PAGE_SHIFT; for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) { phys_addr_t paddr = (phys_addr_t)pfn << PAGE_SHIFT; struct page *page = pfn_to_page(pfn); if (!memblock_is_reserved(paddr)) free_highmem_page(page); } } #endif /* CONFIG_HIGHMEM */ As far as I can see in the memblock debug lines, the holes don't seem to be marked as reserved by memblock. So it is above valid ? Other architectures seem to do differently. Can you try by replacing !memblock_is_reserved(paddr) by memblock_is_memory(paddr) ? Thanks Christophe