summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGeorge Melikov <[email protected]>2017-02-01 01:44:03 +0300
committerBrian Behlendorf <[email protected]>2017-01-31 14:44:03 -0800
commit539d33c791da2f970cfa5a1bddf0533b23146265 (patch)
tree5a59b80e96d34734909339cba2740d348e2095e9 /include
parenta873815b95a4a66294c31db70cdce0e1a6ff650f (diff)
OpenZFS 6569 - large file delete can starve out write ops
Authored by: Alek Pinchuk <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Sanjay Nadkarni <[email protected]> Reviewed by: Pavel Zakharov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> Tested-by: kernelOfTruth <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/6569 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/1bf4b6f2 Closes #5706
Diffstat (limited to 'include')
-rw-r--r--include/sys/dsl_pool.h2
-rw-r--r--include/sys/trace_dmu.h30
2 files changed, 32 insertions, 0 deletions
diff --git a/include/sys/dsl_pool.h b/include/sys/dsl_pool.h
index 48b12e8eb..b509d312b 100644
--- a/include/sys/dsl_pool.h
+++ b/include/sys/dsl_pool.h
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
*/
#ifndef _SYS_DSL_POOL_H
@@ -106,6 +107,7 @@ typedef struct dsl_pool {
kcondvar_t dp_spaceavail_cv;
uint64_t dp_dirty_pertxg[TXG_SIZE];
uint64_t dp_dirty_total;
+ uint64_t dp_long_free_dirty_pertxg[TXG_SIZE];
uint64_t dp_mos_used_delta;
uint64_t dp_mos_compressed_delta;
uint64_t dp_mos_uncompressed_delta;
diff --git a/include/sys/trace_dmu.h b/include/sys/trace_dmu.h
index 916c9bdba..b2f37a6be 100644
--- a/include/sys/trace_dmu.h
+++ b/include/sys/trace_dmu.h
@@ -112,6 +112,36 @@ DEFINE_EVENT(zfs_delay_mintime_class, name, \
/* END CSTYLED */
DEFINE_DELAY_MINTIME_EVENT(zfs_delay__mintime);
+/* BEGIN CSTYLED */
+DECLARE_EVENT_CLASS(zfs_free_long_range_class,
+ TP_PROTO(uint64_t long_free_dirty_all_txgs, uint64_t chunk_len, \
+ uint64_t txg),
+ TP_ARGS(long_free_dirty_all_txgs, chunk_len, txg),
+ TP_STRUCT__entry(
+ __field(uint64_t, long_free_dirty_all_txgs)
+ __field(uint64_t, chunk_len)
+ __field(uint64_t, txg)
+ ),
+ TP_fast_assign(
+ __entry->long_free_dirty_all_txgs = long_free_dirty_all_txgs;
+ __entry->chunk_len = chunk_len;
+ __entry->txg = txg;
+ ),
+ TP_printk("long_free_dirty_all_txgs %llu chunk_len %llu txg %llu",
+ __entry->long_free_dirty_all_txgs,
+ __entry->chunk_len, __entry->txg)
+);
+/* END CSTYLED */
+
+/* BEGIN CSTYLED */
+#define DEFINE_FREE_LONG_RANGE_EVENT(name) \
+DEFINE_EVENT(zfs_free_long_range_class, name, \
+ TP_PROTO(uint64_t long_free_dirty_all_txgs, \
+ uint64_t chunk_len, uint64_t txg), \
+ TP_ARGS(long_free_dirty_all_txgs, chunk_len, txg))
+/* END CSTYLED */
+DEFINE_FREE_LONG_RANGE_EVENT(zfs_free__long__range);
+
#endif /* _TRACE_DMU_H */
#undef TRACE_INCLUDE_PATH