From 13cdcc41947cc0ed7465cfa131b6346957f2be7a Mon Sep 17 00:00:00 2001 From: Tiger Yu Date: Thu, 29 Nov 2018 18:11:22 +0800 Subject: [PATCH] qcacld-3.0: Change the policy & priority of RX thread Change the policy & priority of RX thread to improve the RX throughput for Specified platform. Change-Id: Ie9df5de6f34d75264c4f3b7bdcb59ab92845a128 CRs-Fixed: 2354502 --- Kbuild | 6 ++++++ core/cds/src/cds_sched.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/Kbuild b/Kbuild index fcd537b786fc..157c6961fb19 100644 --- a/Kbuild +++ b/Kbuild @@ -2167,12 +2167,18 @@ endif ifeq ($(CONFIG_ARCH_MSM8996), y) CONFIG_FEATURE_SG := y +CONFIG_RX_THREAD_PRIORITY := y endif ifeq ($(CONFIG_FEATURE_SG), y) cppflags-y += -DFEATURE_SG endif +ifeq ($(CONFIG_RX_THREAD_PRIORITY), y) +cppflags-y += -DRX_THREAD_PRIORITY +endif + + #Enable wbuff cppflags-$(CONFIG_WLAN_WBUFF) += -DWLAN_FEATURE_WBUFF diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index cfcb2c8870bc..7f981c5d3855 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -691,7 +691,15 @@ static int cds_ol_rx_thread(void *arg) bool shutdown = false; int status; +#ifdef RX_THREAD_PRIORITY + struct sched_param scheduler_params = {0}; + + scheduler_params.sched_priority = 1; + sched_setscheduler(current, SCHED_FIFO, &scheduler_params); +#else set_user_nice(current, -1); +#endif + #ifdef MSM_PLATFORM set_wake_up_idle(true); #endif