Skip to content

Conversation

@ewoodev
Copy link
Contributor

@ewoodev ewoodev commented Nov 13, 2025

The power consumption is effected by CPU usage.
To measure power consumption according to CPU status, Add an app that makes the usage of each CPU 100%.

@ewoodev ewoodev force-pushed the WORK-251113_Add_cpu_test branch from 7522e28 to 2671e3d Compare November 17, 2025 05:47
The power consumption is effected by CPU usage.
To measure power consumption according to CPU status, Add an app that
makes the usage of each CPU 100%.

Signed-off-by: eunwoo.nam <[email protected]>
@ewoodev ewoodev force-pushed the WORK-251113_Add_cpu_test branch from 2671e3d to 78676a0 Compare November 17, 2025 06:38
Copy link

@allen-kim-sec allen-kim-sec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

clock_t prev = clock();
clock_t now;

#ifdef CONFIG_SMP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this config checking necessary?
If we execute the codes below with the config disabled, what happen?

CPU_ZERO(&cpuset);
CPU_SET(cpu_id, &cpuset);

if (pthread_setaffinity_np(this_thread, sizeof(cpu_set_t), &cpuset) != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to change assigned cpu at running by itself??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants