All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@kernel.org>
To: Alexander Wetzel <alexander@wetzel-home.de>,
	linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [PATCH] wifi: mac80211: Use internal TX queues for all drivers
Date: Fri, 30 Sep 2022 13:06:19 +0200	[thread overview]
Message-ID: <87v8p5jf4k.fsf@toke.dk> (raw)
In-Reply-To: <4496641c-9f7d-a61e-78af-35e9bb7c3a40@wetzel-home.de>

Alexander Wetzel <alexander@wetzel-home.de> writes:

> <resend to all, sorry for duplicates >
>
> On 29.09.22 16:23, Toke Høiland-Jørgensen wrote:
>
> [...]
>>> diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
>>> index 9f4377566c42..cde169038429 100644
>>> --- a/net/mac80211/trace.h
>>> +++ b/net/mac80211/trace.h
>>> @@ -2301,37 +2301,6 @@ TRACE_EVENT(drv_tdls_recv_channel_switch,
>>>   	)
>>>   );
>>>   
>>> -TRACE_EVENT(drv_wake_tx_queue,
>>> -	TP_PROTO(struct ieee80211_local *local,
>>> -		 struct ieee80211_sub_if_data *sdata,
>>> -		 struct txq_info *txq),
>>> -
>>> -	TP_ARGS(local, sdata, txq),
>>> -
>>> -	TP_STRUCT__entry(
>>> -		LOCAL_ENTRY
>>> -		VIF_ENTRY
>>> -		STA_ENTRY
>>> -		__field(u8, ac)
>>> -		__field(u8, tid)
>>> -	),
>>> -
>>> -	TP_fast_assign(
>>> -		struct ieee80211_sta *sta = txq->txq.sta;
>>> -
>>> -		LOCAL_ASSIGN;
>>> -		VIF_ASSIGN;
>>> -		STA_ASSIGN;
>>> -		__entry->ac = txq->txq.ac;
>>> -		__entry->tid = txq->txq.tid;
>>> -	),
>>> -
>>> -	TP_printk(
>>> -		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " ac:%d tid:%d",
>>> -		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ac, __entry->tid
>>> -	)
>>> -);
>>> -
>>>   TRACE_EVENT(drv_get_ftm_responder_stats,
>>>   	TP_PROTO(struct ieee80211_local *local,
>>>   		 struct ieee80211_sub_if_data *sdata,
>>> @@ -3026,6 +2995,37 @@ TRACE_EVENT(stop_queue,
>>>   	)
>>>   );
>>>   
>>> +TRACE_EVENT(wake_tx_queue,
>> 
>> I know tracepoints are technically not considered API, but that doesn't
>> mean we *have* to break them if there's no reason to. And since the
>> actual contents is the same, how about keeping the old name as an alias
>> for this?
>> 
>
> I don't understand what we would gain by an alias.
> For me it looks like an alias would just be confusing and never be used...
>
> Or why would anyone want to make additional calls to 
> trace[_drv]_wake_tx_queue() on top what we have in the patch?
>
> I initially also considered to simply keep trace_drv_wake_tx_queue(). 
> (But that looked to be misleading.) If there is some reason to keep the 
> old name I would just switch back to trace_drv_wake_tx_queue().

Well, the tracepoint is something that is read from userspace by
programs that want to trace the stack. The current one lives in
/sys/kernel/tracing/events/mac80211/drv_wake_tx_queue/

So if you rename it, any debug/tracing tooling that uses this will have
to be updated to use the new name. Which is not an ABI problem per se
(we exempt tracepoints from that), but it's also annoying if anyone *is*
actually using that tracepoint, so no reason to break things unless
there's really a compelling reason to...

I also thought the tracing subsystem had an alias mechanism built-in to
handle this sort of thing, but I think I may be misremembering this part.

> But when we are discussing that code anyhow, there is another related issue:
> I was not sure if it's ok to keep the renamed wake_tx_queue trace call 
> in the old position. (In the section otherwise only having driver 
> calls.) Having a better structured file did seem more desirable than a 
> shorter patch, so I moved it.

I think I would lean towards just keeping it in the old position with
the old name for the reasons outlined above... This is not an incredibly
strong opinion, though, so if anyone has stronger opinions in the other
direction I can probably be convinced ;)

-Toke

  reply	other threads:[~2022-09-30 11:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 16:13 [PATCH] wifi: mac80211: Use internal TX queues for all drivers Alexander Wetzel
2022-09-29 14:23 ` Toke Høiland-Jørgensen
2022-09-30  7:09   ` Alexander Wetzel
2022-09-30 11:06     ` Toke Høiland-Jørgensen [this message]
2022-09-29 20:40 ` Johannes Berg
2022-09-30  9:08   ` Alexander Wetzel
2022-09-30  9:41     ` Johannes Berg
2022-10-05 11:39 ` Johannes Berg
2022-10-05 12:26   ` Toke Høiland-Jørgensen
2022-10-05 12:40     ` Johannes Berg
2022-10-05 14:43       ` Toke Høiland-Jørgensen
2022-10-05 18:10         ` Johannes Berg
2022-10-06 11:43           ` Toke Høiland-Jørgensen
2022-10-06 16:42         ` Alexander Wetzel
2022-10-06 16:06   ` Alexander Wetzel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8p5jf4k.fsf@toke.dk \
    --to=toke@kernel.org \
    --cc=alexander@wetzel-home.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.