skiselkov commented on this pull request.


> +     ASSERT(spa->spa_num_auto_trimming > 0);
+       spa->spa_num_auto_trimming--;
+       if (spa->spa_num_auto_trimming == 0)
+               cv_broadcast(&spa->spa_auto_trim_done_cv);
+       mutex_exit(&spa->spa_auto_trim_lock);
+}
+
+/*
+ * Determines the minimum sensible rate at which a manual TRIM can be
+ * performed on a given spa and returns it. Since we perform TRIM in
+ * metaslab-sized increments, we'll just let the longest step between
+ * metaslab TRIMs be 100s (random number, really). Thus, on a typical
+ * 200-metaslab vdev, the longest TRIM should take is about 5.5 hours.
+ * It *can* take longer if the device is really slow respond to
+ * zio_trim() commands or it contains more than 200 metaslabs, or
+ * metaslab sizes vary widely between top-level vdevs.

Right. I'll rework this to allow for lower settings (1/1000th of a metaslab 
size) and also reword the comment to remove the reference to the old 
metaslab-at-a-time timing algorithm.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/172#discussion_r116188972
------------------------------------------
openzfs-developer
Archives: https://openzfs.topicbox-beta.com/groups/developer/
Powered by Topicbox: https://topicbox-beta.com

Reply via email to