aboutsummaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorGravatar Jakub Kicinski <kuba@kernel.org> 2023-06-01 15:33:03 -0700
committerGravatar Jakub Kicinski <kuba@kernel.org> 2023-06-01 15:38:26 -0700
commita03a91bd68cb00c615e602cf605e6be12bedaa90 (patch)
treed26ef8bf5538d777498d6ef0fc6e4cc69475415b /io_uring
parentMerge branch 'splice-net-handle-msg_splice_pages-in-chelsio-tls' (diff)
parentMerge tag 'net-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff)
downloadlinux-a03a91bd68cb00c615e602cf605e6be12bedaa90.tar.gz
linux-a03a91bd68cb00c615e602cf605e6be12bedaa90.tar.bz2
linux-a03a91bd68cb00c615e602cf605e6be12bedaa90.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. No conflicts. Adjacent changes: drivers/net/ethernet/sfc/tc.c 622ab656344a ("sfc: fix error unwinds in TC offload") b6583d5e9e94 ("sfc: support TC decap rules matching on enc_src_port") net/mptcp/protocol.c 5b825727d087 ("mptcp: add annotations around msk->subflow accesses") e76c8ef5cc5b ("mptcp: refactor mptcp_stream_accept()") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/sqpoll.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c
index 9db4bc1f521a..5e329e3cd470 100644
--- a/io_uring/sqpoll.c
+++ b/io_uring/sqpoll.c
@@ -255,9 +255,13 @@ static int io_sq_thread(void *data)
sqt_spin = true;
if (sqt_spin || !time_after(jiffies, timeout)) {
- cond_resched();
if (sqt_spin)
timeout = jiffies + sqd->sq_thread_idle;
+ if (unlikely(need_resched())) {
+ mutex_unlock(&sqd->lock);
+ cond_resched();
+ mutex_lock(&sqd->lock);
+ }
continue;
}