-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add knob to disable slow io notifications #17477
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
Open
oshogbo
wants to merge
1
commit into
openzfs:master
Choose a base branch
from
oshogbo:oshogbo/n_knob
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,7 @@ typeset -a properties=( | |
checksum_t | ||
io_n | ||
io_t | ||
slow_io_events | ||
slow_io_n | ||
slow_io_t | ||
trim_support | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
|
||
# | ||
# Copyright (c) 2023, Klara Inc. | ||
# Copyright (c) 2025, Mariusz Zaborski <[email protected]> | ||
# | ||
|
||
# DESCRIPTION: | ||
|
@@ -140,8 +141,8 @@ function slow_io_degrade | |
{ | ||
do_setup | ||
|
||
zpool set slow_io_n=5 $TESTPOOL $VDEV | ||
zpool set slow_io_t=60 $TESTPOOL $VDEV | ||
log_must zpool set slow_io_n=5 $TESTPOOL $VDEV | ||
log_must zpool set slow_io_t=60 $TESTPOOL $VDEV | ||
|
||
start_slow_io | ||
for i in {1..16}; do | ||
|
@@ -193,6 +194,44 @@ function slow_io_no_degrade | |
do_clean | ||
} | ||
|
||
# Change slow_io_n, slow_io_t to 5 events in 60 seconds | ||
# fire more than 5 events. Disable slow io events. | ||
# Should not degrade. | ||
function slow_io_degrade_disabled | ||
{ | ||
do_setup | ||
|
||
log_must zpool set slow_io_n=5 $TESTPOOL $VDEV | ||
log_must zpool set slow_io_t=60 $TESTPOOL $VDEV | ||
log_must zpool set slow_io_events=off $TESTPOOL $VDEV | ||
|
||
start_slow_io | ||
for i in {1..16}; do | ||
dd if=${FILEPATH}$i of=/dev/null count=1 bs=512 2>/dev/null | ||
sleep 0.5 | ||
done | ||
stop_slow_io | ||
zpool sync | ||
|
||
# | ||
# wait 60 seconds to confirm that zfs.delay was not generated. | ||
# | ||
typeset -i i=0 | ||
typeset -i events=0 | ||
while [[ $i -lt 60 ]]; do | ||
events=$(zpool events | grep "ereport\.fs\.zfs.delay" | wc -l) | ||
i=$((i+1)) | ||
sleep 1 | ||
done | ||
log_note "$events delay events found" | ||
|
||
[ $events -eq "0" ] || \ | ||
log_fail "expecting no delay events, found $events" | ||
|
||
log_mustnot wait_vdev_state $TESTPOOL $VDEV "DEGRADED" 45 | ||
do_clean | ||
} | ||
|
||
log_assert "Test ZED slow io configurability" | ||
log_onexit cleanup | ||
|
||
|
@@ -202,5 +241,6 @@ log_must zed_start | |
default_degrade | ||
slow_io_degrade | ||
slow_io_no_degrade | ||
slow_io_degrade_disabled | ||
|
||
log_pass "Test ZED slow io configurability" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to move the
panic()
intovdev_prop_get_objid()
to save having to test it everywhere it is used?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use it in
vdev_prop_get_int
, and then it is used for example here to generate an error.So I would leave it as is for a consumer to decide if it should panic or not.