History log of /dpdk/examples/vm_power_manager/power_manager.c (Results 1 – 17 of 17)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1, v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, v21.11-rc1, v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2, v21.05-rc1, v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2, v21.02-rc1
# b49c677a 15-Jan-2021 David Hunt <[email protected]>

examples/vm_power: respect core mask

When vm_power_manager is started, it takes over power management on
all cores. This should be limited to cores defined in the core mask.

When initialising, if a

examples/vm_power: respect core mask

When vm_power_manager is started, it takes over power management on
all cores. This should be limited to cores defined in the core mask.

When initialising, if a core is not on the coremask, skip it.
Applies to both initialisation and exit.

Signed-off-by: David Hunt <[email protected]>

show more ...


Revision tags: v20.11, v20.11-rc5, v20.11-rc4, v20.11-rc3, v20.11-rc2, v20.11-rc1, v20.08, v20.08-rc4, v20.08-rc3, v20.08-rc2
# 95f648ff 14-Jul-2020 Rory Sexton <[email protected]>

examples/vm_power: make branch ratio threshold per core

This modification allows for the branch ratio threshold to be set
per core rather than system wide. This gives greater flexibility to
the bran

examples/vm_power: make branch ratio threshold per core

This modification allows for the branch ratio threshold to be set
per core rather than system wide. This gives greater flexibility to
the branch ratio monitoring allowing it to manage different
workloads with different characteristics on the same system.

Signed-off-by: Rory Sexton <[email protected]>
Reviewed-by: David Hunt <[email protected]>
Acked-by: Reshma Pattan <[email protected]>

show more ...


Revision tags: v20.08-rc1, v20.05, v20.05-rc4
# 666272d2 20-May-2020 Thomas Monjalon <[email protected]>

examples/vm_power: drop Unix path limit redefinition

The Unix socket path may be as long as UNIX_PATH_MAX.
This constant is supposed to be defined in sys/un.h.
On Linux, it appears to be in linux/un

examples/vm_power: drop Unix path limit redefinition

The Unix socket path may be as long as UNIX_PATH_MAX.
This constant is supposed to be defined in sys/un.h.
On Linux, it appears to be in linux/un.h.

This constant was re-defined locally, based on a variable declaration.
It is breaking compilation with -fno-common (default in GCC 10)
We could avoid the variable declaration by using NULL struct,
but it looks simpler not redefining this system constant.

As the power library and its examples are restricted to Linux only,
the Linux header file is directly included.

Fixes: 0d74597c1b4f ("examples/vm_power: fix max length of unix socket path")
Cc: [email protected]

Signed-off-by: Thomas Monjalon <[email protected]>
Acked-by: David Marchand <[email protected]>
Acked-by: Kevin Traynor <[email protected]>

show more ...


Revision tags: v20.05-rc3, v20.05-rc2, v20.05-rc1, v20.02, v20.02-rc4, v20.02-rc3, v20.02-rc2, v20.02-rc1, v19.11, v19.11-rc4, v19.11-rc3, v19.11-rc2, v19.11-rc1, v19.08, v19.08-rc4, v19.08-rc3
# 31c9a664 24-Jul-2019 David Hunt <[email protected]>

examples/vm_power: fix OOB frequency oscillations

The branch ratio algorithm in the vm_power_manager sample application
can be very sensitive at patricular loads in a workload, causing
oscillations

examples/vm_power: fix OOB frequency oscillations

The branch ratio algorithm in the vm_power_manager sample application
can be very sensitive at patricular loads in a workload, causing
oscillations between min and max frequency. For example, if a
workload is at 50%, scaling up may change the ratio
enough that it immediately thinks it needs to scale down again.

This patch introduces a sliding window recording the scale up/down
direction for the last 32 samples, and scales up if any samples indicate
we should scale up, otherwise scale down. Each core has it's own window.

Fixes: 4b1a631b8a8a ("examples/vm_power: add oob monitoring functions")
Cc: [email protected]

