@@ -541,6 +541,25 @@ static void throtl_pd_init(struct blkg_policy_data *pd)
if (cgroup_subsys_on_dfl(io_cgrp_subsys) && blkg->parent)
sq->parent_sq = &blkg_to_tg(blkg->parent)->service_queue;
tg->td = td;
+
+#ifdef CONFIG_BLK_DEV_THROTTLING_LOW
+ /*
+ * DM device sets QUEUE_FLAG_NONROT after the queue is registered,
+ * so the previous initialization is wrong in this case. Check and
+ * update it here.
+ */
+ if (blk_queue_nonrot(blkg->q) &&
+ td->filtered_latency != LATENCY_FILTERED_SSD) {
+ int i;
+
+ td->throtl_slice = DFL_THROTL_SLICE_SSD;
+ td->filtered_latency = LATENCY_FILTERED_SSD;
+ for (i = 0; i < LATENCY_BUCKET_SIZE; i++) {
+ td->avg_buckets[READ][i].latency = 0;
+ td->avg_buckets[WRITE][i].latency = 0;
+ }
+ }
+#endif
}
/*