Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6890286rdb; Tue, 2 Jan 2024 18:21:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGq4MM5kuBemIckv5YSsSmntlKG4H4O6CY6LbMzcOUoOJx5SdpxdqJPa46JPshOtWWx1CH2 X-Received: by 2002:a05:622a:2612:b0:428:3617:5b2d with SMTP id ci18-20020a05622a261200b0042836175b2dmr998065qtb.5.1704248479806; Tue, 02 Jan 2024 18:21:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704248479; cv=none; d=google.com; s=arc-20160816; b=KRECYT6AgiYQTxX+P6MFoAjOZL5GMTY4hJG8teGxOvt0O0XZ2/EGQCZ/aCcnii276I AKIs9c0620yxS5gM/fxL6Fxy3CIBWGK6/3zMjU2ZfEiqap86EqVT8ylpQpcKBsrReoCC GgdU+1jewqKLU3aMMKuvMl6dXWyT8OOxtaRfXl3ccSXb62p1Z8FMwCPO0vBSn2PB+OxG MAAh5skMPVeEUPbEBjn80Uh4b4ZfjDQ7YOfqKtiWBZRQIndTJEy1lPptkuLdhrtMN9d2 wv0QdkmnDjM2hXsGpBKQis83ORti3GYeb1VJbGgEcmSfHH8H2LJxdJOOauQ3de5fKk8i PhYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=fnnzaHHZTJxojy45dlDauVj3BDpS6sAOuvKNoVP4Lz4=; fh=B1BIZJ2krpJtpc6kx4wkSTe6JLf0d6btzTgaSOOmxKA=; b=Fuchq8/MciBZ6KGIptYoHa//4ZENJZtCVg05sCrpgOi6d4h/kTmnOX7rG17YN9raPG +Ndi+Q6fYf1fcvcLnl1Y26q4vh/1nKJB+aJeChBq2QMn7ahMEsp3UneSq5xrs75zM8zh GwxjLHee08Lc4+Jbkh23X6l2qrEot2IWHyxxVKLJKN6xibUEKBIUweeb6U7us3S6xih0 3izR7fn1eAt5RW2nJFub51zz92hPPYHhNNEyNU79bh3Msu8LHA638ymzI+H26OvIvolc MtKnQttRU7AE56CG2c6EfsayFokT6KFfEqQNxeItUK+EANKL2bRoNtI6g0qy1WDqngjZ KBVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="DkO2N/hL"; spf=pass (google.com: domain of linux-kernel+bounces-15068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id n1-20020ac85a01000000b004278f977a4csi27259817qta.326.2024.01.02.18.21.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 18:21:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="DkO2N/hL"; spf=pass (google.com: domain of linux-kernel+bounces-15068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8EB2E1C21D24 for ; Wed, 3 Jan 2024 02:21:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CCC84A31; Wed, 3 Jan 2024 02:21:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="DkO2N/hL" X-Original-To: linux-kernel@vger.kernel.org Received: from out-189.mta0.migadu.com (out-189.mta0.migadu.com [91.218.175.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50FE04A13 for ; Wed, 3 Jan 2024 02:21:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1704248465; h=from:from: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=fnnzaHHZTJxojy45dlDauVj3BDpS6sAOuvKNoVP4Lz4=; b=DkO2N/hLoWlU/Xi0uGUM12Bqfsjd0ear7adaK2Sza8y+ahqXdxnVUJjVrX54d2wk/xfWpP lnh7YE+I0W+5aOYcDjssIdoDbFbj7CkXfc+Ng4Irl+zBD004Wu90tcUeSFpJCfI0Joh8d8 lC8GMUZVxhM/zRDrgHZJa0W6eXWtatc= Date: Wed, 3 Jan 2024 10:20:58 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v3 0/7] hugetlb: parallelize hugetlb page init on boot Content-Language: en-US To: David Rientjes Cc: David Hildenbrand , Mike Kravetz , Muchun Song , Andrew Morton , Tim Chen , linux-mm@kvack.org, linux-kernel@vger.kernel.org, ligang.bdlg@bytedance.com References: <20240102131249.76622-1-gang.li@linux.dev> <5c30a825-b588-e3a9-83db-f8eef4cb9012@google.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Gang Li In-Reply-To: <5c30a825-b588-e3a9-83db-f8eef4cb9012@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2024/1/3 09:52, David Rientjes wrote: > > I tested 1GB hugetlb on a smaller AMD host with the following: > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -3301,7 +3301,7 @@ int alloc_bootmem_huge_page(struct hstate *h, int nid) > int __alloc_bootmem_huge_page(struct hstate *h, int nid) > { > struct huge_bootmem_page *m = NULL; /* initialize for clang */ > - int nr_nodes, node; > + int nr_nodes, node = nid; > > /* do node specific alloc */ > if (nid != NUMA_NO_NODE) { > Oh, if nid != NUMA_NO_NODE and memblock_alloc_try_nid_raw succeed, `node` must take the value of `nid`. Otherwise, list_add(&m->list, &huge_boot_pages[node]) will not be executed correctly. > After the build error is fixed, feel free to add: > > Tested-by: David Rientjes > Thanks! > to each patch. I think Andrew will probably take a build fix up as a > delta on top of patch 4 rather than sending a whole new series unless > there is other feedback that you receive.