Page MenuHomeFreeBSD

gnop: change the count until fail option
AcceptedPublic

Authored by oshogbo on Mon, Dec 2, 2:42 PM.

Details

Reviewers
markj
imp
chs
kib
Summary

Change the "count_until_fail" option to gnop, know it's enables the
failing rating instead of setting them to 100%.

The original patch introduced the new flag, which sets the fail/rate to 100% after N requests.
In some cases, I don't want to have 100% of failure probabilities, I just want to start failing at some point.
For example on the early stage, I would like to allow some read/writes requests before having some requests delayed.
For example when I try to mount partition, or when I'm trying to import pool.
Other case maybe to check how scrub in ZFS will behave, on different stages.
This is allows us to cover more cases.
The previous behavior still maybe configured.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 27900
Build 26071: arc lint + arc unit

Event Timeline

oshogbo created this revision.Mon, Dec 2, 2:42 PM
kib added a comment.Mon, Dec 2, 10:33 PM

Isn't this the reverse of the intent of the option ?

oshogbo updated this revision to Diff 65141.Mon, Dec 2, 10:52 PM

Yes. I mess it up while refactoring it.

oshogbo updated this revision to Diff 65142.Mon, Dec 2, 10:54 PM

Update diff.

kib added a comment.Mon, Dec 2, 11:11 PM

I think you need to explain the purpose of the patch better.

Also regardless of that, I dislike it, you recalculate each of prob/delay vars several times. If I understand what you are trying to do, I would suggest to make the copy from sc to local vars conditional on sc_count_until_fail inside the switch.

oshogbo updated this revision to Diff 65144.Mon, Dec 2, 11:26 PM

@kib I introduced a helper function.

The original patch introduced the new flag, which sets the fail/rate to 100% after N requests.

In some cases, I don't want to have 100% of failure probabilities, I just want to start failing at some point.
For example on the early stage, I would like to allow some read/writes requests before having some requests delayed.
For example when I try to mount partition, or when I'm trying to import pool.
Other case maybe to check how scrub in ZFS will behave, on different stages.
This is allows us to cover more cases.
The previous behavior still maybe configured.

kib added inline comments.Mon, Dec 2, 11:55 PM
sys/geom/nop/g_nop.c
208

But for BIO_WRITE we use sc_w*prob ?

oshogbo updated this revision to Diff 65147.Tue, Dec 3, 12:10 AM

Fix value usage.

oshogbo added inline comments.Tue, Dec 3, 12:10 AM
sys/geom/nop/g_nop.c
208

It's embarrassing. I'm not touching keyboard tonight anymore.

kib accepted this revision.Tue, Dec 3, 2:46 PM

I suggest you to put the explanation of the change you did in response to my question, to the review summary and the commit message.

This revision is now accepted and ready to land.Tue, Dec 3, 2:46 PM
oshogbo edited the summary of this revision. (Show Details)Sun, Dec 8, 1:46 PM