mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 03:50:53 +07:00
io-wq: don't resched if there is no work
This little tweak restores the behaviour that was before the recent io_worker_handle_work() optimisation patches. It makes the function do cond_resched() and flush_signals() only if there is an actual work to execute. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
2293b41958
commit
d78298e73a
@ -458,10 +458,12 @@ static void io_impersonate_work(struct io_worker *worker,
|
||||
static void io_assign_current_work(struct io_worker *worker,
|
||||
struct io_wq_work *work)
|
||||
{
|
||||
if (work) {
|
||||
/* flush pending signals before assigning new work */
|
||||
if (signal_pending(current))
|
||||
flush_signals(current);
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
spin_lock_irq(&worker->lock);
|
||||
worker->cur_work = work;
|
||||
|
Loading…
Reference in New Issue
Block a user