From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: "Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
"Théo Lebrun" <theo.lebrun@bootlin.com>,
"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] MIPS: CPS: Improve mips_cps_first_online_in_cluster()
Date: Mon, 07 Jul 2025 15:40:43 +0200 [thread overview]
Message-ID: <8734b8glus.fsf@BLaptop.bootlin.com> (raw)
In-Reply-To: <b3b3d5f5-e62f-4081-9fb0-a176a91361f2@app.fastmail.com>
Hello Jiaxun,
> 在2025年7月4日周五 下午4:13,Gregory CLEMENT写道:
>> The initial implementation of this function goes through all the CPUs
>> in a cluster to determine if the current CPU is the only one
>> running. This process occurs every time the function is called.
>>
>> However, during boot, we already perform this task, so let's take
>> advantage of this opportunity to create and fill a CPU bitmask that
>> can be easily and efficiently used later.
>>
>> This requires creating a single CPU bitmask per cluster, which is why
>> it's essential to know how many clusters can be utilized. The default
>> setting is 4 clusters, but this value can be changed when configuring
>> the kernel or even customized for a given SoC family.
>
> Hmm, I think we should avoid this sort of random limitation.
It's not great, but it seemed like the best approach to keep optimized
boot times and memory consumption.
>
> You can actually store per cluster cpumask_var_t into `mips_cps_cluster_bootcfg`,
> which is allocated in cps_prepare_cpus(), and generate cpumask just
> there.
>
> It should be pretty straightforward to handle.
>
The drawback of this option is that cps_prepare_cpus() is called after
the building of the topology. However, I am trying to see how to insert
this in the loop already used in cps_prepare_cpus().
Gregory
> Thanks!
>
>>
>> This patch modifies the function to allow providing the first
>> available online CPU when one already exists, which is necessary for
>> delay CPU calibration optimization.
>>
>> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
>> ---
> [...]
> --
> - Jiaxun
--
Grégory CLEMENT, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-07-07 13:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 15:13 [PATCH v2 0/3] MIPS: CPS: Optimise delay CPU calibration and cluster helper function Gregory CLEMENT
2025-07-04 15:13 ` [PATCH v2 1/3] MIPS: CPS: Improve mips_cps_first_online_in_cluster() Gregory CLEMENT
2025-07-04 18:03 ` Jiaxun Yang
2025-07-07 13:40 ` Gregory CLEMENT [this message]
2025-07-04 15:13 ` [PATCH v2 2/3] MIPS: CPS: Change default cluster value for EyeQ SoCs Gregory CLEMENT
2025-07-04 15:13 ` [PATCH v2 3/3] MIPS: CPS: Optimise delay CPU calibration for SMP Gregory CLEMENT
2025-07-04 17:46 ` Jiaxun Yang
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=8734b8glus.fsf@BLaptop.bootlin.com \
--to=gregory.clement@bootlin.com \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tawfik.bayouk@mobileye.com \
--cc=theo.lebrun@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=tsbogend@alpha.franken.de \
--cc=vladimir.kondratiev@mobileye.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.