Signed-off-by: David Hunt <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>

show more ...


Revision tags: v19.08-rc2, v19.08-rc1, v19.05, v19.05-rc4, v19.05-rc3
# 3f1fc5f2 26-Apr-2019 David Hunt <[email protected]>

examples/power: fix buffer overrun

The freqs array in freq_info struct has RTE_MAX_LCORE_FREQS elements,
yet the code can attempt to look at the index at RTE_MAX_LCORE,
which may be greater than RT

examples/power: fix buffer overrun

The freqs array in freq_info struct has RTE_MAX_LCORE_FREQS elements,
yet the code can attempt to look at the index at RTE_MAX_LCORE,
which may be greater than RTE_MAX_LCORE_FREQS. Fix to limit index to
RTE_MAX_LCORE_FREQS.

Coverity issue: 337660
Fixes: d26c18c93260 ("examples/vm_power: cpu frequency in host")
Cc: [email protected]

Signed-off-by: David Hunt <[email protected]>
Acked-by: Reshma Pattan <[email protected]>

show more ...


Revision tags: v19.05-rc2
# 751227a0 09-Apr-2019 David Hunt <[email protected]>

power: fix buffer overruns

A previous change removed the limit of 64 cores by
moving away from 64-bit masks to char arrays. However
this left a buffer overrun issue, where the max channels
was defin

power: fix buffer overruns

A previous change removed the limit of 64 cores by
moving away from 64-bit masks to char arrays. However
this left a buffer overrun issue, where the max channels
was defined as 64, and max cores was defined as 256. These
should all be consistently set to RTE_MAX_LCORE.

The #defines being removed are CHANNEL_CMDS_MAX_CPUS,
CHANNEL_CMDS_MAX_CHANNELS, POWER_MGR_MAX_CPUS, and
CHANNEL_CMDS_MAX_VM_CHANNELS, and are being replaced
with RTE_MAX_LCORE for consistency and simplicity.

Coverity issue: 337672, 337673, 337678
Fixes: fd73630e95c1 ("examples/power: change 64-bit masks to arrays")
Cc: [email protected]

Signed-off-by: David Hunt <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>

show more ...


Revision tags: v19.05-rc1, v19.02, v19.02-rc4, v19.02-rc3, v19.02-rc2
# 6ff7b996 08-Jan-2019 David Hunt <[email protected]>

examples/power: fix for p-state

The vm_power_manager starts by setting the environment to acpi
using rte_power_set_env(PM_ENV_ACPI_CPUFREQ). This causes a problem
starting vm_power_manager when the

examples/power: fix for p-state

The vm_power_manager starts by setting the environment to acpi
using rte_power_set_env(PM_ENV_ACPI_CPUFREQ). This causes a problem
starting vm_power_manager when the system is using the intel_pstate
driver. The env should be set to none, or not called at all, because
the library now auto-detects the environment to be either acpi or
intel_pstate. This patch sets the environment to none so that the
library can successfully auto-detect.

Fixes: e6c6dc0f96c8 ("power: add p-state driver compatibility")

Signed-off-by: David Hunt <[email protected]>

show more ...


Revision tags: v19.02-rc1
# b6b22982 14-Dec-2018 David Hunt <[email protected]>

examples/power: remove mask functions

Since we're moving to allowing greater than 64 cores, the mask functions
that use uint64_t to perform functions on a masked set of cores are no
longer needed, s

examples/power: remove mask functions

Since we're moving to allowing greater than 64 cores, the mask functions
that use uint64_t to perform functions on a masked set of cores are no
longer needed, so removing them.

Signed-off-by: David Hunt <[email protected]>
Reviewed-by: Anatoly Burakov <[email protected]>

show more ...


Revision tags: v18.11, v18.11-rc5, v18.11-rc4, v18.11-rc3, v18.11-rc2
# c12ade20 31-Oct-2018 David Hunt <[email protected]>

