Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp491190lql; Mon, 11 Mar 2024 08:32:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUFoRf5DBUGTCc5cxliJ2gb9XG1T+lLPxRqtu40YjLbv+nKAkjRVX1a4LZdx6Tvl04JabCitrdD7TuKIITwA8WTqcnHKNukEoBklkYWGw== X-Google-Smtp-Source: AGHT+IFlTTZLaNNsFEcFlhtduNOcfVOdbHG1L7LA5YrC4BNiptCZmNeRoXJ3gVwgq0Y9h1AXHW8Q X-Received: by 2002:a50:d656:0:b0:566:9fef:1ee9 with SMTP id c22-20020a50d656000000b005669fef1ee9mr532828edj.22.1710171167088; Mon, 11 Mar 2024 08:32:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710171167; cv=pass; d=google.com; s=arc-20160816; b=CCOdiV/XEkuqOfCOPAsVYHLrTQTS5CpjjOzQ58JM8koYUYV/3hUkBuIeud+/3C7sH2 kV7O3pmwp4A1vuWZNfVRDNaS//5ufAYo+E8XEjB2ENTt5h7J7/3ppgeov/vEskOGUmx3 +c1c6J5o+LPTCEzKZxiMuJk3uHDIYwj8wsXeNkU5XDMn+LhZeNAt4oUJ7ZqhxcTOMXY+ W/5/523OPdsh15yr1JQwEZZSEG6k8h2NeBAUq57fWY6JvbI5E2lfsXzXtYFjIpxfqqio V9P77bMepVtNZMs9dluEcV5BTq/83yHsDIUfOLBNbhbbii/nDhyleLmVKsuu+9klT0NP u1Nw== 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=QZ9PBnhb/9y1OyYEPfyUpBVFzFxzskvKf0UUU29BQ7I=; fh=wA5KQS2WXJjXhd3+XQ6zELAxc0LEY7dSYYZsc793uEU=; b=M2hMunrRuqrIrFk/Ft8YVwFxEGQ1Vc0BbQFeoHRbTo6DLwQPWxm5rtX5yiwRq2mHgy vWusnvcAP3N7h0+T4OxFIku9oYcTu36kJc4bPN342jLl7zj7OykdoApvIuf/mAvRr83X NmQQ0o6c+5kOdaqwdidoNz95EZ/75rQXAjxIU6WCO+6FDLPkG9eKIEdyz6VlF5emcOnq MQMUHCrFC2sxKQr2sDA5EeKF6fOYUyX456EE35gjhwPKZ+98a9VeuN+weg+R6UDx2xR4 hXnVvVz6bf5tZAkiVVCZ1O/9rTj0n3AaKP6B+INl4OVxuIv1YZbs3tvAY1U594ZNSkbu IwRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-99123-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b6-20020a056402350600b005683051bc8csi2737920edd.70.2024.03.11.08.32.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 08:32:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99123-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-99123-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99123-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6AB8B1F22A00 for ; Mon, 11 Mar 2024 15:32:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 779CC45943; Mon, 11 Mar 2024 15:22:08 +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 F0E3A42073; Mon, 11 Mar 2024 15:22:07 +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=1710170528; cv=none; b=NVMKcUrZA2Q67G316731xgwsEVgFWlk53DD80Xs35+InBM4YCHt7b1ugybpp451YbXkFyErYiOUt8QZ4FDw1bC6avOWNdB5hvLG8ypr4BR2BVS+bHiaN6znAlrEjSjBo4dOsRqbsQKGu4B8L9xGodLGpV5u/wT2Ju56Q1N0YVXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710170528; c=relaxed/simple; bh=IEbrELXNPCnsnk0tlcdplu6+a2MvOyBflK48xsJAEOk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qDE1uMKTt5ZK8L/fgppgA/ir5zJGp4CO0DTS/Hx1HVUI4ECa4L7C2+p4aCAJizCBtzZ/qslovbC4s8SUhyPUC46o3ZdFICpa9yNQQnAqsoaesAorT4tUrIMA151zHcbpLG/i/NPMrLZHQCaEYAybbI1Ocd9dVG0y8Bndo/aPw+Q= 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 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> 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: <8abb1a69-6cbd-4a36-ab1d-d269cdafa391@samsung.com> 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