diff options
author | Gabriel Krisman Bertazi <krisman@suse.de> | 2022-11-15 17:45:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 09:34:34 +0100 |
commit | 12815a7d8f8231f53e075087ed7c6423f8c74d20 (patch) | |
tree | e9cd8a2ec508257b2b6e11f3b9084ebbd96cdc9b /kernel/sched | |
parent | 7ebde70510a12835a2a4168e2600b41456ffc314 (diff) | |
download | linux-12815a7d8f8231f53e075087ed7c6423f8c74d20.tar.gz |
sbitmap: Advance the queue index before waking up a queue
commit 976570b4ecd30d3ec6e1b0910da8e5edc591f2b6 upstream. When a queue is awaken, the wake_index written by sbq_wake_ptr currently keeps pointing to the same queue. On the next wake up, it will thus retry the same queue, which is unfair to other queues, and can lead to starvation. This patch, moves the index update to happen before the queue is returned, such that it will now try a different queue first on the next wake up, improving fairness. Fixes: 4f8126bb2308 ("sbitmap: Use single per-bitmap counting to wake up queued tags") Reported-by: Jan Kara <jack@suse.cz> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20221115224553.23594-2-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/sched')
0 files changed, 0 insertions, 0 deletions