-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Prevent arc_c collapse #4256
Prevent arc_c collapse #4256
Conversation
Adjusting arc_c directly is racy because it can happen in the context of multiple threads. It should always be >= 2 * maxblocksize. Set it to a known valid value rather than adjusting it directly. Reverts: 935434e Fixes: openzfs#3904 Fixes: openzfs#4161
This is intended to be a lock-free alternative to #4197. |
@dweeezil nice, this LGTM and tests well. If you don't have any remaining concerns I'd like to merge it to master to resolve those occasional ztest failures. |
@behlendorf Go for it. The only thing I'm wondering is whether we should remove the |
@dweeezil Looks like the buildbot just hit the assertion
http://buildbot.zfsonlinux.org/builders/CentOS%206.7%20x86_64%20%28TEST%29/builds/469 which is supposedly fixed by #4197 |
OK, I'm going to hold off then. This needs some more investigation, perhaps we missed a place where a negative value gets added in with |
In addition to a simpler structure, protect against underflow in the calculation of the new arc_c value.
The only thing I can think of is that |
I've applied the 48f4c26 patch to @kernelOfTruth's kernelOfTruth/zfs@eee4f05 (abd_next-rebase_22.01.2016 branch) and successfully ran an hour of ztest (modified to cap physmem at 1GiB) with 40 threads. It seems to be doing ok on the 'bots, too, but only a few have finished so far. |
@dweeezil that's good to hear ! Thanks for letting me know :) |
@dweeezil, @kernelOfTruth this LGTM and tested well. I've squashed these two commit together and merged them to master as: 1b8951b Prevent arc_c collapse |
Adjusting arc_c directly is racy because it can happen in the context
of multiple threads. It should always be >= 2 * maxblocksize. Set it
to a known valid value rather than adjusting it directly.
Reverts: 935434e
Fixes: #3904
Fixes: #4161