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 12EDFCD6137 for ; Mon, 9 Oct 2023 21:09:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 850AD8D0093; Mon, 9 Oct 2023 17:09:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 801048D0089; Mon, 9 Oct 2023 17:09:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6C8338D0093; Mon, 9 Oct 2023 17:09:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 5D7E28D0089 for ; Mon, 9 Oct 2023 17:09:32 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 18E33403D2 for ; Mon, 9 Oct 2023 21:09:32 +0000 (UTC) X-FDA: 81327164184.29.E1BF2BD Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by imf12.hostedemail.com (Postfix) with ESMTP id 1CF3240019 for ; Mon, 9 Oct 2023 21:09:28 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b="Xvb/uaY/"; spf=pass (imf12.hostedemail.com: domain of konrad.dybcio@linaro.org designates 209.85.167.53 as permitted sender) smtp.mailfrom=konrad.dybcio@linaro.org; dmarc=pass (policy=none) header.from=linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696885769; 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:dkim-signature; bh=IiSyutlj5hKsgZu9TjtxdqL8EqTC57J6Z1fzt7VVinc=; b=2G1+tznNlQq8w1rdckH3aPB0sMdrJYRFOPjVTovzztFVfRoMTl1NWF0vZhTrieQQYn4F+M kjm8vHBzlIZTDr0DdSatBDBhNoxvgXK/JrXtfqxcqX19+6vBvkAJSok6AgL4ASQm9789D7 YGQdH6AcmVau88vGKdhf+lZkxTCYHKk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696885769; a=rsa-sha256; cv=none; b=bit5nXF7QYAdCnay+S/KWv6zEkpWz6ifELp7xgHlXjoQsvgJGbaQCmxdluhf10doJcwQgV Mjxhv/0tWt+i7edccWXbohH8DtW3ouaZxnZxGeRq54o7jJpfKkeyPCEvCQqnJ+GuPlW+Yx PvSYOXfLMUWZuerm3se2UiXrxpu1lKo= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b="Xvb/uaY/"; spf=pass (imf12.hostedemail.com: domain of konrad.dybcio@linaro.org designates 209.85.167.53 as permitted sender) smtp.mailfrom=konrad.dybcio@linaro.org; dmarc=pass (policy=none) header.from=linaro.org Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-5041335fb9cso6269896e87.0 for ; Mon, 09 Oct 2023 14:09:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696885767; x=1697490567; darn=kvack.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=IiSyutlj5hKsgZu9TjtxdqL8EqTC57J6Z1fzt7VVinc=; b=Xvb/uaY/nC/C2zYie7WOtEVJZOxejyoLzTzpRQrdy895M/ziF7sxiw3mlDjeR/TuR5 29BfZhmQtXIekq+MVBqSUrTopup15zxwPLHs7AIAtFWJ49WF9/nhD4oVAmKj3iTIbeQp TYEV5wPzJjvaiOKuXrM5oete90GpepYGvo4sgtzO5B0DOC1RqLzwA7Yv8rvkUS8JA81T XElEtw/o69GMpPIf1vE16DwJ8FLOVsUr9yyJ8WtJ78E6BzHxwns8atgg6VhiKGtAVYIe C/twc1hc08NFU1ApQzqb/3a9q0iDVIUGP64M7l+f1UjvGQ2orD5YfzuZKK3HCK/+4hkq tHRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696885767; x=1697490567; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IiSyutlj5hKsgZu9TjtxdqL8EqTC57J6Z1fzt7VVinc=; b=k68RvO50QgwXDVpZ5lJpi48O/qgglF7u05OE45YkyidI+j6Amqa0yfvQUCSfSCFNx0 ZVezoKyXDNDgRF/JN5gNAXc2wcR/qE2SyJTBxuzuUL4ZheQIR1sUnUnoHCzMG3Gv9v6x ynI6fKbmXhlhT/688cPMRbHV72C8O5lUGrlB2oodxnjlDV9FqR+5PFot0H9WaxXkMPY5 83EiaPvF7uWAl4S1/E7Kjjnu1RtJXa178UU+cPv/Zz/4JZaGOS11uCoXBPc9B72Xxmjf XwkkhLVRCPVwWOOAH1E0Bg+PWW/ND66/pErR1bb53sOPMnC6bFN7TNR21OwVP3l0PBPF GfHw== X-Gm-Message-State: AOJu0Yzq8Q968O9im2q9dNt+iNHsYnz69ccPcTCeSelifTLucYq51/g2 hq7XXJRXAgrh5Ltvsk/kdz3k9g== X-Google-Smtp-Source: AGHT+IG1jrmsBDXkKT12AXrUX0fq8OnWsuOFfcH0l/cgALQzx5fyAZJXnsk9jgtUPLIfJU7oMism4A== X-Received: by 2002:a05:6512:3b9d:b0:506:9c0a:17cc with SMTP id g29-20020a0565123b9d00b005069c0a17ccmr3256164lfv.33.1696885767150; Mon, 09 Oct 2023 14:09:27 -0700 (PDT) Received: from [172.30.204.90] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id q10-20020ac25a0a000000b004ff8cd27a61sm1532825lfn.213.2023.10.09.14.09.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Oct 2023 14:09:26 -0700 (PDT) Message-ID: Date: Mon, 9 Oct 2023 23:09:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 2/8] hugetlb: restructure pool allocations Content-Language: en-US To: Mike Kravetz Cc: Anshuman Khandual , Andrew Morton , Xiongchun Duan , Barry Song <21cnbao@gmail.com>, David Rientjes , Miaohe Lin , Matthew Wilcox , linux-mm@kvack.org, Naoya Horiguchi , Joao Martins , David Hildenbrand , Michal Hocko , Oscar Salvador , linux-kernel@vger.kernel.org References: <20230925234837.86786-3-mike.kravetz@oracle.com> <20230929205731.GA10357@monkey> <20231006030836.GC86415@monkey> <5d14b681-a2c9-4210-a0c1-bf38708b7998@linaro.org> <20231006223512.GC3861@monkey> <20231009032926.GA3376@monkey> <070bd916-d4d6-41c2-9f51-af35e80c96b9@linaro.org> <20231009150401.GA3846@monkey> From: Konrad Dybcio In-Reply-To: <20231009150401.GA3846@monkey> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 1CF3240019 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 18fbx4tag68ywisgyre3et4qencgy3fi X-HE-Tag: 1696885768-78797 X-HE-Meta: U2FsdGVkX1+k0yjaumnQVD8K9ZSjuYpF6K/7C9pQ/6bW0SNRuRm1rayXm1NRCJwSSI1aoICNgjOWgZeZNwqbQ/FhuZXm0R5dg3mkm+L0FbocLyICqkLfXsYsbmFjW/ggd8YIlkqR5maNGoaqq5HlI9sA7gdhXmG+ixAbSDNbSnWo6b7TLLJHXMCEdbQeur1gxmObHZxSHPiiQ2KX4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BRoyKaUNqKNIyBwIqvLCl3YquVZHHsLCtkqSr3Mv8FqxmcTPRIzY/fYiICquQxhMNJ7TmpOA632htleXdCtRA09vND2hsp0qIAlw63ESK68AvpwlsJAppa2yFs64upslYB3oa2OJk5jw2MIV+//V0pr88tjIMwR26w4b3FOs0+p1Q== 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: On 10/9/23 17:04, Mike Kravetz wrote: > On 10/09/23 12:11, Konrad Dybcio wrote: >> On 9.10.2023 05:29, Mike Kravetz wrote: >>> On 10/06/23 15:35, Mike Kravetz wrote: >>>> On 10/06/23 23:39, Konrad Dybcio wrote: >>>>> On 6.10.2023 05:08, Mike Kravetz wrote: >>>>>> On 10/02/23 11:57, Konrad Dybcio wrote: >>>>>>> On 9/29/23 22:57, Mike Kravetz wrote: >>>>>>>> On 09/27/23 13:26, Konrad Dybcio wrote: >>>>>>>>> On 26.09.2023 01:48, Mike Kravetz wrote: >> >> I managed to get a boot log: >> >> https://pastebin.com/GwurpCw9 >> >> This is using arch/arm64/boot/dts/qcom/sm8550-mtp.dts for reference >> > > Early on in boot log before the panic, I see this in the log: > > [ 0.000000] efi: UEFI not found. > [ 0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader! > > Isn't that misalignment pretty serious? Or, is is possible to run with that? That has never caused any issues and sadly I can't do anything about it. > > There are no hugetlb pages allocated at boot time: > > [ 0.000000] Kernel command line: PMOS_NO_OUTPUT_REDIRECT console=ttyMSM0 earlycon clk_ignore_unused pd_ignore_unused androidboot.bootdevice=1d84000.ufshc androidboot.fstab_suffix=default androidboot.boot_devices=soc/1d84000.ufshc androidboot.serialno=ab855d8d androidboot.baseband=msm > > So, the routine where we are panic'ing (gather_bootmem_prealloc) should be a > noop. The first thing it does is: > list_for_each_entry(m, &huge_boot_pages, list) { > ... > } > > However, huge_boot_pages should be empty as initialized here: > __initdata LIST_HEAD(huge_boot_pages); > > At the end of the routine, we call prep_and_add_bootmem_folios to > process the local list created withing that above loop: > > LIST_HEAD(folio_list); > > This should also be empty and a noop. > > Is it possible that the misaligned kernel image could make these lists > appear as non-empty? I don't think I have an answer for this Konrad