Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp554054lql; Mon, 11 Mar 2024 10:08:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVSE9UguLw/OxnyE0VceTjh3xcCFqfXVMNXdhQ6HVP4qgkSQqzjT06nshyK8Ro4izERLhcuqiDm2ryui2HpOv3IJbv6cZ/5omMtOrqryg== X-Google-Smtp-Source: AGHT+IGIVKzD9CTWnPkYOM1R+9MF5KRX1AphpNH4Qov49VvUwV1ax1Uly+iFvVHI+x/4IIKI3n+4 X-Received: by 2002:a50:8ad9:0:b0:567:e6c:c60f with SMTP id k25-20020a508ad9000000b005670e6cc60fmr7326259edk.16.1710176914504; Mon, 11 Mar 2024 10:08:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710176914; cv=pass; d=google.com; s=arc-20160816; b=DKSKqiresXdtI/47qA44fHrEdTFbktQ0/ZbRyHqotWsg+z3v6w/lMrhgfT5BP2U4RO g6xy0rb+Y22foDc6mG8/egzJYIHe16YQoHrRfslSfAU6iwEk/1K61g0n6RRsUb9IMBwq +nXpM8gQbqY8DfQ8GtIzgRdNhHNVyt8um8I01mzN27Kt0tugwnmEyUOL1SjlvG01Y1m8 w0MBtxXpAXthqWC3R8Rh3c+suYThE9ehr5m3AxeWk0Wzn4lCt3WNOfeOGmM+smBqrRe3 UrBF+cvSik1sgEnlwkphH2Ebo724fyHCZDugTSCQZtDGEn3A38Ls0k0qZbxK4CvQXZiq YnHg== 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=c+XwZCPTrjfuBeIoZaqvmQ89fpV93dVEHUHFv6Ak+5k=; fh=wA5KQS2WXJjXhd3+XQ6zELAxc0LEY7dSYYZsc793uEU=; b=Dt84aT6iBcm7y8xWqhOc7ChtHcjQjzBp8svJl/qyYAPlCMKWmf4jVU4PsKpdgB+dCf nYCelL3owgltEgONrEfC55/VlSzcvOaMVG9M7srQ+WA65nugZs19UTqd8uaGJCzpVBk3 RoaMvoE+hKACqxqfeGB0uJG8ml56sEVUwoveZhWnxKWZ1ImAn/oyCAnqB5b0DGkHLIlm YKAHhgOFmXDvxSFmFIdnz3SkNa3BpUwx61crmtHy+1MwuA0LmRjO45AS1wDlNxasOfTv VdgTJpkYmezjCfx/sQSxlqo/5/u8lCqaeIg2kj9naZaHc3Xloul+CiLftCkx3VZ4I/bZ IC9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-99287-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99287-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 y7-20020a056402270700b005683378c0d0si2665330edd.22.2024.03.11.10.08.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 10:08:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99287-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-99287-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99287-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 3F02C1F21A71 for ; Mon, 11 Mar 2024 17:08:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD9394DA1A; Mon, 11 Mar 2024 17:08:15 +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 5C7B83B7AC; Mon, 11 Mar 2024 17:08:15 +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=1710176895; cv=none; b=unYxBVr0a+RIawKxtOjaxT/Qzq32a8Al8XNUzF+Oq4NGSQHDXAc/Q/aZhAPvuMX1FBkWWu4E4O8xc7x6wvY55kns5E7aHAlj8dvuw+ADqAfiNXu+nMVYoMGAbqBHMRkl3/Zzvljc622MPhg+YgbQy17flAoV95yxhaA++VALBls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710176895; c=relaxed/simple; bh=HNlAkw3IiPqmJRmBxGEBkloQrlO/P6PiDfQ9juF0RN8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aEVXyLvu3PWjtgfH15IsDF8LICXjy+U0ZGzegxVlgMRYeknM1ZPChjQexLnrkG/OkLhBVMnzQoA+q8a7cnpSmh6GkewS6FAyTzfZqG1zpyHKKKwRYvgsGb+jeGBtr4XDkjZ6KXxhg1DCj21XYaGp9jYbe1WMFFuqI5BFkIHU+IE= 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 9A02EC43390; Mon, 11 Mar 2024 17:08:10 +0000 (UTC) Date: Mon, 11 Mar 2024 17:08:08 +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> <8c8aea4d-e911-44cd-bbec-ead4e44d338a@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: <8c8aea4d-e911-44cd-bbec-ead4e44d338a@samsung.com> On Mon, Mar 11, 2024 at 05:51:04PM +0100, Marek Szyprowski wrote: > On 11.03.2024 16:22, Catalin Marinas wrote: > > 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). > > I've enabled this option, but unfortunately it didn't reveal anything > more besides the warning and error I've posted in my initial report. I > will try to analyze this issue further, but I won't manage to do this today. No worries, thanks for giving this a try. -- Catalin