From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CF6AC5475B for ; Mon, 11 Mar 2024 12:12:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D917C6B0088; Mon, 11 Mar 2024 08:12:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D41896B0089; Mon, 11 Mar 2024 08:12:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C2FFE6B008C; Mon, 11 Mar 2024 08:12:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id B335D6B0088 for ; Mon, 11 Mar 2024 08:12:43 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id E0B6F40A05 for ; Mon, 11 Mar 2024 12:12:42 +0000 (UTC) X-FDA: 81884646564.20.2188A84 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf06.hostedemail.com (Postfix) with ESMTP id 0C97D180021 for ; Mon, 11 Mar 2024 12:12:40 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf06.hostedemail.com: domain of mark.rutland@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=mark.rutland@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710159161; a=rsa-sha256; cv=none; b=wujDeabJBg3UsTTLlIoxQhQ7E3o9cCLqqQHJqXQjEX7H78GgIlIaQGVm1aq+q2QzIWGhRj wkbKf2Ifbme3xpXO9pWHjcN42tdJUmiKuWTdQdOylDwS4YkxeSFheXRFntn2JTVdJ6+CwF UMFNXMjGX1Us5ThPyC/zFldxs7jB8jo= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf06.hostedemail.com: domain of mark.rutland@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=mark.rutland@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710159161; h=from:from:sender: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: in-reply-to:in-reply-to:references:references; bh=KLWDAD4kGWBu2D124Da6J8yifvuOT0b273jrgyXbZn0=; b=T6C+pON1Ifsg6R5g7DXwEWPelpoFjeNd/nOvj7ypCdOaQM7mmyZcZsYgTlkSglYS2bFOYt qKhvLd7qriFyQr5k/lqOjQnaQFhjhfZTjKgWMqzSFH6bZUWsnqLMX8zp9PI1p6iN6OeK/e EawbQanHTSEzp9xmTnYBOEG+UiG83+M= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C647FFEC; Mon, 11 Mar 2024 05:13:16 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.70.189]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3C3EF3F64C; Mon, 11 Mar 2024 05:12:36 -0700 (PDT) Date: Mon, 11 Mar 2024 12:12:26 +0000 From: Mark Rutland To: "Christoph Lameter (Ampere)" Cc: Marek Szyprowski , Catalin Marinas , "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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 0C97D180021 X-Stat-Signature: 69zkkbp6rfb5o6633dk9855xy5zbcuob X-Rspam-User: X-HE-Tag: 1710159160-417882 X-HE-Meta: U2FsdGVkX1/mDhHykkQPJSSg6ReNANtLMCADg43dwhW45xRZHPmC8DUWaWtJ+l2H7Ao3xUhhQ2rQSIbeg/z4VmikdTWxgX1J496GIlsnxM9I/c9M1Hf0P4MPT6XVt1OQX0zsuanE/WSrg0/OjlLoMzha4AZSTZyYsZ0RsYlIbCQx29m/yA0Y8hRsaUJd2nTrH37KyO6uvCfw2Fm3LRsLubqd6fX2xBfBiCIbzDOqGro1aEk/eb8yxwKRuKTLU/bUDZmNoppRUoJnHoQnw996G24I+UDcgKntb/PLh0l3b7jeu9WvvqVRQbRcSauc7uOKIYLjBKnRasD1o4PuDHtBGQ6YpslcDtbV5sTKkHWrSCbkl0Ew5FZoYxq/kPLN102SXOB7b6WLynzByS1e3qgYXwEXM80EXCcIwBTlRVRE263SkR7PNujy333SxgkuDq9AQJzhn1uBLMIgMRnKK7NVXAmWnQmkxnHoE7ngMnfRWULp6oXK+5Cvk7clA1V49k2Dz19xWlhVEZB4+Do0qC4DYpzYKDhG+HXNLBrDJa3LZ7TTDyCdlgTyr56mFTrFDL/kC6Mw4Pi8Ihf+LStXqqOn4yIhtQpf7KmZmCXTn79qyRCrmKNXRCVqNXhXIg3su24GABBWo3jrdtnYEPjapsygy+P3X15mBG2EMzF0SJqC3xmS9zZVqWr43MUEXm8RLNgY0xrubg8V877KOpJijOensPd0E62PivZQd6h2x7hhxPOTEhPGnc+wny6qX3lPR3NerYldDCUS20RM26vgvYcm+ASuMdADw5gUw3j7C+L06PYFmzKoLEEuOYRCMTlwf9H9OMc+7UL6FdjFxcAQ0KkTykNXCESejpj89Nsdpx+s4b3KGDQOjRTCPkAjlnl2dBYt+t0+orwfBhpwYGkQLdh3gNdVZAJqG7+xLfD2P3nZ9mlnhxxzdzRRBeR7hV9sItiGmSX7RaSJw5Eugm5AHFz DkioIkLL e7uBTL92TEQJSEv9CSpbat19T05QmFYx5VdgkvZ7er2yjtWdFNxA+820OGyNaBwrEsf8cbraEllVcxAtiUo8B8drgNslkQWTqidJoNc0kbM+bDcr32Zdg8EDrC0rQDgolpCEnE0RuxFyQV8ZOxsJ0fdBS9w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, Mar 08, 2024 at 09:08:59AM -0800, Christoph Lameter (Ampere) wrote: > On Fri, 8 Mar 2024, Marek Szyprowski wrote: > > > > > > > > > It looks that cpufreq-dt and/or opp drivers needs some adjustments > > > > related with this change. > > > That's strange. Is this with defconfig? I wonder whether NR_CPUS being > > > larger caused the issue with this specific code. Otherwise > > > CPUMASK_OFFSTACK may not work that well on arm64. > > cpumask handling must use the accessor functions provided in > include/linux/cpumask.h for declaring and accessing cpumasks. It is likely > related to the driver opencoding one of the accessors. I took a look at both the OPP code and the cpufreq-dt code and it looks like those are doign the right thing w.r.t. cpumask manipulation (i.e. they only use the cpumask accessors, and use the cpumask_var_*() functions to dynamically allocate/free cpumasks). Maybe I've missed something, but superficially those look right. Marek, can you try reverting this commit and trying defconfig + NR_CPUS=512? That'll have CPUMASK_OFFSTACK=n, and: * If that blows up, we know the problem is independent of CPUMASK_OFFSTACK, and has something to do with large cpumasks (either a driver bug, or elsewhere). * If that doesn't blow up, it suggests the problem is related to CPUMASK_OFFSTACK rather than with large cpumasks specifically. Either way, we probably need to revert this patch for now, as this won't have enough time to soak in linux-next in time for v6.9. Mark.