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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F313C6FA82 for ; Tue, 13 Sep 2022 12:36:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D4F7E6B0073; Tue, 13 Sep 2022 08:36:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CFF166B0074; Tue, 13 Sep 2022 08:36:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BC7688D0001; Tue, 13 Sep 2022 08:36:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id B00756B0073 for ; Tue, 13 Sep 2022 08:36:16 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 825FB8069C for ; Tue, 13 Sep 2022 12:36:16 +0000 (UTC) X-FDA: 79907009952.31.C0381F8 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by imf03.hostedemail.com (Postfix) with ESMTP id E325F20088 for ; Tue, 13 Sep 2022 12:36:15 +0000 (UTC) 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663072576; a=rsa-sha256; cv=none; b=M7RIYVxOiDrvlNu7TQV+P7IWkCHtpxELbICyuP3olzf6r1Q9MLV8GFsGEQ2QivtOEu7VLq 0ei71JcE1CvaJEojUcxY4XxfSgRnJYCusAsW7xk3PRjBCA4rOuSeTe7WJJdxf1ZEdR1pcC yK1WWFGdAku8LOBlVU5TSCQPQ2ZrZ1g= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663072576; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s9J21hyrh4j55zvjzq/31Cc0E06iI7V26uyUCFKQ9uE=; b=siZhi74rWFEE3khWVvNzisMmNw3mY+OyRy7uTclP6KJb13iGGRCZNAgMfaiywIM+zlcPUy kCcnPvridMI/9SF/T+9bQ8R/LY9KOjUmjPXt2V/ksdZZFcjDYFjkqO78LkE8rn/lIk2wim IVVv0nAbgdnWWWKvpr1/b4YNiDynebo= X-Stat-Signature: 1pt64cktzibaxoagzrkkxbxgpretefrg X-Rspamd-Queue-Id: E325F20088 Authentication-Results: imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1663072575-64208 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: 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