qcacld-3.0: Set cds_ol_rx_thread schedule policy to SCHED_RR

On QCS405 platform, it's observed that cds_ol_rx_pkt_freeq is empty
while receiving UDP packets, driver try to allocate cds_ol_rx_pkt in
ol_rx_data_process but failed. This leads to lots of frames got dropped.
Raise cds_ol_rx_thread scheduler policy to SCHED_RR to compete with
CE tasklet scheduler speed. With this change, found cds_ol_rx_pkt_freeq
is not going to be empty while receiving UDP packets.

Change-Id: I4bee3d69c2754ec6be10a2b623b4ebe8b2c0859b
CRs-Fixed: 2373936
This commit is contained in:
hangtian 2019-01-16 12:43:05 +08:00 • committed by nshrivas
commit cd2b2860b9
3 changed files with 16 additions and 0 deletions

3
Kbuild
View file

@ -2072,6 +2072,9 @@ cppflags-$(CONFIG_WLAN_SYSFS) += -DWLAN_SYSFS
cppflags-$(CONFIG_FEATURE_WLAN_RMC) += -DFEATURE_WLAN_RMC
cppflags-$(CONFIG_FEATURE_BECN_STATS) += -DWLAN_FEATURE_BEACON_RECEPTION_STATS
#Set kernel thread scheduler
cppflags-$(CONFIG_THREAD_PERFORMANCE) += -DTHREAD_PERFORMANCE
#Enable OL debug and wmi unified functions
cppflags-$(CONFIG_ATH_PERF_PWR_OFFLOAD) += -DATH_PERF_PWR_OFFLOAD

View file

@ -88,6 +88,7 @@ endif
ifeq ($(CONFIG_ARCH_QCS405), y)
CONFIG_WLAN_SYNC_TSF_PLUS := y
CONFIG_WLAN_SYNC_TSF_PLUS_NOIRQ := y
CONFIG_THREAD_PERFORMANCE := y
endif
#Flag to enable Legacy Fast Roaming2(LFR2)

View file

@ -35,6 +35,9 @@
#include <linux/spinlock.h>
#include <linux/kthread.h>
#include <linux/cpu.h>
#ifdef THREAD_PERFORMANCE
#include <linux/sched/types.h>
#endif
/* Milli seconds to delay SSR thread when an Entry point is Active */
#define SSR_WAIT_SLEEP_TIME 200
@ -407,6 +410,12 @@ QDF_STATUS cds_sched_open(void *p_cds_context,
p_cds_sched_context pSchedContext,
uint32_t SchedCtxSize)
{
#ifdef THREAD_PERFORMANCE
struct sched_param param;
param.sched_priority = 99;
#endif
cds_debug("Opening the CDS Scheduler");
/* Sanity checks */
if ((p_cds_context == NULL) || (pSchedContext == NULL)) {
@ -453,6 +462,9 @@ QDF_STATUS cds_sched_open(void *p_cds_context,
goto OL_RX_THREAD_START_FAILURE;
}
#ifdef THREAD_PERFORMANCE
sched_setscheduler(pSchedContext->ol_rx_thread, SCHED_RR, &param);
#endif
wake_up_process(pSchedContext->ol_rx_thread);
cds_debug("CDS OL RX thread Created");
wait_for_completion_interruptible(&pSchedContext->ol_rx_start_event);