Commit 6fae9129 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'io_uring-6.4-2023-05-26' of git://git.kernel.dk/linux

Pull io_uring fix from Jens Axboe:
 "Just a single fix for the conditional schedule with the SQPOLL thread,
  dropping the uring_lock if we do need to reschedule"

* tag 'io_uring-6.4-2023-05-26' of git://git.kernel.dk/linux:
  io_uring: unlock sqd->lock before sq thread release CPU
parents 77af1f2b 533ab73f
...@@ -255,9 +255,13 @@ static int io_sq_thread(void *data) ...@@ -255,9 +255,13 @@ static int io_sq_thread(void *data)
sqt_spin = true; sqt_spin = true;
if (sqt_spin || !time_after(jiffies, timeout)) { if (sqt_spin || !time_after(jiffies, timeout)) {
cond_resched();
if (sqt_spin) if (sqt_spin)
timeout = jiffies + sqd->sq_thread_idle; timeout = jiffies + sqd->sq_thread_idle;
if (unlikely(need_resched())) {
mutex_unlock(&sqd->lock);
cond_resched();
mutex_lock(&sqd->lock);
}
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment