Skip to content
Commit ecc53c48 authored by Jens Axboe's avatar Jens Axboe
Browse files

io-wq: check max_worker limits if a worker transitions bound state



For the two places where new workers are created, we diligently check if
we are allowed to create a new worker. If we're currently at the limit
of how many workers of a given type we can have, then we don't create
any new ones.

If you have a mixed workload with various types of bound and unbounded
work, then it can happen that a worker finishes one type of work and
is then transitioned to the other type. For this case, we don't check
if we are actually allowed to do so. This can cause io-wq to temporarily
exceed the allowed number of workers for a given type.

When retrieving work, check that the types match. If they don't, check
if we are allowed to transition to the other type. If not, then don't
handle the new work.

Cc: stable@vger.kernel.org
Reported-by: default avatarJohannes Lundberg <johalun0@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f1042b6c
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