-
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
Kmem rework #2411
Closed
Closed
Kmem rework #2411
Conversation
This file contains 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
I have just refreshed this and openzfs/spl#369 with the changes that I described in #2390 as well as the DMU transaction processing fix that I described on the Open ZFS mailing list. The latter of the two have some trivial merge conflicts with #2484. |
We should have included sys/taskq.h directly because we use the taskq code here, but we instead had files that included sys/taskq.h also include sys/kmem.h, which happened to include sys/taskq.h. sys/kmem.h no longer does this, so we must define the include as we should have done in the first place. Signed-off-by: Richard Yao <ryao@gentoo.org>
We store the bdi in the superblock. This is accessed using virt_to_page in bit_waitqueue(), which does not work on kernel virtual memory. We switch to kzalloc()/kfree() to fix this. Signed-off-by: Richard Yao <ryao@gentoo.org>
It was thought that we could ensure forward progress by avoiding memory allocations during transaction processing and avoiding KM_SLEEP in the few instances in which we could not. Recent tests involving L2ARC on systems without swap have shown that this is not enough. VMWare's bencharmk on a system with 8GB of RAM and 200GB of L2ARC will reliably deadlock when atime is enabled, but will run fine when atime is not enabled. This was initially thought to be a mix of an extreme case of ARC contention and atime updates somehow blocking on transaction group commit, but further examination showed that only 137MB of RAM were in use by L2ARC's headers and additional testing showed no deadlocks occurred with 24GB of RAM when atime was enabled. Subsequent review of the code revealed that the only change was that direct reclaim no longer started transactions to perform atime updates. The logical conclusion is that direct reclaim can occur in locations that hold locks that block an open transaction through some unforeseen dependency chain. This patch attempts to address that by modifying the KM_SLEEP avoidance mechanism to be used in all transaction processing, rather than just operations on zvols. We also take the opportunity to do some cleanup by replacing PF_NOIO with PF_FSTRANS, which is the proper Linux flag for this. Signed-off-by: Richard Yao <ryao@gentoo.org>
ryao
added a commit
to ryao/zfs
that referenced
this pull request
Nov 29, 2014
We should have included sys/taskq.h directly because we use the taskq code here, but we instead had files that included sys/taskq.h also include sys/kmem.h, which happened to include sys/taskq.h. sys/kmem.h no longer does this, so we must define the include as we should have done in the first place. Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#2411
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a companion for openzfs/spl#369.