[PATCH v7 1/4] eal: add lcore poll busyness telemetry

Kevin Laatz kevin.laatz at intel.com
Fri Sep 16 14:35:00 CEST 2022


On 14/09/2022 15:30, Stephen Hemminger wrote:
> On Wed, 14 Sep 2022 10:29:26 +0100
> Kevin Laatz <kevin.laatz at intel.com> wrote:
>
>> +struct lcore_poll_telemetry {
>> +	int poll_busyness;
>> +	/**< Calculated poll busyness (gets set/returned by the API) */
>> +	int raw_poll_busyness;
>> +	/**< Calculated poll busyness times 100. */
>> +	uint64_t interval_ts;
>> +	/**< when previous telemetry interval started */
>> +	uint64_t empty_cycles;
>> +	/**< empty cycle count since last interval */
>> +	uint64_t last_poll_ts;
>> +	/**< last poll timestamp */
>> +	bool last_empty;
>> +	/**< if last poll was empty */
>> +	unsigned int contig_poll_cnt;
>> +	/**< contiguous (always empty/non empty) poll counter */
>> +} __rte_cache_aligned;
>> +
> For api's always prefer to use fix size types.
> Is there any reason the poll_busyness values could be negative.
> If not please use unsigned types.

We use -1 to indicate the core is "inactive" or a "non-polling" core.

These are cores that have either a) never called the timestamp macro, or 
b) haven't called the timestamp macro for some time and have therefore 
been marked as "inactive" until they next call the timestamp macro.



More information about the dev mailing list