Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp419297rdg; Tue, 10 Oct 2023 14:32:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUUuhHMSLq+Od3agrwZKjhIBQBmgBQYbwh5Gf/gLqP8M+LJRgkv1yDmYlmE2H4AdTVCGWx X-Received: by 2002:a17:902:788a:b0:1c5:c23c:a9ff with SMTP id q10-20020a170902788a00b001c5c23ca9ffmr16158313pll.58.1696973541085; Tue, 10 Oct 2023 14:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696973541; cv=none; d=google.com; s=arc-20160816; b=OlnYvhXNB99XQbVfm8uA9Ug0ieSZhV4FJqS0iaBteec81MHG7W0ZMtrYS/jb9dCHCu X0Yr/EKbwEMccTACilf1nxZCnvnhtFTxi9eN5N9lZcKnAi86sVPE+zOGmpRlzfpEi0SK mkst/UeM5P0ycHmrvtskiop9g94Nhixy6yUV62I+Tg1dY5b2OwnG3BL814H+jWHNsv1s 0BlHsfNfxL5U84l9pvgx9HkFY0KySQX0UZyLPsP1kH7poA2O+qS7ywFh5skLhLg2rKpW reSlBnHjv74d1lDtTIrS8G4o8EDmmsunUuQO7cKSAEsfLqzbDySULZrp4rao0rxHTBMK O5RA== 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=5Pjl5gkMN+tM8cTCpSlEYTm/NSKpOFFUeh14zRzLcbk=; fh=pgMoRfkemS2C2CN4HQHykIVHhBrJiJ17TuGCDqKjYSM=; b=VwIIL90IFjLBNXdkDpGyuHljWo2y6fqgKTPu5vB45w2GBz3ex5FwNREs0smO4xKEfZ Tl/qS0w5737BWujDSznCXYXGw0qYlE3U0dA0hwJsE8p5OXH69nHrJCJpCQs9GG0fFQDj GgohuDNNmc+sAkj+wnB5K8jywzOjnyYAiodqrINmvUxyEUROVjiJmmoaRquxubWi5+ya K9He87cf2edEn/+8lSP4CL2UeyHtXjAYXqEbe587izY6XndDB7rP8pZR+UztK5bZvpBu m4GguV5qOLfDSl44kf47nc7DatprEEAbAPt2fbeZC9r3+Talpw+rzIXZEz26D70sohNk lpMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XqAAeEni; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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. [23.128.96.32]) by mx.google.com with ESMTPS id w9-20020a1709026f0900b001c20db25104si9983648plk.117.2023.10.10.14.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 14:32:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XqAAeEni; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 6E78880423AE; Tue, 10 Oct 2023 14:32:18 -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 S1343941AbjJJVcH (ORCPT + 99 others); Tue, 10 Oct 2023 17:32:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231224AbjJJVcF (ORCPT ); Tue, 10 Oct 2023 17:32:05 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CE0892 for ; Tue, 10 Oct 2023 14:32:03 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50435ad51bbso7540050e87.2 for ; Tue, 10 Oct 2023 14:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696973521; x=1697578321; 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=5Pjl5gkMN+tM8cTCpSlEYTm/NSKpOFFUeh14zRzLcbk=; b=XqAAeEniUYSWT04379UmiBPgZ5qQRyMJMOtaX9B9zY2ggxvmibNu50FSI+VtlRETn/ VhtYOLPBDBGQGN1tkpr9aYVmvBlfLWy+SU/Xk6zZBmqEEWNLy27UXT6wfjdejxIzxYER zlwYyZuZDns528aNj5NYQwbOXxHOVf1K9Mr+kKEVDF5fCTjwRRJP9pKaom1ukYn3GyyY bXytY5pZr9FcVJKMCYTj4s2311wSEMcsl72QDdo54LPSXTEete44DJAAwmVvUy1c24f2 2AddR3LCXUeveogNgK3cuu1nQHtCE1XV5Ep4oZYD7srRwwgNBQgKTNw3LOolkQoYwmHS Xe5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696973522; x=1697578322; 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=5Pjl5gkMN+tM8cTCpSlEYTm/NSKpOFFUeh14zRzLcbk=; b=ChPWEStbw3YssGKJFYh9KMvvn78Sn8vYWe23Vxb6vw/Mgf6tKp1D1yQISFzVp0BnN/ grwVSj4KSYMMaMOCd/l55wYfifa0/LyRo3jyT/iUiEKBBYyDRJl1T6ouDO+3IMSViZye Ce3NJs6LZAZhN790h06lNYQ9uHsB0tlYktXkZPfrm24bZgYFD4RnguGHCufPuuwtxL1D img1Jae1qnoFg2Mp2JXp8jdu4/C0bGTc+nkKaAWBxl1+454i67mgByFvlTZDa1BIAdx8 /77OlCDoOQFHWQBDycsfGNs3wWTpgZeyLbwf/qm2DMDci7UMzXUNtnnNdcuYSmWm/iwC vgHA== X-Gm-Message-State: AOJu0YzSemgm8SkXNXeyuwoKSeT66nmF1thJ5TreiszcrmHDZH1S4f1+ IGXPO70CdcyGYGOp6mLpIRShRQ== X-Received: by 2002:a05:6512:a8b:b0:4ff:80d4:e132 with SMTP id m11-20020a0565120a8b00b004ff80d4e132mr22854903lfu.29.1696973521677; Tue, 10 Oct 2023 14:32:01 -0700 (PDT) Received: from ?IPV6:2a00:f41:8004:ab80:24a8:5e5d:e0b2:5884? ([2a00:f41:8004:ab80:24a8:5e5d:e0b2:5884]) by smtp.gmail.com with ESMTPSA id s8-20020ac25fa8000000b0050482b29ac9sm1965533lfe.212.2023.10.10.14.31.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Oct 2023 14:32:01 -0700 (PDT) Message-ID: <68fd8e0e-1788-435e-a0fe-77b4252387ad@linaro.org> Date: Tue, 10 Oct 2023 23:31:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [External] Re: [PATCH] mm: hugetlb: Only prep and add allocated folios for non-gigantic pages Content-Language: en-US To: Mike Kravetz , Usama Arif Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, muchun.song@linux.dev, songmuchun@bytedance.com, fam.zheng@bytedance.com, liangma@liangbit.com, punit.agrawal@bytedance.com References: <20231009145605.2150897-1-usama.arif@bytedance.com> <20231010012345.GA108129@monkey> <6b1d9860-3581-0b99-4fb7-4c1f5a2a05f3@bytedance.com> <20231010213019.GB279095@monkey> From: Konrad Dybcio In-Reply-To: <20231010213019.GB279095@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,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 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]); Tue, 10 Oct 2023 14:32:18 -0700 (PDT) X-Spam-Level: ** On 10/10/23 23:30, Mike Kravetz wrote: > On 10/10/23 18:01, Usama Arif wrote: >> >> >> On 10/10/2023 02:23, Mike Kravetz wrote: >>> On 10/09/23 15:56, Usama Arif wrote: >>>> Calling prep_and_add_allocated_folios when allocating gigantic pages >>>> at boot time causes the kernel to crash as folio_list is empty >>>> and iterating it causes a NULL pointer dereference. Call this only >>>> for non-gigantic pages when folio_list has entires. >>> >>> Thanks! >>> >>> However, are you sure the issue is the result of iterating through a >>> NULL list? For reference, the routine prep_and_add_allocated_folios is: >>> >> >> Yes, you are right, it wasnt an issue with the list, but the lock. If I do >> the below diff it boots. > > Thanks! > > I believe that may be that may be the root cause of boot issues with > this series. It is unfortunate that the failures were not consistent > and did not directly point at the root cause. > > Hopefully, these changes will resolve the boot issues for Konrad as well. > > I will create a new version of the "Batch hugetlb vmemmap modification > operations" series with these locking changes. We sent a reply at the same time :P [1] Konrad [1] https://lore.kernel.org/all/6f381d4c-d908-4f00-89b3-ed3bcb26b143@linaro.org/