Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp625675lql; Mon, 11 Mar 2024 12:18:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVM8xUNNLtQ6aW0pXI1cVcEyUhvGTU9rkeCdb5C8OGHs6k92aFg3CAzv9+uLa5eqN2ijIu37p+Kc33Qqe/0KbUyUU4E1bG8Npr27GvpvQ== X-Google-Smtp-Source: AGHT+IHS30ltmAEnnNOGsMtiEeOZsht9prmV8ebS+kHh8eJucpBcaOxS5+5xvaL2WsTrReLG9oQE X-Received: by 2002:a17:902:e9cc:b0:1dd:6285:b84a with SMTP id 12-20020a170902e9cc00b001dd6285b84amr8529880plk.9.1710184700630; Mon, 11 Mar 2024 12:18:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710184700; cv=pass; d=google.com; s=arc-20160816; b=TQNeu8IHh26e97VYxqdG2wQWwW30twT45nEk6cz+HrfhiwKvgn9ysXCq+xH9+ReIpW 0HI9AHqJLba5gyGdZwksxQy68tDoTCOe3WtaprthtO8TOtlCf9RM2zNI/rnsU8IaBlbY yBZ8Fr3W4R9EI1u0kZUC1/PllIVu9xAEayxNhFFB8cZjJ8OJeLQN9c4EKth6TsT81xUt 3wAgp4fneRSiL1aM1k2nnC3Y05UmpURcAKYiIrHMkKbIaTPW/h6H4L/iLXYPMiolDAwm 5/7cZYm6hReJtOwqHgycz6FJI9kLhPxHiHpeUHEgRnf6FzgIBgYlZ5yaZUY5kSzti/hf iMwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=ySBg4pfu3LftaTYH2zHW1RxYEaQqC68iF18YV2LoezU=; fh=BGZ6SnPqBO1aS1BcKFm74KRqsB+43p7n4uBICYb0SfA=; b=ZWeEtwfNbR4Nj6pIl1V8jN50/a5r3QWphi6/mYAYQsIGIQBFeaceuXajHauZvlC0mA gCRBlIcxL/X1L4gwAevPgsfy5FjktDLnSIIR7efUMaZ5v4RmZXpK/Ap9WxtjoxHJvTA+ KZOUdN0ptACBKaFYxS4qmPAuBxPS3Ujy6H05aPAackWOhdvX34UbdG17mauVllLEXhq0 SxIcE04Pyp8OOsj8OoaM/bHBhyqrQL387Rm7Vjiqk9V0SBKWDXSNC3a3pWZSAigCWXv1 dRVPx9MbJmnUduA2qYzGcoX7CcNcF2f4JqfL346mZWc61FuuD4ru6FkZ2lIFWJ81HRA8 lFTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-99442-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99442-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id iw2-20020a170903044200b001dd67d6984fsi5134883plb.144.2024.03.11.12.18.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 12:18:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99442-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-99442-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99442-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1A39A286AB2 for ; Mon, 11 Mar 2024 18:56:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA0EF5674D; Mon, 11 Mar 2024 18:55:52 +0000 (UTC) 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 6DB9E56443; Mon, 11 Mar 2024 18:55:52 +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=1710183352; cv=none; b=JBAQTi8cVcT6ueQz56Cq875Qoswax5fl7cqDEPiJXJd4GPAaTFRvefTi1eIYEVLZAPz4UFDYmnpcYwDrXNl4BFZlUvFmJQRso3ojf6Tx3SFLJrmCC9ogQWIj7r+sZf69Er5/iSGdbLPhOly7vvFSGHhQWVFW9nfFlUZ899x2OX0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710183352; c=relaxed/simple; bh=u+mjpEFo6fNKY8iblRcstxYCBK04l2AO6isKa5Cqn+s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=o/89ogHqGFDY7/04yczTlnqXnl02SMaH1aLdD9BT//CDyFfPUYDnJXFrsillamgOdjH9tIskMJDCfGR3FmXi5JffcPsmm/6H0zOhega7izQE4O9kzGAtVVjBdhIyq6Z0vYVVSZNv6nBBiWbZ615Xb3kuuropqtYTH0JrrPYcko0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6058C433F1; Mon, 11 Mar 2024 18:55:47 +0000 (UTC) Date: Mon, 11 Mar 2024 18:55:45 +0000 From: Catalin Marinas To: Marek Szyprowski Cc: "Christoph Lameter (Ampere)" , Mark Rutland , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Viresh Kumar , Will Deacon , Jonathan.Cameron@huawei.com, Matteo.Carlini@arm.com, Valentin.Schneider@arm.com, akpm@linux-foundation.org, anshuman.khandual@arm.com, Eric Mackay , dave.kleikamp@oracle.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux@armlinux.org.uk, robin.murphy@arm.com, vanshikonda@os.amperecomputing.com, yang@os.amperecomputing.com, Nishanth Menon , Stephen Boyd Subject: Re: [PATCH v3] ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512 Message-ID: References: <37099a57-b655-3b3a-56d0-5f7fbd49d7db@gentwo.org> 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-Disposition: inline In-Reply-To: On Fri, Mar 08, 2024 at 03:01:28PM +0100, Marek Szyprowski wrote: > On 07.03.2024 02:45, Christoph Lameter (Ampere) wrote: > > Currently defconfig selects NR_CPUS=256, but some vendors (e.g. Ampere > > Computing) are planning to ship systems with 512 CPUs. So that all CPUs on > > these systems can be used with defconfig, we'd like to bump NR_CPUS to 512. > > Therefore this patch increases the default NR_CPUS from 256 to 512. > > > > As increasing NR_CPUS will increase the size of cpumasks, there's a fear that > > this might have a significant impact on stack usage due to code which places > > cpumasks on the stack. To mitigate that concern, we can select > > CPUMASK_OFFSTACK. As that doesn't seem to be a problem today with > > NR_CPUS=256, we only select this when NR_CPUS > 256. > > > > CPUMASK_OFFSTACK configures the cpumasks in the kernel to be > > dynamically allocated. This was used in the X86 architecture in the > > past to enable support for larger CPU configurations up to 8k cpus. [...] > This patch landed in today's linux-next as commit 0499a78369ad ("ARM64: > Dynamically allocate cpumasks and increase supported CPUs to 512"). > Unfortunately it triggers the following warning during boot on most of > my ARM64-based test boards. Here is an example from Odroid-N2 board: I spent a big part of this afternoon going through the code paths but there's nothing obvious that triggered this problem. My suspicion is some memory corruption, algorithmically I can't see anything that could go wrong with CPUMASK_OFFSTACK. Unfortunately I could not reproduce it yet to be able to add some debug info. So I decided to revert this patch. If we get to the bottom of it during the merging window, I can still revive it. Otherwise we'll add it to linux-next post -rc1. Thanks for reporting it and subsequent debugging. -- Catalin