examples/vm_power: respect maximum CPUs

The vm_power_manager app was not respecting the POWER_MGR_MAX_CPUS
during initialisation, so if there were more CPUs than this value (64),
it would lead to bu

examples/vm_power: respect maximum CPUs

The vm_power_manager app was not respecting the POWER_MGR_MAX_CPUS
during initialisation, so if there were more CPUs than this value (64),
it would lead to buffer overruns of there were more then 64 cores in
the system.

Added in a check during init and un-init to only initialise up to
lcore_id 63.

This raises the question as to why not simply increase the value of
POWER_MGR_MAX_CPUS. Well, it's not that simple, as many of the APIs take
a uint64_t as a parameter for the core mask, and this will not work for
cores greater than 63. So some work needs to be done in the future to
remove this limitation. For now we'll fix the memory corruption.

Also, the patch that this fixes says "allow greater than 64 cores" but
that's not across the entire application, it's only for the out-of-band
monitoring. I'll add a notice for an API change in the next release to
clean this up, i.e. depricate any API calls that use masks.

Fixes: 6453b9284b64 ("examples/vm_power: allow greater than 64 cores")
Cc: [email protected]

Signed-off-by: David Hunt <[email protected]>

show more ...


Revision tags: v18.11-rc1, v18.08, v18.08-rc3, v18.08-rc2, v18.08-rc1
# 711f43ba 13-Jul-2018 David Hunt <[email protected]>

examples/vm_power: make branch ratio configurable

For different workloads and poll loops, the theshold
may be different for when you want to scale up and down.

This patch allows changing of the def

examples/vm_power: make branch ratio configurable

For different workloads and poll loops, the theshold
may be different for when you want to scale up and down.

This patch allows changing of the default branch ratio
by using the -b command line argument (or --branch-ratio=)

Signed-off-by: David Hunt <[email protected]>
Acked-by: Radu Nicolau <[email protected]>

show more ...


# 6453b928 13-Jul-2018 David Hunt <[email protected]>

examples/vm_power: allow greater than 64 cores

To facilitate more info per core, change the global_cpu_mask
from a uint64_t to an array. This also removes the limit on
64 cores, allocing the aray at

examples/vm_power: allow greater than 64 cores

To facilitate more info per core, change the global_cpu_mask
from a uint64_t to an array. This also removes the limit on
64 cores, allocing the aray at run-time based on the number of
cores found in the system.

Signed-off-by: David Hunt <[email protected]>
Acked-by: Radu Nicolau <[email protected]>

show more ...


# 99a968fa 13-Jul-2018 David Hunt <[email protected]>

examples/vm_power: add core list parameter

Add in the '-l' command line parameter (also --core-list)
So the user can now pass --corelist=4,6,8-10 and it will
expand out to 4,6,8,9,10 using the parse

examples/vm_power: add core list parameter

Add in the '-l' command line parameter (also --core-list)
So the user can now pass --corelist=4,6,8-10 and it will
expand out to 4,6,8,9,10 using the parse function provided
in parse.c (parse_set).

This list of cores is then used to enable out-of-band monitoring
to scale up and down these cores based on the ratio of branch
hits versus branch misses. The ratio will be low when a poll
loop is spinning with no packets being received, so the frequency
will be scaled down.

Also , as part of this change, we introduce a core_info struct
which keeps information on each core in the system, and whether
we're doing out of band monitoring on them.

Signed-off-by: David Hunt <[email protected]>
Acked-by: Radu Nicolau <[email protected]>

show more ...


Revision tags: v18.05, v18.05-rc6, v18.05-rc5, v18.05-rc4, v18.05-rc3, v18.05-rc2, v18.05-rc1, v18.02, v18.02-rc4, v18.02-rc3, v18.02-rc2, v18.02-rc1
# 3998e2a0 19-Dec-2017 Bruce Richardson <[email protected]>

examples: use SPDX tag for Intel copyright files

