ahrens 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);
+}
+
+/*
+ * Determin
ahrens commented on this pull request.
> + * starting and the current txg sync was invoked on its behalf,
+* so be prepared to postpone autotrim processing.
+*/
+ if (!mutex_tryenter(&spa->spa_auto_trim_lock))
+ return;
+ spa->spa_num_auto_trimming
ahrens commented on this pull request.
> +
+ /*
+* Another pool management task might be currently prevented from
+* starting and the current txg sync was invoked on its behalf,
+* so be prepared to postpone autotrim processing.
+*/
+ if (!mutex_tryent
ahrens commented on this pull request.
> + for (uint64_t i = 0; i < spa->spa_root_vdev->vdev_children; i++) {
+ vdev_t *vd = spa->spa_root_vdev->vdev_child[i];
+ vdev_trim_info_t *vti = kmem_zalloc(sizeof (*vti), KM_SLEEP);
+ vti->vti_vdev = vd;
+
lundman approved this pull request.
Runs through the tester for us, which is an improvement. `abd_copy()` still
gets called with `src==dst`, but this is a noop generally. As we added "ABD
move" to our repo to decrease defragmentation, we will add code to skip the
null copy, but since that is pa
skiselkov commented on this pull request.
> + for (uint64_t i = 0; i < spa->spa_root_vdev->vdev_children; i++) {
+ vdev_t *vd = spa->spa_root_vdev->vdev_child[i];
+ vdev_trim_info_t *vti = kmem_zalloc(sizeof (*vti), KM_SLEEP);
+ vti->vti_vdev = vd;
+
skiselkov commented on this pull request.
> + spa_get_force_trim(vd->vdev_spa) !=
+ SPA_FORCE_TRIM_ON) {
+ zio->io_error = SET_ERROR(ENOTSUP);
+ break;
+ }
+
+
@ahrens I tried to implement the metaslab weight adjustment when taking chunks
out of the metaslab due to trimming. The case when the metaslab is loaded is
easy. However, the unloaded case, where we only have the spacemap histogram, is
not possible. Here's why: I can construct a "negative" histo
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);
+}
+
+/*
+ * Deter
skiselkov commented on this pull request.
> + * threads because the trim rate might have changed above.
+*/
+ cv_broadcast(&spa->spa_man_trim_update_cv);
+ mutex_exit(&spa->spa_man_trim_lock);
+ return;
+ }
+ spa_
skiselkov commented on this pull request.
> + * starting and the current txg sync was invoked on its behalf,
+* so be prepared to postpone autotrim processing.
+*/
+ if (!mutex_tryenter(&spa->spa_auto_trim_lock))
+ return;
+ spa->spa_num_auto_trimmi
skiselkov commented on this pull request.
> +
+ /*
+* Another pool management task might be currently prevented from
+* starting and the current txg sync was invoked on its behalf,
+* so be prepared to postpone autotrim processing.
+*/
+ if (!mutex_try
skiselkov commented on this pull request.
> + */
+typedef enum {
+ SPA_FORCE_TRIM_OFF = 0, /* default */
+ SPA_FORCE_TRIM_ON
+} spa_force_trim_t;
+
+/*
+ * Should we send TRIM commands in-line during normal pool operation while
+ * deleting stuff?
+ * OFF: no
+ * ON: yes
+ */
Merged #376.
--
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/376#event-1079193443
--
openzfs-developer
Archives: https://openzfs.topicbox.com/gro
prakashsurya approved this pull request.
--
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/376#pullrequestreview-37728770
--
openzfs-developer
behlendorf commented on this pull request.
> + spa_get_force_trim(vd->vdev_spa) !=
+ SPA_FORCE_TRIM_ON) {
+ zio->io_error = SET_ERROR(ENOTSUP);
+ break;
+ }
+
+
ahrens commented on this pull request.
> + */
+typedef enum {
+ SPA_FORCE_TRIM_OFF = 0, /* default */
+ SPA_FORCE_TRIM_ON
+} spa_force_trim_t;
+
+/*
+ * Should we send TRIM commands in-line during normal pool operation while
+ * deleting stuff?
+ * OFF: no
+ * ON: yes
+ */
+t
ahrens commented on this pull request.
> +
+ spa_config_enter(spa, SCL_STATE_ALL, FTAG, RW_READER);
+ ASSERT(vd->vdev_ms[0] != NULL);
+ cursor = vd->vdev_ms[0]->ms_start;
+ i = 0;
+ while (i < vti->vti_vdev->vdev_ms_count && !spa->spa_man_trim_stop) {
+
@zettabot go
--
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/375#issuecomment-300838936
--
openzfs-developer
Archives: https://openzfs.topicbox.c
19 matches
Mail list logo