Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp821989rdb; Thu, 15 Feb 2024 17:22:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV1osbobjIXRUUInX2AVWtrLEGygrWdlAQIRwmsKz6ycMfNX3DkYCNER75lYbaoLx/TrTjhii0tBG0qrzwB5/ab79uIVdkHeCP1hV//2A== X-Google-Smtp-Source: AGHT+IHPgTZBJVPoym6cCTtBBZTHFCujw+nTHoge+HE57cCzxlOSM9gWtItXb+CLx8gru5NVAMn1 X-Received: by 2002:a17:907:78c2:b0:a3d:385:1628 with SMTP id kv2-20020a17090778c200b00a3d03851628mr2749916ejc.6.1708046559530; Thu, 15 Feb 2024 17:22:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708046559; cv=pass; d=google.com; s=arc-20160816; b=azve0puZH1jCaIi8IsWlT+UrIrUIE1dOUpXOhJpZtil57RtdpR7aZX+NCn87cquQgZ 1nYTNr5IqGo0FcLa/+OsvWsAiOACX1C1+NzZ+5cT0R231SGXicA2jb8a46v+H+K4lnzj MTKRrVFLzXqkuyy5GpRGieE0HVHmf/Yc1Zjx64mc3m3XzLxvhb9qh/diyHzzfnEQ8rVu Frn0m36q1xCOCs3fnD+2RBQDDgJz+oXs6/b9BrMtW8NvB9P7IZsJ+hYEIgUW6B7X4P16 BYq501JaF5gzMz9dfozI3NICdr3goU7xOBR4NQWYXaJ21U5lOBkKhBywDBnDIp+F1Pia T9YA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=TLFCfDIXDkV9qbnmN5sN32Ddr/r2yoA/vQfotsdU3lU=; fh=LVy+IlzT5EXtFyY7jMl5+qzXlIkDLTr4AJj1JFUNNWg=; b=QJRbuRtsY4To7u9LQs71WnjjM+a1Pjboz1765c3o8i7gvlYx8mAxSLuj5co1kiBmUd L2P7yiSzSHBjPMymBCa2eWpU9kAOVAoJoscYZLErR9Ju1Lmsd6DQQrAM87o06LptSwLW Tlhmple2fZDJwKxreJzZ+/5KGhXK8JEPjLcy4gHJcDMN2U5tYbJFWfA5QTqWyiJ5rux/ qKbp9FZb6WqNK267FAgf31mpSA7GHJwnawniVhDayG012ZZLUTFOsxpJwJQhfXXyXO+/ fNwA0HtI3zO3zcCUFRGGZ0v8RoFZn/uTus4dmLlG05qZxMZaUV6nsRMV4/PDetddBJug A2eg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=lVHz3Hgk; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-67940-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67940-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ho43-20020a1709070eab00b00a3d95061ffcsi1127051ejc.47.2024.02.15.17.22.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 17:22:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67940-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=lVHz3Hgk; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-67940-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67940-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3DECF1F233F6 for ; Fri, 16 Feb 2024 01:22:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66B89D267; Fri, 16 Feb 2024 01:22:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="lVHz3Hgk" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5D274944E for ; Fri, 16 Feb 2024 01:22:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708046554; cv=none; b=n9vssuxY6gF5djw9S5nKq1C6HtyXY1OPLwWr+Vc8iB55YdMA6s2qI5mL/a+vjTYjBsDZdrmmPvIDiEF317BXksA2P+4bmB4bLM/JtZDO09Eu8cevj9rTXGfhoAiV1cG9PX6Dmqa46YGJkRvqnAjWSksX1xLfT830805v1WxlgL0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708046554; c=relaxed/simple; bh=Pz16fPbB321QlIKfusx5bR8U5uF4607UAfv7dS0oWA8=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=jWBH4FL/IhWnQPSPkLYnaYfkXaMhgHB2AfKMMYMz0E7aQbTcC+gjeKGH5dX7QlnVsjv2kf74VEtL85arzPhGvfIjNXUuXCVqgrMT/SgHdCahKz8mNgNB7r8viKtItlsgkhtSTIKgCIgCBodEdeSs/X78C3D16mVir5CXVarawdI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=lVHz3Hgk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC54DC433F1; Fri, 16 Feb 2024 01:22:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1708046553; bh=Pz16fPbB321QlIKfusx5bR8U5uF4607UAfv7dS0oWA8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lVHz3HgkrXAtaw8RscTCSPyB2BRdNgdI4jWqmHIzJJiOTZSiDr7Ee0hG4WB2u2mlQ a42sioIrCEJjlXFrvRgJpkLABl91Po0J5OnfD++E34/tgR+GEjenpsH33GooicPlsg UZV4bjqCtfkJBYEmlSPPb6Ehmz4V0OrNw3ZW3s9w= Date: Thu, 15 Feb 2024 17:22:33 -0800 From: Andrew Morton To: Anshuman Khandual Cc: linux-mm@kvack.org, Muchun Song , linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] mm/hugetlb: Ensure adequate CMA areas available for hugetlb_cma[] Message-Id: <20240215172233.06e9515adf7de9c58d1b5d91@linux-foundation.org> In-Reply-To: <20240215043405.2379295-1-anshuman.khandual@arm.com> References: <20240215043405.2379295-1-anshuman.khandual@arm.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 15 Feb 2024 10:04:05 +0530 Anshuman Khandual wrote: > HugeTLB CMA area array is being created for possible MAX_NUMNODES without > ensuring corresponding MAX_CMA_AREAS support in CMA. This fails the build > for such scenarios indicating need for CONFIG_CMA_AREAS adjustment. > > ... > > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -7743,6 +7743,13 @@ void __init hugetlb_cma_reserve(int order) > } > > reserved = 0; > + > + /* > + * There needs to be enough MAX_CMA_AREAS to accommodate > + * MAX_NUMNODES heap areas being created here. Otherwise > + * adjust CONFIG_CMA_AREAS as required. > + */ > + BUILD_BUG_ON(MAX_CMA_AREAS < MAX_NUMNODES); > for_each_online_node(nid) { > int res; This blew up my x86_64 allmodconfig build. I didn't check whether this is because x86_64 kconfig is broken or because the test is bogus. I won't be releasing a kernel which fails x86_64 allmodconfig. So before adding a new assertion can we please first make a best effort to implement the fixes which are required to prevent the new assertion from triggering?