Replace the BSD license header with the SPDX tag for files
with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <bruce.richardson@i

examples: use SPDX tag for Intel copyright files

Replace the BSD license header with the SPDX tag for files
with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <[email protected]>

show more ...


Revision tags: v17.11, v17.11-rc4, v17.11-rc3, v17.11-rc2, v17.11-rc1
# 7f472f74 11-Oct-2017 David Hunt <[email protected]>

examples/vm_power_mgr: add scale to medium freq fn

Signed-off-by: Nemanja Marjanovic <[email protected]>
Signed-off-by: Rory Sexton <[email protected]>
Signed-off-by: David Hunt <davi

examples/vm_power_mgr: add scale to medium freq fn

Signed-off-by: Nemanja Marjanovic <[email protected]>
Signed-off-by: Rory Sexton <[email protected]>
Signed-off-by: David Hunt <[email protected]>
Reviewed-by: Santosh Shukla <[email protected]>
Acked-by: Konstantin Ananyev <[email protected]>

show more ...


# 567997b9 13-Sep-2017 David Hunt <[email protected]>

examples/vm_power_manager: add per-core turbo

Add extra commands to command line to allow enable/disable of
per-core turbo.

When a core has turbo enabled, calling for max frequency will allow it to

examples/vm_power_manager: add per-core turbo

Add extra commands to command line to allow enable/disable of
per-core turbo.

When a core has turbo enabled, calling for max frequency will allow it to
go to a turbo frequency (P0n).

When a core has turbo disabled, calling for max frequency will allow it to
go to the maximum non-turbo frequency (P1), but not beyond.

Signed-off-by: David Hunt <[email protected]>

show more ...


Revision tags: v17.08, v17.08-rc4, v17.08-rc3, v17.08-rc2, v17.08-rc1, v17.05, v17.05-rc4, v17.05-rc3, v17.05-rc2, v17.05-rc1, v17.02, v17.02-rc3, v17.02-rc2, v17.02-rc1, v16.11, v16.11-rc3, v16.11-rc2, v16.11-rc1, v16.07, v16.07-rc5, v16.07-rc4, v16.07-rc3, v16.07-rc2, v16.07-rc1, v16.04, v16.04-rc4, v16.04-rc3, v16.04-rc2, v16.04-rc1
# 50810f09 08-Feb-2016 Thomas Monjalon <[email protected]>

config: remove useless explicit includes of generated header

The file rte_config.h is automatically generated and included.
No need to #include it.

The example performance-thread needs a makefile f

config: remove useless explicit includes of generated header

The file rte_config.h is automatically generated and included.
No need to #include it.

The example performance-thread needs a makefile fix to avoid
overwriting the default cflags.

Signed-off-by: Thomas Monjalon <[email protected]>

show more ...


Revision tags: v2.2.0, v2.2.0-rc4, v2.2.0-rc3, v2.2.0-rc2, v2.2.0-rc1, v2.1.0, v2.1.0-rc4, v2.1.0-rc3, v2.1.0-rc2, v2.1.0-rc1, v2.0.0, v2.0.0-rc3, v2.0.0-rc2, v2.0.0-rc1, v1.8.0, v1.8.0-rc6, v1.8.0-rc5, v1.8.0-rc4, v1.8.0-rc3, v1.8.0-rc2
# d26c18c9 25-Nov-2014 Alan Carew <[email protected]>

examples/vm_power: cpu frequency in host

A wrapper around librte_power(using ACPI cpufreq), providing locking around the
non-threadsafe library, allowing for frequency changes based on core masks an

examples/vm_power: cpu frequency in host

A wrapper around librte_power(using ACPI cpufreq), providing locking around the
non-threadsafe library, allowing for frequency changes based on core masks and
core numbers from both the CLI thread and epoll monitor thread.

Signed-off-by: Alan Carew <[email protected]>
Signed-off-by: Pablo de Lara <[email protected]>

show more ...