Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp541766lql; Mon, 11 Mar 2024 09:51:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXjoWeeTaW8hFjwKrNWU1CodexfwcIelBENY45d7CxR8xWMnUiyADA+8lSQbolk7biV2wnzUQaWUOQl8tHdAjBNodYv+KBct7s6jniaNA== X-Google-Smtp-Source: AGHT+IEEk3M2bvEqQwv9bKddnuCNadCrS9WPyfuHGWHHWpTxPkTCuJxxhKRSX3tdbISFwQQiQqmy X-Received: by 2002:a17:907:3f0a:b0:a45:5313:bfb3 with SMTP id hq10-20020a1709073f0a00b00a455313bfb3mr5244156ejc.40.1710175882046; Mon, 11 Mar 2024 09:51:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710175882; cv=pass; d=google.com; s=arc-20160816; b=F1mQmAF6+dd8uAcqFfsaiwjzZSpD6w4WhqDWunoPOOM+9lXlddEuqEWdzOqwtiu2so GK9RTPcxTr/nFbxszelMAdq04WM93hkG1sM1bO4W66tLpw5iTi+D4VtIkKeMo1NLLECC UIEUznqF7svufjHGLIIgtxu4Q+xZGbsoiAWZFSMqtA6h0ljTzqf41b+kA5/nVvI0uliU RQspt+wFfhAJBuXqI0tzYLPJ5Lytbm/5fRn7fqZ/SbZIJcXHKK2wZccO9wXK2ScseH2G fuMnQilKRpOFZjPbiavOL0MH8em0D5uaZWF1cxmdEFWLUmY1Dv2mOiJwjujX+JP32STl BqDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:cms-type:content-transfer-encoding:in-reply-to:from:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature:dkim-filter; bh=Vi9mqEbEYH5UErZGlgVb79jweozgjkT+UlULfp68xt4=; fh=3/7ArYqdb/XkENbB5yImQ8WEfPx3MdMwN3mV0l8kSH0=; b=GmwAkCwSAvEVqrFINtKSyDACK97643WLTmbWC55PPWjQragcvttj6te28VV++W+Hg5 R15bhTFN/vtsgC0ima1N0yHT8Lkemr5gvMqwJu/nybtN0k2PBvArOIBp7b/3U3ME6eOL fRtdSzcphyoshslwAjNobM40YkadhE04GlDqwoa5+Pk5kyRKoYESE/NzpknPidUYqjou flASwBVh5BXkSLSDUBtgCY3rgcQF/6vxzaFfNahAZ9gwbsR9RSxBMs0ue6ijj45+G6/1 ALXwPzOegnU6NSZR2sXmqhriABihtJJqxuaqf/u46sfBEvrgYNEFLiYYL5dBcL8x1wSz 6aPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=WJcB55+c; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-99272-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99272-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.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 c9-20020a170906694900b00a43efa2c95bsi2592855ejs.809.2024.03.11.09.51.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 09:51:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99272-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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=WJcB55+c; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-99272-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99272-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.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 7E9641F227CE for ; Mon, 11 Mar 2024 16:51:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30531482D8; Mon, 11 Mar 2024 16:51:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="WJcB55+c" Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (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 1110B4594B for ; Mon, 11 Mar 2024 16:51:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710175872; cv=none; b=VliVZuCrYJcyFRqM6LiCePrktb5/7jvAMliigjx9xuyM8RSruV7dx6hn2ui+vx+BE0+lp93787ZLdSr3Lex6C+H9bDJZGIPvMr+dUuF/pLG99iwTm0eFZV75n6ibuIM7f7dMJYl9MQmFdEBL7Lb9s0xfy9Cjh71JjZcr1im6h2c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710175872; c=relaxed/simple; bh=L+hP3J9w7TVemLYSE/M0D2h13kOJTurWbr3SO4jI8Hs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=GHxhva84PApDB6by8N7Ntpd4q/mreM/TlKZHg7xFOJbsyeSdfq2j/p6RZsFcE8t54Rg1sy7HDmmEMR9pzM1H/Ysw4kSo3eOUDceKiAFxURkH5XRsNL0npA073vaaZpoy1gTAyl/bRrIt3+EtwZDN7hwIFalOY+Ansf5xsy7JyP0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=WJcB55+c; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240311165107euoutp0173da651116376dcfd20eda16ca1f4bc5~7w_QPj6RK0965009650euoutp01b for ; Mon, 11 Mar 2024 16:51:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240311165107euoutp0173da651116376dcfd20eda16ca1f4bc5~7w_QPj6RK0965009650euoutp01b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1710175867; bh=Vi9mqEbEYH5UErZGlgVb79jweozgjkT+UlULfp68xt4=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=WJcB55+cmcqjGu1+a+a4X9cgGRcG6ze/0lPK84xSmS9IoD21ZvhgNEPj+oKKE2AO4 nvQqQi/9DtM+lULe4n4DLMm0xM3Un2sxe726A+KbEOMb4Gkj7vkLMTMEs4AZzgkaPX 9MgF2ug/1b/+ZaXfSXMMNl5T3/mygsZLZu+fAKKY= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240311165106eucas1p22bd86ad0e3b0a2d77b77fe8d4ce0a18c~7w_PCpnL22314023140eucas1p2O; Mon, 11 Mar 2024 16:51:06 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id E3.07.09539.A763FE56; Mon, 11 Mar 2024 16:51:06 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240311165105eucas1p10ffea50ffb9581c61818e66628fdafee~7w_OjQxeK0826108261eucas1p1V; Mon, 11 Mar 2024 16:51:05 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240311165105eusmtrp1b2d135d8a79edf681de0688224c0e22f~7w_Oihxew2079320793eusmtrp1K; Mon, 11 Mar 2024 16:51:05 +0000 (GMT) X-AuditID: cbfec7f2-515ff70000002543-5a-65ef367aa56e Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 09.60.10702.9763FE56; Mon, 11 Mar 2024 16:51:05 +0000 (GMT) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240311165104eusmtip2eb55a56d190fd53be45bb715c73da79d~7w_NZS4mH2032720327eusmtip2j; Mon, 11 Mar 2024 16:51:04 +0000 (GMT) Message-ID: <8c8aea4d-e911-44cd-bbec-ead4e44d338a@samsung.com> Date: Mon, 11 Mar 2024 17:51:04 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512 Content-Language: en-US To: Catalin Marinas 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 From: Marek Szyprowski In-Reply-To: Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA02Sf1CTdRzH7/s8z7aHwfRxmvuede5uHXVWYJwK30vjLCmfKz3huP6pzLbx hJyAu21U4p0uAkpgSNTc2G1tGQEHu4gpjrQEJjk4GPHDNtwRKMySxRCcJ8zljPFk8d/r8/68 v9/35/O9L4kLtdxNZF6hmlEWSvMlXD5x4Wp4MKk49Q7zYnmnCJlabVx0uVeO7jRUAeS9PwtQ 1x8jOLoVbeCh5m88XGSf9nDQ6EUTF03YHnFQSNsDkFP3M0DfeYcxFGlYxNDskhtD5ns6HHXP +zko6mkjkMMSxtGMb5xA525c5aLS8R1IW9/H2y2ibV/bAD3qGcbp0p4gh7Y3n+LS9ru1PLrX ECFo/zU9Rp+rP0kv3PIRdOXoGI92jTkwOmTfnJnwNn9XDpOf9yGj3Jr+Pv+wW3cdKNrXfjwT OY1rwEhCBYgjIbUdTlRFOBWATwqpJgBdlr8xtrgHYFm9H2eLEICfTp/nPD7S3GRYYSHVCODZ gWLWtACgs6WWiDUEVDpc8NzgxpigEuFPPWYOq6+DfXX+Fc8TlBhO+gy8GK+npDDgsOIxxikR 9PktWIw3UElwqPwrgtWvcaAvrI4xl0qBFcGKlfvjqGdh3UzJvx4xdARNODtoCR9GK2mWM2Bn 9bcYy+thwHWex/JTsP/LKiK2AKQ+A9AamcTYogZAzZ8+wLp2wvHBB8tp5HLCFth6cSsrvwID 1a28mAypNXAsuI6dYQ2svaDHWVkAPy8Xsu5noNH1/X+x3UMjeA2QGFe9inHV9sZV2xj/z7UC ohmImCJVQS6jS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bp4C6xMyXTSwQk8wkurZ2MULY8hLb385hnsAoNAvJIbOQLJyFpGUW kpYFjCyrGEVSS4tz03OLjfSKE3OLS/PS9ZLzczcxAhPLtmM/t+xgXPnqo94hRiYOxkOMEhzM SiK8r3XepgrxpiRWVqUW5ccXleakFh9iNAWGxkRmKdHkfGBqyyuJNzQzMDU0MbM0MLU0M1YS 5/Us6EgUEkhPLEnNTk0tSC2C6WPi4JRqYMrmOppQM5enJGbOT87DUzfrrV4f+VK0LLJ/0df6 mN8J213WPtRoe3/w3M8IoxqZSTaZtr/DtC5Jqd4s2u+QvuHYVtPkI/c+Z7HflRALlpbV0nht OPn9VgWps7umlzf0Ldka/VpKdof6/d3hwbe9jiRy/ZW9dpDr6ZWat0/LdB43OsZ1TZSzl6vn ln3xJHFWom+t6navgDM/g1JvsU+0NjP6cZN7Sq3XlCMPzi8S89vG/XJu8/LVjyu6nrt6rw37 tHA33xS3Bl8JnTSp77FVRf1RzyebH5gSXPMq/Ob9bMGo66e0JoqvsOj44161gqGz/61N0t6O uuMZSZ0T3Z90lM/ye/TY5Kd7kc2ziD1yK5VYijMSDbWYi4oTAdOnA2S1AwAA X-CMS-MailID: 20240311165105eucas1p10ffea50ffb9581c61818e66628fdafee X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20240308140130eucas1p1259c805a0b6491ce2f69c6fca0264b1f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240308140130eucas1p1259c805a0b6491ce2f69c6fca0264b1f References: <37099a57-b655-3b3a-56d0-5f7fbd49d7db@gentwo.org> <8abb1a69-6cbd-4a36-ab1d-d269cdafa391@samsung.com> Hi Catalin, 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. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland