From 6896649aeecb1b534fefc673b544e44c6fd75b4d Mon Sep 17 00:00:00 2001 From: Vevek Venkatesan Date: Thu, 13 May 2021 15:22:52 +0530 Subject: [PATCH] qcacld-3.0: increase ce_service_max_yield_time to 2 msec Increase ce_service_max_yield_time to 2 msec in SLUB_DEBUG builds for helium SNOC platforms to improve the CE reaping performance. Change-Id: I2a8a21fd1a65bc2ffc5fb17986116613f47510c7 CRs-Fixed: 2937231 --- core/hdd/src/wlan_hdd_driver_ops.c | 35 +++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 0ab0108eb8e8..13a70e717eb4 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -276,6 +276,38 @@ hdd_hif_register_shutdown_notifier(struct hif_opaque_softc *hif_ctx) hif_ctx); } +/** + + * hdd_hif_set_ce_max_yield_time() - Wrapper API to set CE max yield time + * @hif_ctx: hif context + * @bus_type: underlying bus type + * @ce_service_max_yield_time: max yield time to be set + * + * Return: None + */ +#if defined(CONFIG_SLUB_DEBUG_ON) +#define CE_SNOC_MAX_YIELD_TIME_US 2000 + +static void hdd_hif_set_ce_max_yield_time(struct hif_opaque_softc *hif_ctx, + enum qdf_bus_type bus_type, + uint32_t ce_service_max_yield_time) +{ + if (bus_type == QDF_BUS_TYPE_SNOC && + ce_service_max_yield_time < CE_SNOC_MAX_YIELD_TIME_US) + ce_service_max_yield_time = CE_SNOC_MAX_YIELD_TIME_US; + + hif_set_ce_service_max_yield_time(hif_ctx, ce_service_max_yield_time); +} + +#else +static void hdd_hif_set_ce_max_yield_time(struct hif_opaque_softc *hif_ctx, + enum qdf_bus_type bus_type, + uint32_t ce_service_max_yield_time) +{ + hif_set_ce_service_max_yield_time(hif_ctx, ce_service_max_yield_time); +} +#endif + /** * hdd_init_cds_hif_context() - API to set CDS HIF Context * @hif: HIF Context @@ -402,7 +434,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_hif_set_ce_max_yield_time( + hif_ctx, bus_type, cfg_get(hdd_ctx->psoc, CFG_DP_CE_SERVICE_MAX_YIELD_TIME)); ucfg_pmo_psoc_set_hif_handle(hdd_ctx->psoc, hif_ctx);