OpenZFS 6569 - large file delete can starve out write ops

Authored by: Alek Pinchuk <alek@nexenta.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: George Melikov <mail@gmelikov.ru>
Tested-by: kernelOfTruth <kerneloftruth@gmail.com>

OpenZFS-issue: https://www.illumos.org/issues/6569
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/1bf4b6f2
Closes #5706
This commit is contained in:
George Melikov
2017-02-01 01:44:03 +03:00
committed by Brian Behlendorf
parent a873815b95
commit 539d33c791
4 changed files with 94 additions and 5 deletions
+2
View File
@@ -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;
+30
View File
@@ -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