Thread (156 messages) 156 messages, 8 authors, 2021-08-04

Re: [dpdk-dev] [PATCH v7 1/7] power_intrinsics: use callbacks for comparison

From: David Hunt <hidden>
Date: 2021-07-07 11:57:09

On 7/7/2021 11:48 AM, Anatoly Burakov wrote:
Previously, the semantics of power monitor were such that we were
checking current value against the expected value, and if they matched,
then the sleep was aborted. This is somewhat inflexible, because it only
allowed us to check for a specific value in a specific way.

This commit replaces the comparison with a user callback mechanism, so
that any PMD (or other code) using `rte_power_monitor()` can define
their own comparison semantics and decision making on how to detect the
need to abort the entering of power optimized state.

Existing implementations are adjusted to follow the new semantics.

Suggested-by: Konstantin Ananyev <redacted>
Signed-off-by: Anatoly Burakov <redacted>
Acked-by: Konstantin Ananyev <redacted>
---

Notes:
     v4:
     - Return error if callback is set to NULL
     - Replace raw number with a macro in monitor condition opaque data
     
     v2:
     - Use callback mechanism for more flexibility
     - Address feedback from Konstantin

  

Tested-by: David Hunt <redacted>


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help