summaryrefslogtreecommitdiffstats
path: root/module/zfs/arc.c
diff options
context:
space:
mode:
authorSerapheim Dimitropoulos <[email protected]>2019-01-13 10:09:46 -0800
committerBrian Behlendorf <[email protected]>2019-01-13 10:09:46 -0800
commit61c3391acc988573aaf9e59550f863de4affcb68 (patch)
tree915910c51e0bef4cf4ee0d792c75602e3d814ea3 /module/zfs/arc.c
parent83c796c5e9d9ecb28e9553338f079a5d6b015b10 (diff)
Serialize ZTHR operations to eliminate races
Adds a new lock for serializing operations on zthrs. The commit also includes some code cleanup and refactoring. Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Tom Caputi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Serapheim Dimitropoulos <[email protected]> Closes #8229
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r--module/zfs/arc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 9e0ffd06d..7e0963334 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -5113,7 +5113,7 @@ arc_adjust_cb_check(void *arg, zthr_t *zthr)
* from the ARC.
*/
/* ARGSUSED */
-static int
+static void
arc_adjust_cb(void *arg, zthr_t *zthr)
{
uint64_t evicted = 0;
@@ -5147,8 +5147,6 @@ arc_adjust_cb(void *arg, zthr_t *zthr)
}
mutex_exit(&arc_adjust_lock);
spl_fstrans_unmark(cookie);
-
- return (0);
}
/* ARGSUSED */
@@ -5190,7 +5188,7 @@ arc_reap_cb_check(void *arg, zthr_t *zthr)
* to free more buffers.
*/
/* ARGSUSED */
-static int
+static void
arc_reap_cb(void *arg, zthr_t *zthr)
{
int64_t free_memory;
@@ -5231,8 +5229,6 @@ arc_reap_cb(void *arg, zthr_t *zthr)
arc_reduce_target_size(to_free);
}
spl_fstrans_unmark(cookie);
-
- return (0);
}
#ifdef _KERNEL