From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Bing Huang <huangbing@kylinos.cn>, peterz@infradead.org
Cc: brauner@kernel.org, bristot@redhat.com, bsegall@google.com,
juri.lelli@redhat.com, linux-kernel@vger.kernel.org,
mgorman@suse.de, mingo@redhat.com, rostedt@goodmis.org,
vincent.guittot@linaro.org
Subject: Re: [PATCH v3] sched/fair: static cpumasks for load balance
Date: Tue, 7 Jun 2022 10:27:28 +0200 [thread overview]
Message-ID: <c183ab0d-24db-3191-bfd1-a390162cd53c@arm.com> (raw)
In-Reply-To: <20220602030135.398697-1-huangbing@kylinos.cn>
On 02/06/2022 05:01, Bing Huang wrote:
> The both cpu mask load_balance_mask and select_idle_mask just only used
> in fair.c, but allocation in core.c in CONFIG_CPUMASK_OFFSTACK=y case,
> and global via declare per cpu variations. More or less, it looks wired.
Maybe you can change this into:
sched/fair: Make per-cpu cpumasks static
load_balance_mask and select_idle_mask are only used in fair.c. Make
them static and move their allocation into init_sched_fair_class().
Replace kzalloc_node() with zalloc_cpumask_var_node() to get rid of the
CONFIG_CPUMASK_OFFSTACK #ifdef and to align with per-cpu cpumask
allocation for RT (local_cpu_mask in init_sched_rt_class()) and DL
class (local_cpu_mask_dl in init_sched_dl_class()).
> Co-developed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
You can remove the `Co-developed-by`. I was just reviewing the patch and
gave suggestions.
[...]
> @@ -11841,6 +11841,15 @@ void show_numa_stats(struct task_struct *p, struct seq_file *m)
> __init void init_sched_fair_class(void)
> {
> #ifdef CONFIG_SMP
> + int i;
> +
> + for_each_possible_cpu(i) {
> + zalloc_cpumask_var_node(&per_cpu(load_balance_mask, i),
> + GFP_KERNEL, cpu_to_node(i));
> + zalloc_cpumask_var_node(&per_cpu(select_idle_mask, i),
> + GFP_KERNEL, cpu_to_node(i));
@@ -11815,9 +11815,9 @@ __init void init_sched_fair_class(void)
for_each_possible_cpu(i) {
zalloc_cpumask_var_node(&per_cpu(load_balance_mask, i),
- GFP_KERNEL, cpu_to_node(i));
+ GFP_KERNEL, cpu_to_node(i));
zalloc_cpumask_var_node(&per_cpu(select_idle_mask, i),
- GFP_KERNEL, cpu_to_node(i));
+ GFP_KERNEL, cpu_to_node(i));
}
[...]
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
next prev parent reply other threads:[~2022-06-07 8:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 3:01 Bing Huang
2022-06-07 8:27 ` Dietmar Eggemann [this message]
2022-06-02 3:07 Bing Huang
2022-06-02 3:22 Bing Huang
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=c183ab0d-24db-3191-bfd1-a390162cd53c@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=brauner@kernel.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=huangbing@kylinos.cn \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
/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
all inboxes | Powered by JetHome®