public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Dao Zhong Ma <cz1346219@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	antonio@openvpn.net, sd@queasysnail.net, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com
Subject: Re: [PATCH 1/1] ovpn: tcp - defer TX from softirq to workqueue
Date: Fri, 1 May 2026 16:12:26 -0700	[thread overview]
Message-ID: <20260501161226.0239262c@kernel.org> (raw)
In-Reply-To: <20260501145425.757147-2-cz1346219@gmail.com>

On Fri,  1 May 2026 22:54:25 +0800 Dao Zhong Ma wrote:
> ovpn_tcp_send_skb() holds sk->sk_lock.slock while performing the full TCP
> send in softirq context. This can hold the spinlock for a long time
> (large skb), blocking lock_sock() users. This can starve the RCU GP
> kthread and trigger RCU stalls warnings and hung tasks.
> 
> Defer the TCP send operation to process context:
> - In interrupt context, only enqueue the skb under the spinlock
>   schedule tcp_tx_work.
> - In process context, dequeue and flush the send queue under lock_sock()
> 
> This reduces the softirq critical section to a short duration, allowing
> lock_sock() users to make progress and preventing RCU stalls.

This appears to break the ovpn selftests

  reply	other threads:[~2026-05-01 23:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-01 14:54 [PATCH 0/1] ovpn: tcp - defer TX from softirq to workqueue Dao Zhong Ma
2026-05-01 14:54 ` [PATCH 1/1] " Dao Zhong Ma
2026-05-01 23:12   ` Jakub Kicinski [this message]
2026-05-03 21:14   ` Antonio Quartulli

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=20260501161226.0239262c@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=antonio@openvpn.net \
    --cc=cz1346219@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    /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