From: "Toke Høiland-Jørgensen" <toke@kernel.org>
To: Alexander Wetzel <alexander@wetzel-home.de>,
Felix Fietkau <nbd@nbd.name>,
Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Simplify queue selection
Date: Tue, 10 May 2022 20:26:20 +0200 [thread overview]
Message-ID: <87zgjpw8fn.fsf@toke.dk> (raw)
In-Reply-To: <13154ef7-63ee-cfe7-3ebb-a7f1120985b6@wetzel-home.de>
Alexander Wetzel <alexander@wetzel-home.de> writes:
> On 10.05.22 18:10, Felix Fietkau wrote:
>> On 10.05.22 17:58, Alexander Wetzel wrote:
>>> Let iTXQ drivers also register four queues in netdev and move queue
>>> assignment to ndo_select_queue(), like it's done for other drivers.
>>>
>>> This gets rid of a special case in mac80211 and also increases the
>>> chance that when we call skb_get_hash() the skb is still hot in the CPU
>>> buffers.
>>>
>>> Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
>>
>> This has the disadvantage of requiring a redundant sta lookup in the tx
>> path for iTXQ drivers. I think the CPU cost of that one is probably
>> higher than any potential gain from calling skb_get_hash a bit earlier.
>
> Found that one, yes. But why do we then not drop ndo_select_queue() for
> all drivers?
>
> Or maybe just call skb_get_hash() in ndo_select_queue()... But I guess
> then it would make more sense to move the ndo_select_queue() into
> netdev, so all drivers get the optimization.
The reason it's an optimisation for mac80211 is that we know
skb_get_hash() will always be called later (when enqueueing into the
TXQ). This is not always the case for other drivers, so that is probably
a dubious optimisation to have in general.
-Toke
next prev parent reply other threads:[~2022-05-10 18:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 15:58 [PATCH] mac80211: Simplify queue selection Alexander Wetzel
2022-05-10 16:10 ` Felix Fietkau
2022-05-10 16:13 ` Alexander Wetzel
2022-05-10 16:21 ` Felix Fietkau
2022-05-10 16:22 ` Johannes Berg
2022-05-15 11:10 ` Alexander Wetzel
2022-05-10 18:26 ` Toke Høiland-Jørgensen [this message]
2022-05-10 19:06 ` Johannes Berg
2022-05-10 19:27 ` Toke Høiland-Jørgensen
2022-05-10 18:25 ` Toke Høiland-Jørgensen
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=87zgjpw8fn.fsf@toke.dk \
--to=toke@kernel.org \
--cc=alexander@wetzel-home.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).