Hi,
在 2024/04/13 2:11, Tejun Heo 写道:
Hello,
On Sat, Apr 06, 2024 at 04:00:59PM +0800, Yu Kuai wrote:
From: Yu Kuai <yukuai3@xxxxxxxxxx>
To avoid exposing blk-throttle internal implementation to general block
layer.
...
@@ -832,7 +832,7 @@ void submit_bio_noacct(struct bio *bio)
goto not_supported;
}
- if (blk_throtl_bio(bio))
+ if (rq_qos_throttle_bio(q, bio))
return;
submit_bio_noacct_nocheck(bio);
return;
This is a half-way conversion, right? You're adding a dedicated hook to
rq_qos and none of the other hooks can be used by blk-throtl. Even the name,
rq_qos_throttle_bio(), becomes a misnomer. I'm not really sure this makes
things better or worse. It makes certain things a bit cleaner but other
things nastier. I don't know.
Yes, the final goal is making all blk-cgroup policies modular, and this
patch use rq-qos to prevent exposing blk-throtle to block layer, like
other policies.
There is another choice that I think is feasible:
Let blk-throttle ping a policy id, and use the id to call throttle
function directly, this will require initializing the 'plid' from
blkcg_policy() during definition instead of blkcg_policy_register().
Thanks,
Kuai
Thanks.