ソースを参照

qcacmn: Move log with error debug level outside of spinlock

In some cases, error level logs take more time to process when
some other printks are already in progress to write to console.
As this error log inside spinlock, so when some other core is also
competing for this spinlock, that core keeps iterating in a loop.
After some time spinlock panic may trigger as it is suspected that
this core is locked on this spinlock.

This fix moves the error log outside spinlock so that the other
core don't have to wait to acquire spinlock due to this.

Change-Id: I38be80ba3cb65dd77520ca39bf6210e9711f56da
CRs-Fixed: 2299628
Sravan Kumar Kairam 6 年 前
コミット
ae20c9e9b5
1 ファイル変更4 行追加3 行削除
  1. 4 3
      dp/wifi3.0/dp_main.c

+ 4 - 3
dp/wifi3.0/dp_main.c

@@ -4481,6 +4481,10 @@ void dp_peer_unref_delete(void *peer_handle)
 	uint16_t peer_id;
 	uint16_t vdev_id;
 
+	QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
+		  "%s: peer %pK ref_cnt(before decrement): %d", __func__,
+		  peer, qdf_atomic_read(&peer->ref_cnt));
+
 	/*
 	 * Hold the lock all the way from checking if the peer ref count
 	 * is zero until the peer references are removed from the hash
@@ -4492,9 +4496,6 @@ void dp_peer_unref_delete(void *peer_handle)
 	 * concurrently with the empty check.
 	 */
 	qdf_spin_lock_bh(&soc->peer_ref_mutex);
-	QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
-		  "%s: peer %pK ref_cnt(before decrement): %d", __func__,
-		  peer, qdf_atomic_read(&peer->ref_cnt));
 	if (qdf_atomic_dec_and_test(&peer->ref_cnt)) {
 		peer_id = peer->peer_ids[0];
 		vdev_id = vdev->vdev_id;