Browse Source

qcacld-3.0: Add pre-alloc entries for fragmented history

Currently the history recording for any debug purpose
is done using a contiguous memory chunk. For certain
history like tx_hw_ring, tx desc or tx completion desc
history, the amount of contiguous memory required is
very huge (order 7 or 8 allocation), which have a
higher probability of failing.

In order to mitigate the above scenario, introduce the
support for recording debug history into fragmented
chunks of memory, thereby reducing the requirement of
contiguous memory.

Change-Id: Ia725cf5d061a53009f02bddd67967360404f2f1c
CRs-Fixed: 3283778
Rakesh Pillai 2 years ago
parent
commit
93e61d43ec
1 changed files with 59 additions and 4 deletions
  1. 59 4
      core/dp/txrx3.0/dp_txrx.c

+ 59 - 4
core/dp/txrx3.0/dp_txrx.c

@@ -325,13 +325,68 @@ static struct dp_prealloc_context g_dp_context_allocs[] = {
 	false, false, NULL},
 #endif	/* WLAN_FEATURE_DP_RX_RING_HISTORY */
 #ifdef DP_TX_HW_DESC_HISTORY
-	{DP_TX_HW_DESC_HIST_TYPE, sizeof(struct dp_tx_hw_desc_history),
-	false, false, NULL},
+	/* 3 Slots */
+	{DP_TX_HW_DESC_HIST_TYPE,
+	 DP_TX_HW_DESC_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_hw_desc_evt),
+	 false, false, NULL},
+	{DP_TX_HW_DESC_HIST_TYPE,
+	 DP_TX_HW_DESC_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_hw_desc_evt),
+	 false, false, NULL},
+	{DP_TX_HW_DESC_HIST_TYPE,
+	 DP_TX_HW_DESC_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_hw_desc_evt),
+	 false, false, NULL},
 #endif
 #ifdef WLAN_FEATURE_DP_TX_DESC_HISTORY
-	{DP_TX_TCL_HIST_TYPE, sizeof(struct dp_tx_tcl_history),
+	/* 8 Slots */
+	{DP_TX_TCL_HIST_TYPE,
+	 DP_TX_TCL_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_TCL_HIST_TYPE,
+	 DP_TX_TCL_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_TCL_HIST_TYPE,
+	 DP_TX_TCL_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_TCL_HIST_TYPE,
+	 DP_TX_TCL_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_TCL_HIST_TYPE,
+	 DP_TX_TCL_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_TCL_HIST_TYPE,
+	 DP_TX_TCL_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_TCL_HIST_TYPE,
+	 DP_TX_TCL_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_TCL_HIST_TYPE,
+	 DP_TX_TCL_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+
+	/* 8 Slots */
+	{DP_TX_COMP_HIST_TYPE,
+	 DP_TX_COMP_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_COMP_HIST_TYPE,
+	 DP_TX_COMP_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_COMP_HIST_TYPE,
+	 DP_TX_COMP_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_COMP_HIST_TYPE,
+	 DP_TX_COMP_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_COMP_HIST_TYPE,
+	 DP_TX_COMP_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_COMP_HIST_TYPE,
+	 DP_TX_COMP_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
+	 false, false, NULL},
+	{DP_TX_COMP_HIST_TYPE,
+	 DP_TX_COMP_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
 	 false, false, NULL},
-	{DP_TX_COMP_HIST_TYPE, sizeof(struct dp_tx_comp_history),
+	{DP_TX_COMP_HIST_TYPE,
+	 DP_TX_COMP_HIST_PER_SLOT_MAX * sizeof(struct dp_tx_desc_event),
 	 false, false, NULL},
 #endif	/* WLAN_FEATURE_DP_TX_DESC_HISTORY */
 #ifdef WLAN_SUPPORT_RX_FISA