Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp360729lql; Mon, 11 Mar 2024 05:13:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXfPQcwXeWqSCav0V6RKyhUU6KoRXOVABCfZDpJPcib8TWT6iWxcSjL9wgJflOyHSREvJ5195Ol1s3QPTaFPG1T/H7gMvqsLogI4VVY4Q== X-Google-Smtp-Source: AGHT+IGPtPoXPqBCY3bGElG9yda/omABv7FpSvtvtFs0eK4VmG3Of9exu6Yh667Tib+WfDk5MFVh X-Received: by 2002:a17:906:1715:b0:a45:8a13:447f with SMTP id c21-20020a170906171500b00a458a13447fmr3569953eje.5.1710159199040; Mon, 11 Mar 2024 05:13:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710159199; cv=pass; d=google.com; s=arc-20160816; b=rDkk9H0Ewzz07oBm4c+XbDHiVuwN1UL1voDatwjLYnGppj+NNOTZhbmlm5vBVtET9k xc4nDt5ABxvgn1POrQFc9oLsxsH5UWJhEcspxI3sihX6dr6g+iluhkIAgh5pcpNIsUyk 4RllHw2ks1rWdYvLLwzTU8cz9ljTICKDVkDDjhLbL5j/IRuEcl2/OmZ6aAPnCX8qT9cQ Tra1oeQwXOCxEBy+3ufTFTvOYVoAEbvt7iCFNuOoitX84LXWEjy+v/2QztdyLxC2R3wd p0oFsvTIHt4aAnbAM+QYk0wAmyMOHnCPpvalI0etu10hovs7bZlSGmRrFif1AJXBye8n Lipw== 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=KLWDAD4kGWBu2D124Da6J8yifvuOT0b273jrgyXbZn0=; fh=hsjZjHQTs4V36LFKfGTNAfIu7WkTeJg7oU/mgy7gZ0M=; b=KEp4R2uvikdXKfkI/acxHxZOK475rtTe+Obqtjur4Aw9HAykBf6q1KPREMoI1ILunc y+lSATXFV7CbgOXuswPu6uMRG691UMDEdm9pD5OTfXdiMUUeYANxj8cuez378oEqKmKm 2Z8qeLH/7GIkV9zXJFeLpjY/fd7BgHGx9CvGGm438QvcxIr4sKm+FLhzUFIIWFyJBaQJ 4RlV5wnrcgAvF9Nq/8edWG01owWitPp9KoFhpCdAIhGas/IBJ8hKU1LRQFyU63yd7mru kHPW8j3qNlXBwVn9DZgYKiGuJwDNhG+wgBvKd4HcaaI2l9C2zxvTJf9wcsk5ATguA1Kz SYjQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-98810-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98810-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. [147.75.80.249]) by mx.google.com with ESMTPS id 21-20020a170906309500b00a46272e480csi889746ejv.82.2024.03.11.05.13.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 05:13:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98810-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-98810-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98810-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 BF4F71F20F9C for ; Mon, 11 Mar 2024 12:13:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 764C63C488; Mon, 11 Mar 2024 12:12:43 +0000 (UTC) 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-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 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.