On Tue, Apr 2, 2024 at 5:23 AM Bart Van Assche <bvanassche@xxxxxxx> wrote:
Oops, I misread your patch. After having taken another look, myyes, it will affect sbq->wake_batch, But judging from the following code:
conclusions are as follows:
* sbitmap_queue_min_shallow_depth() is called. This causes
sbq->wake_batch to be modified but I don't think that it is a proper
fix for dd_limit_depth().
[ ... ]
* dd_limit_depth() still assigns a number in the range 1..nr_requests toyes, In order to avoid the performance regression problem that Harshit
data->shallow_depth while a number in the range 1..(1<<bt->sb.shift)
should be assigned.
Mogalapalli reported, this patch will not directly modify
dd->async_depth,
but user can modify dd->async_depth from sysfs according to user's
request. which will modify data->shallow_depth after user modify it by
sysfs.
My personal opinion is to keep the current dd->aync_depth unchanged to
avoid causing performance regression,
but it should allow users to set it by sysfs, and the WARN mentioned
best to be solved.
and just only change this part?
- sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, dd->async_depth);
+ sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, 1);
thanks!