From: Yury Norov <yury.norov@gmail.com>
To: Dawei Li <dawei.li@shingroup.cn>
Cc: will@kernel.org, mark.rutland@arm.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,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [PATCH v3 01/10] cpumask: add cpumask_any_and_but()
Date: Wed, 3 Apr 2024 09:31:35 -0700 [thread overview]
Message-ID: <Zg2EZ6II4QNuO/QM@yury-ThinkPad> (raw)
In-Reply-To: <20240403155950.2068109-2-dawei.li@shingroup.cn>
On Wed, Apr 03, 2024 at 11:59:41PM +0800, Dawei Li wrote:
> From: Mark Rutland <mark.rutland@arm.com>
>
> In some cases, it's useful to be able to select a random cpu from the
> intersection of two masks, excluding a particular CPU.
>
> For example, in some systems an uncore PMU is shared by a subset of
> CPUs, and management of this PMU is assigned to some arbitrary CPU in
> this set. Whenever the management CPU is hotplugged out, we wish to
> migrate responsibility to another arbitrary CPU which is both in this
> set and online.
>
> Today we can use cpumask_any_and() to select an arbitrary CPU in the
> intersection of two masks. We can also use cpumask_any_but() to select
> any arbitrary cpu in a mask excluding, a particular CPU.
>
> To do both, we either need to use a temporary cpumask, which is
> wasteful, or use some lower-level cpumask helpers, which can be unclear.
>
> This patch adds a new cpumask_any_and_but() to cater for these cases.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
Thank you,
Acked-by: Yury Norov <yury.norov@gmail.com>
next prev parent reply other threads:[~2024-04-03 16:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 15:59 [PATCH v3 00/10] perf: Avoid placing cpumask on the stack Dawei Li
2024-04-03 15:59 ` [PATCH v3 01/10] cpumask: add cpumask_any_and_but() Dawei Li
2024-04-03 16:31 ` Yury Norov [this message]
2024-04-03 15:59 ` [PATCH v3 02/10] perf/alibaba_uncore_drw: Avoid placing cpumask on the stack Dawei Li
2024-04-08 0:28 ` Shuai Xue
2024-04-03 15:59 ` [PATCH v3 03/10] perf/arm-cmn: " Dawei Li
2024-04-03 15:59 ` [PATCH v3 04/10] perf/arm_cspmu: " Dawei Li
2024-04-03 15:59 ` [PATCH v3 05/10] perf/arm_dsu: " Dawei Li
2024-04-03 15:59 ` [PATCH v3 06/10] perf/dwc_pcie: " Dawei Li
2024-04-08 0:30 ` Shuai Xue
2024-04-03 15:59 ` [PATCH v3 07/10] perf/hisi_pcie: " Dawei Li
2024-04-05 9:54 ` Jonathan Cameron
2024-04-03 15:59 ` [PATCH v3 08/10] perf/hisi_uncore: " Dawei Li
2024-04-05 9:54 ` Jonathan Cameron
2024-04-03 15:59 ` [PATCH v3 09/10] perf/qcom_l2: " Dawei Li
2024-04-03 15:59 ` [PATCH v3 10/10] perf/thunderx2: " Dawei Li
2024-04-09 16:59 ` [PATCH v3 00/10] perf: " Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zg2EZ6II4QNuO/QM@yury-ThinkPad \
--to=yury.norov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andersson@kernel.org \
--cc=dawei.li@shingroup.cn \
--cc=jonathan.cameron@huawei.com \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=renyu.zj@linux.alibaba.com \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
--cc=xueshuai@linux.alibaba.com \
--cc=yangyicong@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox