-
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 #2796
Closed
Closed
Kmem rework #2796
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
ryao
force-pushed
the
kmem-rework
branch
2 times, most recently
from
October 13, 2014 11:21
96e6306
to
67068fb
Compare
Closed
Additional work is necessary to revert patches that changed KM_SLEEP to KM_PUSHPAGE, but that can be done independently of marking transactions with PF_TRANS. |
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 <[email protected]>
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 <[email protected]>
The initial port of ZFS to Linux required a way to identify virtual memory to make IO to virtual memory backed slabs work, so kmem_virt() was created. Linux 2.6.25 introduced is_vmalloc_addr(), which is logically equivalent to kmem_virt(). Support for kernels before 2.6.26 was later dropped and more recently, support for kernels before Linux 2.6.32 has been dropped. We retire kmem_virt() in favor of is_vmalloc_addr() to cleanup the code. Signed-off-by: Richard Yao <[email protected]>
@ryao Hi, is there any progress on this PR ? |
@edillmann It's dependent on its spl counterpart which we're making steady progress on. It's getting close and I expect it will be part of the next tag. |
behlendorf
added
Bug - Minor
Component: Memory Management
kernel memory management
labels
Nov 19, 2014
@behlendorf thanks for this update |
Closed
Replaced by #2918 |
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 the accessory pull request for openzfs/spl#369.