mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2025-04-19 20:58:31 +09:00
wifi: mac80211: improve stop/wake queue tracing
Add the refcount. This can be useful when we want to understand why a queue stays stopped after it is woken. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250101070249.bd320c6e6702.I6ae0f19d922aea1f28236d72bf260acac428fc02@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
2bf502251b
commit
00e3daadfe
@ -3159,49 +3159,55 @@ TRACE_EVENT(api_finalize_rx_omi_bw,
|
||||
|
||||
TRACE_EVENT(wake_queue,
|
||||
TP_PROTO(struct ieee80211_local *local, u16 queue,
|
||||
enum queue_stop_reason reason),
|
||||
enum queue_stop_reason reason, int refcount),
|
||||
|
||||
TP_ARGS(local, queue, reason),
|
||||
TP_ARGS(local, queue, reason, refcount),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
LOCAL_ENTRY
|
||||
__field(u16, queue)
|
||||
__field(u32, reason)
|
||||
__field(int, refcount)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
LOCAL_ASSIGN;
|
||||
__entry->queue = queue;
|
||||
__entry->reason = reason;
|
||||
__entry->refcount = refcount;
|
||||
),
|
||||
|
||||
TP_printk(
|
||||
LOCAL_PR_FMT " queue:%d, reason:%d",
|
||||
LOCAL_PR_ARG, __entry->queue, __entry->reason
|
||||
LOCAL_PR_FMT " queue:%d, reason:%d, refcount: %d",
|
||||
LOCAL_PR_ARG, __entry->queue, __entry->reason,
|
||||
__entry->refcount
|
||||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(stop_queue,
|
||||
TP_PROTO(struct ieee80211_local *local, u16 queue,
|
||||
enum queue_stop_reason reason),
|
||||
enum queue_stop_reason reason, int refcount),
|
||||
|
||||
TP_ARGS(local, queue, reason),
|
||||
TP_ARGS(local, queue, reason, refcount),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
LOCAL_ENTRY
|
||||
__field(u16, queue)
|
||||
__field(u32, reason)
|
||||
__field(int, refcount)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
LOCAL_ASSIGN;
|
||||
__entry->queue = queue;
|
||||
__entry->reason = reason;
|
||||
__entry->refcount = refcount;
|
||||
),
|
||||
|
||||
TP_printk(
|
||||
LOCAL_PR_FMT " queue:%d, reason:%d",
|
||||
LOCAL_PR_ARG, __entry->queue, __entry->reason
|
||||
LOCAL_PR_FMT " queue:%d, reason:%d, refcount: %d",
|
||||
LOCAL_PR_ARG, __entry->queue, __entry->reason,
|
||||
__entry->refcount
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -437,8 +437,6 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
|
||||
{
|
||||
struct ieee80211_local *local = hw_to_local(hw);
|
||||
|
||||
trace_wake_queue(local, queue, reason);
|
||||
|
||||
if (WARN_ON(queue >= hw->queues))
|
||||
return;
|
||||
|
||||
@ -456,6 +454,9 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
|
||||
if (local->q_stop_reasons[queue][reason] == 0)
|
||||
__clear_bit(reason, &local->queue_stop_reasons[queue]);
|
||||
|
||||
trace_wake_queue(local, queue, reason,
|
||||
local->q_stop_reasons[queue][reason]);
|
||||
|
||||
if (local->queue_stop_reasons[queue] != 0)
|
||||
/* someone still has this queue stopped */
|
||||
return;
|
||||
@ -502,8 +503,6 @@ static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,
|
||||
{
|
||||
struct ieee80211_local *local = hw_to_local(hw);
|
||||
|
||||
trace_stop_queue(local, queue, reason);
|
||||
|
||||
if (WARN_ON(queue >= hw->queues))
|
||||
return;
|
||||
|
||||
@ -512,6 +511,9 @@ static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,
|
||||
else
|
||||
local->q_stop_reasons[queue][reason]++;
|
||||
|
||||
trace_stop_queue(local, queue, reason,
|
||||
local->q_stop_reasons[queue][reason]);
|
||||
|
||||
set_bit(reason, &local->queue_stop_reasons[queue]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user