Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2812935lqz; Wed, 3 Apr 2024 09:14:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXi5LILBAC+69+4JgiHKHt2aKcRr+trOIVcFTgfL9f4SCJ+dpX2YdWQltGZpsUxJoSjPauwZfegMb1xfiepLKXU7EIx0P7Q3vAmarhe2w== X-Google-Smtp-Source: AGHT+IEV4GMohxsCifTKVfeOi8M5LQoejy3RNU7XvBwY5TXBGriQO3a2RdR14/S8GdKpE9u1MsxX X-Received: by 2002:ac8:7c43:0:b0:432:fea2:8072 with SMTP id o3-20020ac87c43000000b00432fea28072mr8437568qtv.20.1712160889888; Wed, 03 Apr 2024 09:14:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712160889; cv=pass; d=google.com; s=arc-20160816; b=ji4w6h/WJ5HG5vNVbNfetGade0CGfInHI4Kwwh6BQFJMspTqnBwYIDvZaWxQqJnSy/ CIKpCU9fFoBHqMVYOr+hBR3N+VpYnPehOSUTF0LrwEBUzBsdL6SoetsrNTbxyyZO/za7 Kj4SbJX+dcdVQLFXLaNRaY1vzdB1ys3Rc0YX4hHMGY+WffIw1CPZ7QYJaLFREyGzIvsz PTPJPGsWMbpsehQ6daUR0140J+i+PXzyhUQKEz2ZCeYLhZDM3oZ5dDPDiwcB1aj8r4KJ LmHw8Lf1n8MF6xuyGnsUxPajp1d8UYIXJIGk86quqqxX36olT134YkAo0rwthzQ/Tstn hqkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=/7RIW/cebaDZASP8F1aijTFNcx4ZLh8bKU1r8IihfxU=; fh=qF9Svp3Y3jeuFiaTCY77HHk/7p5Z36sAabfdbU/mH2U=; b=PQ3Y2dsI3aRmr7+MW4uU7sXzwYgA7/a0BBQrt+km8OoojSE3NU9sepzuhzJQ3Hj7CA q8NWSLynyYYr4BhSkD6dHtt2dqVFkEaj3RF9Pe2FoWE45Lv8E1l4Y+L0LAZZkhyf06X6 EpJE2r8kiRQV9nzuW1fL5kYK0ZYrunnCUZcqIbsqOvnKMYUKaiLkXEj9zzGj0o1xKJji YSs7PEz+k+Ur/h9++2gURCCdkUzFtEpMGHD/iHM24jwN/a7d8sQyumawcMfbcUHtOqFM 7Y0UD+2MGBctpOrs8VdT6h1+FEHcQnE++LT9c4EXrLChTZCu2Z0FGL5CMZKVGkXf+YyC 6OEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-130176-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130176-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 3-20020ac85703000000b00432da47b5d7si9143787qtw.103.2024.04.03.09.14.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 09:14:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130176-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-130176-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130176-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B6D831C276D3 for ; Wed, 3 Apr 2024 16:13:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CAFCE14EC5B; Wed, 3 Apr 2024 16:13:27 +0000 (UTC) Received: from smtpbgau2.qq.com (smtpbgau2.qq.com [54.206.34.216]) (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 877973D96B; Wed, 3 Apr 2024 16:13:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.206.34.216 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712160807; cv=none; b=MwLJqFrPMp6SG2Bcl1ouO+sg1VhBonULxIlhFxR+JbSHCPrBb+QTONKbXnXANPFNeNhi5tAmQT+sKsPP19MsdqGmShkBEn5a/zvFEZwObN3h+na3bb0+8CLQYTCMyjI8ZpTYFoq5L3yYIfazztoNvssV7eoRAZoZKb5sEA6AUDs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712160807; c=relaxed/simple; bh=U2g+9sCqmUZQJJQi6TnXCI2sXHoZ1gVewHiZfEHydQk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tKHgPCcBgx3XT40q0HO60ZZXHBl+VpONUhlCeMAA33LtFn0D7F3NpB+AePZGt6Ko4PCmDagmdd0cGCdiadTeI16CzvWjfCt/QlQT7XsDwanV5Xh2OtIKu7aSZH3GOnS3CC0trn1sW5Lc5RigIqnCvQ00I2Gfq91sRJybX6UXnl0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn; spf=pass smtp.mailfrom=shingroup.cn; arc=none smtp.client-ip=54.206.34.216 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shingroup.cn X-QQ-mid: bizesmtpsz12t1712160713tbgjzf X-QQ-Originating-IP: +cdGCqhc9XLXPV1xZHXG+yJaAHZ4lfeDteMTgsseDHM= Received: from localhost ( [112.0.147.175]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 04 Apr 2024 00:11:52 +0800 (CST) X-QQ-SSF: 01400000000000704000000A0000000 X-QQ-FEAT: DoD8xN2rKow7K9mxo9zdVlLyDzzKK6iu8xNUc/iF96AuScOXF4+/sBdF/a9hz IhLjBwMhjiYP2CQE+gZvlO3r0le/JduQCVeA1LslTnrTZ3mxRqr6Hrblcl5Nl6sP81I35UI 2mr6A9kWQR2TzF4iFX47dR1pUfybV23GVonLPgJYQZC6WATR0qBO7vF2rz15Hp3aEwV6RVl Rw4HExZVMEy012Z/EoWKRl4JXk/LJkvTuHW/BCGOHnhAqPyQqvwUZ1iEAS5w+26tkyYujg0 AnR/BfrBs9jlbtHtsV4OH/rL46183JtGluUDwM6yAmTnMyh8VVDNgMJr38rD06wqZJrzHcv Wot9SLoaSTD6ABtuqrtpW+oRTNnBBdEVf/5H3AaskpwLD7/1r9x/ffLlSY2SA== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 13472035299235303404 Date: Thu, 4 Apr 2024 00:11:51 +0800 From: Dawei Li To: Mark Rutland Cc: will@kernel.org, yury.norov@gmail.com, linux@rasmusvillemoes.dk, xueshuai@linux.alibaba.com, renyu.zj@linux.alibaba.com, yangyicong@hisilicon.com, jonathan.cameron@huawei.com, andersson@kernel.org, konrad.dybcio@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v2 00/10] perf: Avoid placing cpumask var on stack Message-ID: <5BCB924A8FA6320A+Zg1/xw9C493rZ868@centos8> References: <20240403125109.2054881-1-dawei.li@shingroup.cn> 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: X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtpsz:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz5a-1 Hi Mark, On Wed, Apr 03, 2024 at 03:41:07PM +0100, Mark Rutland wrote: > On Wed, Apr 03, 2024 at 08:50:59PM +0800, Dawei Li wrote: > > Hi all, > > Hi, > > > This is v2 of [1] and [2] which basically eliminate cpumask var allocation > > on stack for perf subsystem. > > > > Change since v1: > > - Change from dynamic allocation to a temporary var free helper: > > cpumask_any_and_but(). [Mark] > > > > - Some minor coding style improvements, reverse chrismas tree e.g. > > > > - For cpumask_any_and_but() itself: > > - Moved to cpumask.h, just like other helpers. > > - Return value converted to unsigned int. > > - Remove EXPORT_SYMBOL, for obvious reason. > > Thanks for this! > > The logic all looks good; if you can spin a v3 with the updated commit messages > I reckon we can queue this up shortly. Thanks for review. v3 respinned: https://lore.kernel.org/lkml/20240403155950.2068109-1-dawei.li@shingroup.cn/ If it's going through perf tree, do we need Acked-by from bitmap maintainers for patch[1]? Thanks, Dawei > > Mark. > > > > > [1]: > > https://lore.kernel.org/lkml/20240402105610.1695644-1-dawei.li@shingroup.cn/ > > > > [2]: > > https://lore.kernel.org/lkml/1486381132-5610-1-git-send-email-mark.rutland@arm.com/ > > > > Dawei Li (9): > > perf/alibaba_uncore_drw: Avoid placing cpumask var on stack > > perf/arm-cmn: Avoid placing cpumask var on stack > > perf/arm_cspmu: Avoid placing cpumask var on stack > > perf/arm_dsu: Avoid placing cpumask var on stack > > perf/dwc_pcie: Avoid placing cpumask var on stack > > perf/hisi_pcie: Avoid placing cpumask var on stack > > perf/hisi_uncore: Avoid placing cpumask var on stack > > perf/qcom_l2: Avoid placing cpumask var on stack > > perf/thunderx2: Avoid placing cpumask var on stack > > > > Mark Rutland (1): > > cpumask: add cpumask_any_and_but() > > > > drivers/perf/alibaba_uncore_drw_pmu.c | 10 +++------- > > drivers/perf/arm-cmn.c | 10 +++++----- > > drivers/perf/arm_cspmu/arm_cspmu.c | 8 +++----- > > drivers/perf/arm_dsu_pmu.c | 19 ++++++------------- > > drivers/perf/dwc_pcie_pmu.c | 10 ++++------ > > drivers/perf/hisilicon/hisi_pcie_pmu.c | 9 ++++----- > > drivers/perf/hisilicon/hisi_uncore_pmu.c | 6 ++---- > > drivers/perf/qcom_l2_pmu.c | 8 +++----- > > drivers/perf/thunderx2_pmu.c | 10 +++------- > > include/linux/cpumask.h | 23 +++++++++++++++++++++++ > > 10 files changed, 56 insertions(+), 57 deletions(-) > > > > Thanks, > > > > Dawei > > > > -- > > 2.27.0 > > >