From 822e4f01a209e3732a78197bd2a6a7eac070a9e7 Mon Sep 17 00:00:00 2001 From: Ananya Gupta Date: Tue, 1 Sep 2020 21:03:41 +0530 Subject: [PATCH] qcacld-3.0: Print periodic stats only if roaming not in progress Roaming is handled by scheduler thread which has lower priority than kworker thread. Periodic stats are printed in kworker thread. Since handling roaming is a higher priority job, skip printing periodic stats so that scheduler thread can be given extra time slot to process roaming. Change-Id: I444bdf1df51da2f80111fabd84d19584bd715ae3 CRs-Fixed: 2768360 --- core/hdd/src/wlan_hdd_main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 065114dacb8e..6b35ef8dd901 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9871,9 +9871,15 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx, hdd_pm_qos_update_request(hdd_ctx, &pm_qos_cpu_mask); } - hdd_display_periodic_stats(hdd_ctx, (total_pkts > 0) ? true : false); - - hdd_periodic_sta_stats_display(hdd_ctx); + /* Roaming is a high priority job but gets processed in scheduler + * thread, bypassing printing stats so that kworker exits quickly and + * scheduler thread can utilize CPU. + */ + if (!hdd_is_roaming_in_progress(hdd_ctx)) { + hdd_display_periodic_stats(hdd_ctx, + (total_pkts > 0) ? true : false); + hdd_periodic_sta_stats_display(hdd_ctx); + } } #ifdef QCA_SUPPORT_TXRX_DRIVER_TCP_DEL_ACK