diff options
| author | Orhan K AKYILDIZ <oka@codeaurora.org> | 2017-02-28 18:05:41 -0800 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@codeaurora.org> | 2017-03-09 21:08:31 -0800 |
| commit | 2a8ee300b14b69c20a08980c0e30ef454cc393f7 (patch) | |
| tree | debe52b4f904defbedc97d22a81c4c684e0514f8 | |
| parent | efc8142ca33292653c3e6bf760cbef1e93bde756 (diff) | |
qcacld-3.0: Allocate rx_buf_debug from BSS
As kernel was complaining an order-5 (2^5 * page-size(=8K)) allocation,
change the allocation of rx_buf_debug memory debug structure to be done
from BSS instead.
Change-Id: I78658f2f723d230cc6443c0897a6a4b31c753849
CRs-Fixed: 2011052
| -rw-r--r-- | core/dp/htt/htt_internal.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/core/dp/htt/htt_internal.h b/core/dp/htt/htt_internal.h index 9944d267ddc9..673df242abd7 100644 --- a/core/dp/htt/htt_internal.h +++ b/core/dp/htt/htt_internal.h @@ -636,27 +636,25 @@ void htt_tx_group_credit_process(struct htt_pdev_t *pdev, u_int32_t *msg_word) * htt_rx_dbg_rxbuf_init() - init debug rx buff list * @pdev: pdev handle * + * Allocation is done from bss segment. This uses vmalloc and has a bit + * of an overhead compared to kmalloc (which qdf_mem_alloc wraps). The impact + * of the overhead to performance will need to be quantified. + * * Return: none */ +static struct rx_buf_debug rx_buff_list_bss[HTT_RX_RING_BUFF_DBG_LIST]; static inline void htt_rx_dbg_rxbuf_init(struct htt_pdev_t *pdev) { - pdev->rx_buff_list = qdf_mem_malloc( - HTT_RX_RING_BUFF_DBG_LIST * - sizeof(struct rx_buf_debug)); - if (!pdev->rx_buff_list) { - qdf_print("HTT: debug RX buffer allocation failed\n"); - QDF_ASSERT(0); - } else { - qdf_spinlock_create(&(pdev->rx_buff_list_lock)); - pdev->rx_buff_index = 0; - pdev->rx_buff_posted_cum = 0; - pdev->rx_buff_recvd_cum = 0; - pdev->rx_buff_recvd_err = 0; - pdev->refill_retry_timer_starts = 0; - pdev->refill_retry_timer_calls = 0; - pdev->refill_retry_timer_doubles = 0; - } + pdev->rx_buff_list = rx_buff_list_bss; + qdf_spinlock_create(&(pdev->rx_buff_list_lock)); + pdev->rx_buff_index = 0; + pdev->rx_buff_posted_cum = 0; + pdev->rx_buff_recvd_cum = 0; + pdev->rx_buff_recvd_err = 0; + pdev->refill_retry_timer_starts = 0; + pdev->refill_retry_timer_calls = 0; + pdev->refill_retry_timer_doubles = 0; } /** @@ -828,7 +826,7 @@ static inline void htt_rx_dbg_rxbuf_deinit(struct htt_pdev_t *pdev) { if (pdev->rx_buff_list) - qdf_mem_free(pdev->rx_buff_list); + pdev->rx_buff_list = NULL; qdf_spinlock_destroy(&(pdev->rx_buff_list_lock)); } #else |
