[ ... ]
This patch improves dispatching from sw queue by using the callback of
.get_budget and .put_budget
Reviewed-by: Omar Sandoval <osandov@xxxxxx>
Reviewed-by: Bart Van Assche <bart.vanassche@xxxxxxx>
Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
---
Jens/Omar, once .get_budget is introduced, it can be unusual to
return busy from .queue_rq, so we can't use the approach discussed
to decide to take one by one or flush all. Then this patch
simply checks if .get_budget is implemented, looks it is reasonable,
and in future it is even possible to take more requests by getting
enough budget first.
[ ... ]