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 6D5DBC5475B for ; Mon, 11 Mar 2024 15:22:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F3C206B00B8; Mon, 11 Mar 2024 11:22:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EC5576B00B9; Mon, 11 Mar 2024 11:22:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D65BB6B00BA; Mon, 11 Mar 2024 11:22:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id C4B326B00B8 for ; Mon, 11 Mar 2024 11:22:11 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 7A7AA408CB for ; Mon, 11 Mar 2024 15:22:11 +0000 (UTC) X-FDA: 81885124062.13.B2A4E22 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf04.hostedemail.com (Postfix) with ESMTP id E509640017 for ; Mon, 11 Mar 2024 15:22:08 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf04.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1710170529; 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=QZ9PBnhb/9y1OyYEPfyUpBVFzFxzskvKf0UUU29BQ7I=; b=Vai7qzcACNaWuz3BzLxEWAOSqhGWeZ6tgmPaFGa6JxzTkUKdORxVJz8HUNgqABtue42Qxh EeKKQ/0D7VchvGMyuoRvENLwiFiXiSbJXImS6U5VCpgobhC0sUEQdWtyfo5usWxopG/sPF O+l9uwUm2kwMBv3xlpfXRDPSi09q6e4= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf04.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1710170529; a=rsa-sha256; cv=none; b=IrRxIrwvmf8qVlxIzx22Bh1mmLMay/xmgKj5ymZnFZ4mo4IZSv/M7e9vSQt2Nyw9+AbyoL G5J57cYuiiQr8nqqbCy5Lc0mlaQnz3ZAaZtQ8aQ7I2nUFXxsDdUrSnUG0nHvKtsw54WbHB EeDl1vtvT0O9GaqtrO8EMzqduurbhO8= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id BD88960EBD; Mon, 11 Mar 2024 15:22:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 399F3C433C7; Mon, 11 Mar 2024 15:22:03 +0000 (UTC) Date: Mon, 11 Mar 2024 15:22:00 +0000 From: Catalin Marinas To: Marek Szyprowski Cc: Mark Rutland , "Christoph Lameter (Ampere)" , "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> <8abb1a69-6cbd-4a36-ab1d-d269cdafa391@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8abb1a69-6cbd-4a36-ab1d-d269cdafa391@samsung.com> X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: E509640017 X-Stat-Signature: 3gjkuqqz1fuo69e67xs3m8pqytjrporj X-Rspam-User: X-HE-Tag: 1710170528-800518 X-HE-Meta: U2FsdGVkX18uzDSEGEgNxRaWlo612vSYZKfyxdybs1E1XRRliDDBRzN/L3eOG5lENy6SShsTRiXYQZQRyHjJ0RvzUfilGn3MOd0HPijNdnLwUHtg9z28bTng2cY60fO/DJk2r8z09o6oF+mIomnsaGH0DcOhKvi2ekW60Qni7Fep8gjl7Iq0JOzscnOGomtURbT5mc+cXWlmNbsGPudITpePMZwKDIk9g4TR/ijACnCtZSww1UkUyc1VTeuda092SwfrH7xSxOgD19YiYtAWEBTNZxcG/k93EgdeFr0P4ng4Fuq6xZVAHLp5SJmHBNfbIpn04+iUHfPrje8rbgbpji4SyEXPvw49sPPFKpRTQ6ta3XGDFEYAYFuHofY99ZEjMjKuqdrQ4TWEPZboWEwhGwKyiaQVngbVvDY8aTA6AjF1pULj9Ws5ve+OYuRyRsQ+WulonZm89YL2HfSPeO3JK96Rnsv27bTBGv6DsF3ataPqCZmhm4Q45ur2H0Y+opfBvYuGAc6HIaz+Gf+sgFShX39LGJW/trPzyE+tbsNXtzuie67CXkRsbTE/Eafr8LJlp3sIhkMCUW7rbfZRm2zNl6TEYNnV3Ka2Siq/qM+nMx7MnK6RTCjkSt9ws2K1ZDcyfs6h/IMoq9WBGsYHcPYFG94bTfgsXf31FgQd46Qlxdv+XQ4w/qs32sVdWdl8wxEFxyB116B63h9pqSxUW3IgJTn//+rvfh2CMQIGN0laYLm3bmBC8Jqjv7iUIuT9pVPl9rttC9IKQFcbI1+7Sk88tVF5/h6KaHiVIGdQl2wd30qjjfGChKGeZwBrQ0vonqQ5hS8HdX/CeUjQJ5EbC0K4+skbbwHzWswyTQ+XHVutKau0hbERIisTjAbYwRCfOwo+xK0RTQ52uV43PMlGlSbbCMewkSIbh5WY7zIkk3xlIrib7mVdoj8wLOBJleyU2bWR3r/0HONmqvJtw5yhl1y 3jyqm6fZ IN3gab8Ie+zX9T0747ZqRVHVBMoORtjwgM3DwnZ+L9CQ4bFBYa+T9LO3qxXA7sF5jcgGeDzdSDvpakud+30+j7OSChvBaqeyrljzQc6yFhlYc8hru3ea6OK1ekzyld8w4cR59kpB+3cI1jZvO3/Ts84R0OSo2F1cHhKLakXA7Urg6aAMpI2JJVxNCWs5kPCQkCAe79OWiGAkDsXi1kqfhrAs9wclLMlWouYeIscC1oMY8fRkBEM6L1TRrjT9SwpUXO9XSSrc5gnLXgzb7qbVRae+eRu8g4+UKw3RfKELZSwOcUwg7jjnpuPZbBVWU5yrWi52RVrLa+9yvB0qlIhRf6wD1udrSSyeJdSCiO3khBTFwwl4= 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 Mon, Mar 11, 2024 at 03:56:37PM +0100, Marek Szyprowski wrote: > On 11.03.2024 13:12, Mark Rutland wrote: > > 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? > > Yes, with $subject reverted and CONFIG_NR_CPUS=512 everything works > fine, so it must be something else broken. Thanks for confirming. Would you mind testing the problematic commit with CONFIG_DEBUG_PER_CPU_MAPS enabled? If it doesn't show anything obvious that can be fixed quickly, I'll revert the commit and queue it again after -rc1 for 6.10 (I haven't sent 6.9 the pull request yet). -- Catalin