Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2769420lqz; Wed, 3 Apr 2024 08:08:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhOmMsIBRwYTuLvNWPcMVlVNqLrDcSLyLHq3CJXWe++C/T5XQERTAzud2VxctebIUWsJQai5py/eIeQOSTDtO7s0Hrh3fCS2sHGAiORQ== X-Google-Smtp-Source: AGHT+IGqQ81RkGOt0ROYZPARcWMDbt6iZ2F4Y8/NDw1edDmTtrK0IzwWFtLLzXmOl+BnQbG9CIlA X-Received: by 2002:a05:6a00:3a04:b0:6ea:be74:a228 with SMTP id fj4-20020a056a003a0400b006eabe74a228mr3322458pfb.28.1712156925061; Wed, 03 Apr 2024 08:08:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712156925; cv=pass; d=google.com; s=arc-20160816; b=syq5AdbrltPNaECZLuvitIgRJBhIGN75JF1qyn5H17hsy08VDd6AA5rPzq4cNdu8oR 8QCBUQsuc1YiRtgt6X4JjTC0Mo8r81xFGvCbmmx7i7T+8CB4jxAYCTvfyFLn4nBt8UsJ xPvwoFPaC2V85x4xsGb/Rbrqpwc/i1dI+pCw4IR/7/l57UfL6dDHbZBihBRdp4BP6Ytm +igGP7H8n4GPVvUTC1obsBaGz8aT3cpTxMEc+G4dftvDqYHyfJW7v4bYspRrNTpQCsj0 T0RYRA5Hg1aVVuga6VksC5tiOypcoDU/9d+dh2c22nKSCShkbGMdXdpyuAkOmu27CCY4 PpXQ== 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=MFsiwtRd0ELj/ND33C/ntRdee4Nss389HwmQ9DiY2G8=; fh=qsOUwQFvo38RhuS3PDiTiyDKNDaJOiHjgqt/S0c+5B0=; b=AB52ishkQ6P4JF8U9/uX7LJnzNxRJKLvQ612xWSkJR7PRKRVMxtsAIouG7LaX7M8Mo IJ38xJqm840jjR7LkunK90fJ40kEKT5v3/0cxgrbgbMbEulD1lRQI7wCR2e81PUghKDx zPy/6KKir2ier7pB+SvPjmsNFpkrECARZZplF9ZmWLavyqvaxVpkr4jm6QTBfC5ekbC3 Gt+oUhmv7HcS70ReiBrStDi9Wri3zHSk1iya352joGMOrAwlOgcQXByQXnemLwt7Kjg6 rPo6W6RdlryAYFDvst3eQgG6SmQoiadLgFemEHcxXkKbWbz0CL9eaAYzNXKednphZUhn tMfA==; 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-129984-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129984-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id lo14-20020a056a003d0e00b006eab069cdc0si13935367pfb.160.2024.04.03.08.08.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 08:08:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129984-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-129984-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129984-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8DB43B2CFC5 for ; Wed, 3 Apr 2024 14:41:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B778713A272; Wed, 3 Apr 2024 14:41:14 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DAFAB2F844; Wed, 3 Apr 2024 14:41:12 +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=1712155274; cv=none; b=QFIzgGP/DwJk24Q67+tIVwaZC3PpQ4tAN0AElW/pwlzckTcsQ8u10onpJGNAj0wqvfdBHeA5JBZIq5zgqH9MpRRhlgMucg14Q74fcISWQP6luqGRfrrcdACsBTV2cmPWxru8NEbz4jExdlgH/TPANdTBnmjO/wAnhWXqQ6ELV10= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712155274; c=relaxed/simple; bh=TizX/0d3kZYQ7oCRlQaPoWdE4T4ZHB1B1W0Y6AmHxnA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OJy4eSdxhwHzBotoDkh42QBFIYYM1CdIrUH+7C7clrpurHAtRjCqTVO1VCphEDB5skzpyIIoPld2ZDUXcC1tiXKLFFpd2CnO2jQzlxQnLUu0nrL6mN54oZCiWd54mHB2F4MtdPF6ROUa6Gh+4yKXP+1ZPB6QM3DpL0rNgnFfg3E= 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 66D171007; Wed, 3 Apr 2024 07:41:43 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.16.212]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4C8713F7B4; Wed, 3 Apr 2024 07:41:10 -0700 (PDT) Date: Wed, 3 Apr 2024 15:41:07 +0100 From: Mark Rutland To: Dawei Li 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: 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: <20240403125109.2054881-1-dawei.li@shingroup.cn> 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. 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 >