Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc zevent improvements #11822

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions man/man5/zfs-module-parameters.5
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -3845,11 +3845,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
Expand Down
8 changes: 2 additions & 6 deletions module/zfs/fm.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#include <sys/console.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;

Expand Down Expand Up @@ -657,8 +657,7 @@ zfs_zevent_next(zfs_zevent_t *ze, nvlist_t **event, uint64_t *event_size,

#ifdef _KERNEL
/* Include events dropped due to rate limiting */
*dropped += ratelimit_dropped;
ratelimit_dropped = 0;
*dropped += atomic_swap_64(&ratelimit_dropped, 0);
#endif
ze->ze_dropped = 0;
out:
Expand Down Expand Up @@ -1621,9 +1620,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),
Expand Down