[PATCH v8 4/5] app/testpmd: report lcore usage
fengchengwen
fengchengwen at huawei.com
Mon Feb 6 04:31:15 CET 2023
Suggest add field "busy ratio" to reduce hand-computing and improve readability.
With above add, Acked-by: Chengwen Feng <fengchengwen at huawei.com>
On 2023/2/2 21:43, Robin Jarry wrote:
> Reuse the --record-core-cycles option to account for busy cycles. One
> turn of packet_fwd_t is considered "busy" if there was at least one
> received or transmitted packet.
>
> Add a new busy_cycles field in struct fwd_stream. Update get_end_cycles
> to accept an additional argument for the number of processed packets.
> Update fwd_stream.busy_cycles when the number of packets is greater than
> zero.
>
> When --record-core-cycles is specified, register a callback with
> rte_lcore_register_usage_cb(). In the callback, use the new lcore_id
> field in struct fwd_lcore to identify the correct index in fwd_lcores
> and return the sum of busy/total cycles of all fwd_streams.
>
> This makes the cycles counters available in rte_lcore_dump() and the
> lcore telemetry API:
>
> testpmd> dump_lcores
> lcore 3, socket 0, role RTE, cpuset 3
> lcore 4, socket 0, role RTE, cpuset 4, busy cycles 1228584096/9239923140
> lcore 5, socket 0, role RTE, cpuset 5, busy cycles 1255661768/9218141538
>
> --> /eal/lcore/info,4
> {
> "/eal/lcore/info": {
> "lcore_id": 4,
> "socket": 0,
> "role": "RTE",
> "cpuset": [
> 4
> ],
> "busy_cycles": 10623340318,
> "total_cycles": 55331167354
> }
> }
>
> Signed-off-by: Robin Jarry <rjarry at redhat.com>
> Acked-by: Morten Brørup <mb at smartsharesystems.com>
> Acked-by: Konstantin Ananyev <konstantin.v.ananyev at yandex.ru>
> Reviewed-by: Kevin Laatz <kevin.laatz at intel.com>
> ---
>
...
More information about the dev
mailing list