mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacld-3.0: Add ini support to change ce service max yield time
Add ini support to change ce service max yield time, so that we can tune the napi SWI context of execution based on the system needs and add a variable in napi stats to record max time taken in NAPI poll. Change-Id: Id2b47bcecb777b98e0b1192135ae140b681d387d CRs-Fixed: 2055074
This commit is contained in:
parent
10ff2ff9ed
commit
24aa27ea06
4 changed files with 37 additions and 2 deletions
|
|
@ -9963,6 +9963,27 @@ enum dot11p_mode {
|
|||
#define CFG_RX_MODE_DEFAULT (CFG_ENABLE_RX_THREAD | CFG_ENABLE_NAPI)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* ce_service_max_yield_time - Control to set ce service max yield time (in ms)
|
||||
*
|
||||
* @Min: 1
|
||||
* @Max: 10
|
||||
* @Default: 10
|
||||
*
|
||||
* This ini is used to set ce service max yield time (in ms)
|
||||
*
|
||||
* Supported Feature: NAPI
|
||||
*
|
||||
* Usage: Internal
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_CE_SERVICE_MAX_YIELD_TIME_NAME "ce_service_max_yield_time"
|
||||
#define CFG_CE_SERVICE_MAX_YIELD_TIME_MIN (1)
|
||||
#define CFG_CE_SERVICE_MAX_YIELD_TIME_MAX (10)
|
||||
#define CFG_CE_SERVICE_MAX_YIELD_TIME_DEFAULT (10)
|
||||
|
||||
/* List of RPS CPU maps for different rx queues registered by WLAN driver
|
||||
* Ref - Kernel/Documentation/networking/scaling.txt
|
||||
* RPS CPU map for a particular RX queue, selects CPU(s) for bottom half
|
||||
|
|
@ -14788,6 +14809,7 @@ struct hdd_config {
|
|||
#endif
|
||||
uint8_t dot11p_mode;
|
||||
uint8_t rx_mode;
|
||||
uint8_t ce_service_max_yield_time;
|
||||
uint8_t cpu_map_list[CFG_RPS_RX_QUEUE_CPU_MAP_LIST_LEN];
|
||||
#ifdef FEATURE_WLAN_EXTSCAN
|
||||
bool extscan_enabled;
|
||||
|
|
|
|||
|
|
@ -4144,6 +4144,13 @@ struct reg_table_entry g_registry_table[] = {
|
|||
CFG_RX_MODE_MIN,
|
||||
CFG_RX_MODE_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_CE_SERVICE_MAX_YIELD_TIME_NAME, WLAN_PARAM_Integer,
|
||||
struct hdd_config, ce_service_max_yield_time,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_CE_SERVICE_MAX_YIELD_TIME_DEFAULT,
|
||||
CFG_CE_SERVICE_MAX_YIELD_TIME_MIN,
|
||||
CFG_CE_SERVICE_MAX_YIELD_TIME_MAX),
|
||||
|
||||
REG_VARIABLE_STRING(CFG_RPS_RX_QUEUE_CPU_MAP_LIST_NAME,
|
||||
WLAN_PARAM_String,
|
||||
struct hdd_config, cpu_map_list,
|
||||
|
|
@ -6848,6 +6855,9 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx)
|
|||
hdd_ctx->config->max_scan_count);
|
||||
hdd_debug("Name = [%s] value = [%d]",
|
||||
CFG_RX_MODE_NAME, hdd_ctx->config->rx_mode);
|
||||
hdd_debug("Name = [%s] value = [%d]",
|
||||
CFG_CE_SERVICE_MAX_YIELD_TIME_NAME,
|
||||
hdd_ctx->config->ce_service_max_yield_time);
|
||||
hdd_debug("Name = [%s] Value = [%u]",
|
||||
CFG_CE_CLASSIFY_ENABLE_NAME,
|
||||
hdd_ctx->config->ce_classify_enabled);
|
||||
|
|
|
|||
|
|
@ -260,6 +260,8 @@ int hdd_hif_open(struct device *dev, void *bdev, const struct hif_bus_id *bid,
|
|||
}
|
||||
}
|
||||
|
||||
hif_set_ce_service_max_yield_time(hif_ctx,
|
||||
hdd_ctx->config->ce_service_max_yield_time);
|
||||
pmo_ucfg_psoc_set_hif_handle(hdd_ctx->hdd_psoc, hif_ctx);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ int hdd_display_napi_stats(void)
|
|||
hdd_err("%s unable to retrieve napi structure", __func__);
|
||||
return -EFAULT;
|
||||
}
|
||||
hdd_debug("[NAPI %u][BL %d]: scheds polls comps done t-lim p-lim corr napi-buckets(%d)",
|
||||
hdd_debug("[NAPI %u][BL %d]: scheds polls comps done t-lim p-lim corr max_time napi-buckets(%d)",
|
||||
napid->napi_mode,
|
||||
hif_napi_cpu_blacklist(napid, BLACKLIST_QUERY),
|
||||
QCA_NAPI_NUM_BUCKETS);
|
||||
|
|
@ -496,7 +496,7 @@ int hdd_display_napi_stats(void)
|
|||
}
|
||||
|
||||
if (napis->napi_schedules != 0)
|
||||
hdd_debug("NAPI[%2d]CPU[%d]: %7d %7d %7d %7d %5d %5d %5d %s",
|
||||
hdd_debug("NAPI[%2d]CPU[%d]: %7d %7d %7d %7d %5d %5d %5d %9llu %s",
|
||||
i, j,
|
||||
napis->napi_schedules,
|
||||
napis->napi_polls,
|
||||
|
|
@ -505,6 +505,7 @@ int hdd_display_napi_stats(void)
|
|||
napis->time_limit_reached,
|
||||
napis->rxpkt_thresh_reached,
|
||||
napis->cpu_corrected,
|
||||
napis->napi_max_poll_time,
|
||||
buf);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue