summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Moeller <ryan@iXsystems.com>2021-03-31 13:56:37 -0400
committerBrian Behlendorf <behlendorf1@llnl.gov>2021-05-19 20:00:08 -0700
commit40b150acbceaeff0436de81c37dfb08a7b483cb7 (patch)
tree1343502d1870d4c11fc1b3666fe93b9b526a04a1
parentb5983b753e4799970602e981101af23cd2cd5fab (diff)
Don't scale zfs_zevent_len_max by CPU count
The lower bound for this scaling to too low and the upper bound is too high. Use a fixed default length of 512 instead, which is a reasonable value on any system. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #11822
-rw-r--r--man/man5/zfs-module-parameters.59
-rw-r--r--module/zfs/fm.c5
2 files changed, 5 insertions, 9 deletions
diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5
index d1fd6bed5..3838bd03a 100644
--- a/man/man5/zfs-module-parameters.5
+++ b/man/man5/zfs-module-parameters.5
@@ -14,7 +14,7 @@
.\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your
.\" own identifying information:
.\" Portions Copyright [yyyy] [name of copyright owner]
-.TH ZFS-MODULE-PARAMETERS 5 "Aug 24, 2020" OpenZFS
+.TH ZFS-MODULE-PARAMETERS 5 "Mar 31, 2021" OpenZFS
.SH NAME
zfs\-module\-parameters \- ZFS module parameters
.SH DESCRIPTION
@@ -3745,11 +3745,10 @@ Use \fB1\fR for yes and \fB0\fR for no (default).
\fBzfs_zevent_len_max\fR (int)
.ad
.RS 12n
-Max event queue length. A value of 0 will result in a calculated value which
-increases with the number of CPUs in the system (minimum 64 events). Events
-in the queue can be viewed with the \fBzpool events\fR command.
+Max event queue length.
+Events in the queue can be viewed with the \fBzpool events\fR command.
.sp
-Default value: \fB0\fR.
+Default value: \fB512\fR.
.RE
.sp
diff --git a/module/zfs/fm.c b/module/zfs/fm.c
index 7da5bc035..6ad4f582e 100644
--- a/module/zfs/fm.c
+++ b/module/zfs/fm.c
@@ -70,7 +70,7 @@
#include <sys/time.h>
#include <sys/zfs_ioctl.h>
-int zfs_zevent_len_max = 0;
+int zfs_zevent_len_max = 512;
int zfs_zevent_cols = 80;
int zfs_zevent_console = 0;
@@ -1621,9 +1621,6 @@ fm_init(void)
zevent_len_cur = 0;
zevent_flags = 0;
- if (zfs_zevent_len_max == 0)
- zfs_zevent_len_max = ERPT_MAX_ERRS * MAX(max_ncpus, 4);
-
/* Initialize zevent allocation and generation kstats */
fm_ksp = kstat_create("zfs", 0, "fm", "misc", KSTAT_TYPE_NAMED,
sizeof (struct erpt_kstat) / sizeof (kstat_named_t),