2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-24 02:47:14 +00:00

4 Commits

Author SHA1 Message Date
Eelco Chaudron
f3036be659 utilities: Add long poll statistics to the kernel_delay.py script.
This addition uses the existing syscall probes to record statistics
related to the OVS 'Unreasonably long ... ms poll interval' message.
Basically, it records the min/max/average time between system poll
calls. This can be used to determine if a long poll event has
occurred during the capture.

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
2025-03-28 10:35:46 -04:00
Eelco Chaudron
638433bb92 utilities: Add upcall statistics to the kernel_delay.py script.
This patch installs a kernel return probe on ovs_dp_upcall() to record
all successful and failed calls per CPU. The statistics are reported
when the script exits, providing insights into the upcall behavior.

This is an example output:

  # UPCALL STATISTICS (TOTAL [CPU_ID: N_UPCALLS_PER_CPU, ...]):
    Total upcalls       : 183247 [0: 8937, 2: 14464, 4: 10372, 6: 4254, ...]
    Successfull upcalls : 120195 [0: 5945, 2: 6379, 4: 5966, 6: 4254, ...]
    Failed upcalls      : 63052 [0: 2992, 2: 8085, 4: 4406, 8: 2275, ...]
       11, EAGAIN       : 63052 [0: 2992, 2: 8085, 4: 4406, 8: 2275, ...]

Tested-by: Adrian Moreno <amoreno@redhat.com>
Reviewed-by: Adrian Moreno <amoreno@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
2024-12-20 11:03:03 +01:00
Eelco Chaudron
5f2af0b7a3 utilities: Add TASK_STOPPED accounting to the kernel_delay.py script.
This changes add statistics for when a thread is put into stop state.
For example with the following:

kill -STOP $(pidof ovs-vswitchd); sleep 1; kill -CONT $(pidof ovs-vswitchd);

Acked-by: Simon Horman <horms@ovn.org>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
2024-02-20 13:17:39 +01:00
Eelco Chaudron
13dde11310 utilities: Add kernel_delay.py script to debug a busy Linux kernel.
This patch adds an utility that can be used to determine if
an issue is related to a lack of Linux kernel resources.

This tool is also featured in a Red Hat developers blog article:

  https://developers.redhat.com/articles/2023/07/24/troubleshooting-open-vswitch-kernel-blame

Reviewed-by: Adrian Moreno <amorenoz@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
2023-09-27 11:21:16 +02:00