Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2140637rdb; Mon, 9 Oct 2023 14:09:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYtzbF+2yqj+sAnvNOFRE6BRqHqbAudkYJVdyU5KR6psu7zJFEJRaseXfpFgVmYFvgh6ng X-Received: by 2002:a05:6a21:a103:b0:16c:bb5b:ec2f with SMTP id aq3-20020a056a21a10300b0016cbb5bec2fmr6031709pzc.38.1696885784836; Mon, 09 Oct 2023 14:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696885784; cv=none; d=google.com; s=arc-20160816; b=YDcw2JCr/+31uOTTprNwlxm7uqADI/1ZFb4yQ8yXNgXb1SZl8IXaGO1Zt4MEaU1GW5 NWm1a6iWDCqAhQKSQxjLDwT5vues+2h8tbYW+FGCRnctpAzf2HhMASKsNjYd4iEd3rks jHBUSS+p0riU81/2Y1LOhnYj0LhwAiCRkmG1yi3QoklAwQnofNiWeBSe+3WsfdCdLNoE rKn1UgeYqx4pA16Z31bHH/nhRE0Qb7rdaCm5DmDXOfDAij3cJJFDgR53Vby5kL6fuhuD zSCA29547wEYRQOZ3RO2R87a2kglPjlzcCBBJjvrzPb3LdDENhpubRRlTeIrMig/l8Kt YLMQ== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=IiSyutlj5hKsgZu9TjtxdqL8EqTC57J6Z1fzt7VVinc=; fh=mPpGB1r8Pjkw41EITZ/nSqiwWwIlaCQw1OYY04A5K9I=; b=lXE7vYYaPdIIN0yoKpJebElFHER39taw3dbbG4ciCoPi3f2lQ/70PDNi0qESW2viej 8X87KkSQ+59yJ2FRf1Dy2/HZSPl496onbLubEdETLPGu+jjp0GbVkkaIupJC6H8uI3fR PdVUIV2V1XI1W7M2grCkgWoJpubpu55AqmIpvCyUMqZ3/dtIc6GK3M1KTOaZx6zSBGD3 LptS8++OSpDgxJJgVKg1fpwIFYF+bijUr0lhHvD3OFoKi0fiTtvaqEEdi9ddodV96Yoi F76nvirHjpZcdYLB28d9axO3ZD62FbQIPWR14cNozpeQ1TM3t6OfhstPlfR6GEOuZ1r2 3iTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s9noSNrD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id ks14-20020a170903084e00b001b801044467si9703653plb.3.2023.10.09.14.09.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 14:09:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s9noSNrD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 6B31C8059DAC; Mon, 9 Oct 2023 14:09:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378617AbjJIVJb (ORCPT + 99 others); Mon, 9 Oct 2023 17:09:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378544AbjJIVJa (ORCPT ); Mon, 9 Oct 2023 17:09:30 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 045A193 for ; Mon, 9 Oct 2023 14:09:28 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-5033918c09eso6237581e87.2 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=vger.kernel.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=s9noSNrDhJu0B9Ojljk2Ehm/pBHUelSlrewmkw36haDpfiAjvyUUCu9x4KFQlDQ17N p+eHQdTrsDyooabr/azKIwMbita0VN0ggttXH5Ec+YGEfmzLxOU3pPHG1SNTzjuhK/e7 Ux96R+RHnA/oshkR6CLl8fyKqfSkxOsF2j7Wo0x1q0t3vk5v/fqQNv8QP2njoXxypoGm w0oYJ6/cDcxcS3JUs6ZaVOHkf9bqiPVEmgL2Y8Mb4HkWU4QyjQNz0GtHn0w4xnQ1/4A8 znB5QH5dB/DHeT5++fItR4iIdVLzyAMHgue5pgVxUKDKvaKvZeh3WsMwJABcx9EgjRmY 4JEQ== 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=TWKDuZE2RG34HKU2tbTMAb5u3wSt7+h9aC0rvR1bHswv2LgGY8lzTdsrm6gK4okIx/ TChdDT15lNJKIHC07YeWpDxSPYB27oiNyLtAq7Y0qVtgyV2YHKgV1qciInAeVlrv5+xy ROpdEZgqhoKBLJaCecJKiDnxwRUykrY5jWmGWf2JiC1oKvpWnhXm+UUd/wha0tDgM+oo +xVqHmrMDmd3BUW6HIUBqZE8wGKNym6r1ozMsQCRPtBPbPuMRmHQijlxpj1IgeK4GfT6 61uBLN0yuFZPJTi3GN8T92RlRN9LLa9rHVZyzBV9wmx0lIJ9PQzpQag4JagZLiEUwJj5 OwyA== X-Gm-Message-State: AOJu0YxFx0Qyfn3RyvFJrhUx2PbxrNFaKAkfw2y+Vz/aZ5YqhyqC0vtT kE0OFIMj8QGjsSsCNoCOiHFujw== 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-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 09 Oct 2023 14:09:41 -0700 (PDT) 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