Skip to content

Commit

Permalink
dmu_tx kstat cleanup
Browse files Browse the repository at this point in the history
A few counters in the dmu_tx kstats are obsolete or no longer
bumped properly.

- The sync task restructuring commit
  13fe019 removed the code
  that bumpted dmu_tx_quota. The counter is now bumped in two
  cases, instead of just the one case as before (after the result
  of dsl_dataset_check_quota call). The second case is where
  we check the requested reservation against the actual pool size,
  as this is an implicit quota of sorts.

- The write throttle restructuring commit
  e8b96c6 makes dmu_tx_how and
  dmu_tx_inflight obsolete, so they are removed.

Signed-off-by: Kohsuke Kawaguchi <[email protected]>
Signed-off-by: Ned Bass <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#1914
  • Loading branch information
nedbass authored and behlendorf committed Mar 4, 2014
1 parent cecb748 commit 3d920a1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions include/sys/dmu_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,8 @@ typedef struct dmu_tx_stats {
kstat_named_t dmu_tx_error;
kstat_named_t dmu_tx_suspended;
kstat_named_t dmu_tx_group;
kstat_named_t dmu_tx_how;
kstat_named_t dmu_tx_memory_reserve;
kstat_named_t dmu_tx_memory_reclaim;
kstat_named_t dmu_tx_memory_inflight;
kstat_named_t dmu_tx_dirty_throttle;
kstat_named_t dmu_tx_dirty_delay;
kstat_named_t dmu_tx_dirty_over_max;
Expand Down
2 changes: 0 additions & 2 deletions module/zfs/dmu_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ dmu_tx_stats_t dmu_tx_stats = {
{ "dmu_tx_error", KSTAT_DATA_UINT64 },
{ "dmu_tx_suspended", KSTAT_DATA_UINT64 },
{ "dmu_tx_group", KSTAT_DATA_UINT64 },
{ "dmu_tx_how", KSTAT_DATA_UINT64 },
{ "dmu_tx_memory_reserve", KSTAT_DATA_UINT64 },
{ "dmu_tx_memory_reclaim", KSTAT_DATA_UINT64 },
{ "dmu_tx_memory_inflight", KSTAT_DATA_UINT64 },
{ "dmu_tx_dirty_throttle", KSTAT_DATA_UINT64 },
{ "dmu_tx_dirty_delay", KSTAT_DATA_UINT64 },
{ "dmu_tx_dirty_over_max", KSTAT_DATA_UINT64 },
Expand Down
2 changes: 2 additions & 0 deletions module/zfs/dsl_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ dsl_dir_tempreserve_impl(dsl_dir_t *dd, uint64_t asize, boolean_t netfree,
asize, est_inflight, &used_on_disk, &ref_rsrv);
if (error) {
mutex_exit(&dd->dd_lock);
DMU_TX_STAT_BUMP(dmu_tx_quota);
return (error);
}
}
Expand Down Expand Up @@ -683,6 +684,7 @@ dsl_dir_tempreserve_impl(dsl_dir_t *dd, uint64_t asize, boolean_t netfree,
used_on_disk>>10, est_inflight>>10,
quota>>10, asize>>10, retval);
mutex_exit(&dd->dd_lock);
DMU_TX_STAT_BUMP(dmu_tx_quota);
return (SET_ERROR(retval));
}

Expand Down

0 comments on commit 3d920a1

Please sign in to comment.