net: tcp: tsq: Convert from tasklet to BH workqueue
authorTejun Heo <tj@kernel.org>
Mon, 16 Jun 2025 18:10:47 +0000 (08:10 -1000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Jun 2025 01:29:21 +0000 (18:29 -0700)
commitfd0406e5ca53b804353d4b1b60a980c13cbfbea3
tree0c607c5a0e26fc63260ee9c3ad71e1bbea7ac76e
parente15962ae74d9d093ecf3cf7f60dc145801d9273e
net: tcp: tsq: Convert from tasklet to BH workqueue

The only generic interface to execute asynchronously in the BH context is
tasklet; however, it's marked deprecated and has some design flaws. To
replace tasklets, BH workqueue support was recently added. A BH workqueue
behaves similarly to regular workqueues except that the queued work items
are executed in the BH context.

This patch converts TCP Small Queues implementation from tasklet to BH
workqueue.

Semantically, this is an equivalent conversion and there shouldn't be any
user-visible behavior changes. While workqueue's queueing and execution
paths are a bit heavier than tasklet's, unless the work item is being queued
every packet, the difference hopefully shouldn't matter.

My experience with the networking stack is very limited and this patch
definitely needs attention from someone who actually understands networking.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Cc: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/aFBeJ38AS1ZF3Dq5@slm.duckdns.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/tcp.h
net/ipv4/tcp.c
net/ipv4/tcp_output.c