From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF7B63EA98; Mon, 11 Mar 2024 12:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710159163; cv=none; b=QDXaUmqeQTQMZ7zrgtNjbO6OQPrzbAlTCyVCG973PBOaxQiKMfzhBuVTK8ngz53sFmNCW7yc+f7/6V4R2S25pBNs/x+UdyzRbO/OcMo7tNKcE76jYoWNYn9in8/1q8DT8TxFJqT9ONO6S3ukP2gSQ+7PMUhma2R+Gj/dLmJLCCo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710159163; c=relaxed/simple; bh=uxZErM0jgyMEjgSg8ZtooXrgoEQobZPFoR0f71UenBk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IMTz5wnoVicRjPJaz87jPt7jw97v5Z0FfOVhF+qsFmIYA1x28jMhAKhgWU0JBFIQSrlW2/ckAzIA5PpWTzypt24pwdi9ip7MOLVH13YPRRpZBkE5yMKvKqX5AOo7yPIfVVamYDAPvSYxXH4LF94YSzYo/axzcKx/QRIqtVoUqJM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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> Precedence: bulk X-Mailing-List: linux-pm@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 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.