-
Notifications
You must be signed in to change notification settings - Fork 11
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
VFS dcache work (& misc) #124
Merged
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
Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
What seems to be an innocent check doesn't actually work, since pages can be unmapped by a variety of reasons (e.g truncation), and mapcount = 0 && ref > 1 doesn't exactly mean it's a leaked page. Signed-off-by: Pedro Falcato <[email protected]>
The comparison was wrong and the signal setting was wrong too. Signed-off-by: Pedro Falcato <[email protected]>
Lets start progressively switching architectures to the shared code. First off, x86. Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
fsyncdata provides fsync/writeback-like semantics like regular writeback-needing filesystems, and allows us to pass tests/emulate fsync/msync/fsyncdata as required. Signed-off-by: Pedro Falcato <[email protected]>
Switch riscv64 to the new page table code, and add a few new wrappers and headers (pmd_mkpmd, et al). This commit also fixed fork() breakage that was introduced at some unknown point in time. Signed-off-by: Pedro Falcato <[email protected]>
Add kmem_cache_alloc_bulk and free_bulk, which allow us to allocate objects in batches, as efficiently as the allocator allows (avoiding relocking or a preempt-off/preempt-on dance). Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Add GFP_NOWAIT and a linux-compat helper. Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Add Maple Tree, an RCU-ready btree implementation. Taken from Linux, commit d67978318827d06f1c0fa4c31343a279e9df6fde. Relevant xarray bits are also copied over. Signed-off-by: Pedro Falcato <[email protected]>
The maple tree is faster, allows for RCU *and* gives us efficient range allocation for free. Yay! Signed-off-by: Pedro Falcato <[email protected]>
We botched redzone aligning for a good while, which resulted in alignment problems when freeing (particularly if the caller expected a certain alignment for pointer bit usage, like maple tree). Signed-off-by: Pedro Falcato <[email protected]>
We were leaking packetbufs as we didn't unref them after going down the stack. Signed-off-by: Pedro Falcato <[email protected]>
So, it turns out we were assuming we assuredly had mapcount = 0 after unmapping, since we held the lock. This somewhat makes sense, but misses the edge case of a fork happening (incrementing mapcount) and not being seen by the unmap code. So, instead of CHECK()ing for mapcount = 0, just return failure to remove the page. This should activate the page and guarantee forward progress. Signed-off-by: Pedro Falcato <[email protected]>
Instead of maintaing a separate data layer (amaps), store the pages in the page tables. After mapping a new anon, put the page. This results in the page's mapcount working like an automatic anon page refcount. While on it, we also implement an optimization where CoW'ing anon pages with mapcount = 1 do not get copied, but rather reused and remapped writable. Signed-off-by: Pedro Falcato <[email protected]>
Refactor sys_mmap, simplifying and organizing the code. This should also result in a nice speedup. Signed-off-by: Pedro Falcato <[email protected]>
Delete and staticify a *lot* of stuff. Signed-off-by: Pedro Falcato <[email protected]>
Collapse vm_maptype into vm_flags. Signed-off-by: Pedro Falcato <[email protected]>
Add vma merging capabilities for mmap. Signed-off-by: Pedro Falcato <[email protected]>
If we don't reset WP, we might write into .text or rodata or even screw up when it comes to copy_to_user. How we didn't see related mysterious problems before is beyond me... Signed-off-by: Pedro Falcato <[email protected]>
Improve rename by adding a .rename operation. Also fix various refcount issues, etc. Signed-off-by: Pedro Falcato <[email protected]>
Add some simple tests for rename + nlink. Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Support dynamically setting the log level (through format) by playing some little tricks with the buffer. Signed-off-by: Pedro Falcato <[email protected]>
cputime account is severely wrong in certain cases (e.g make build). Let's temporarily use the scheduler's ticks. This should also be faster (but I didn't bother putting much time into this). Signed-off-by: Pedro Falcato <[email protected]>
We were erroneously double freeing. Signed-off-by: Pedro Falcato <[email protected]>
Add a WARN_ON implementation, with an x86 optimized variant. Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
We weren't converting it properly, which resulted in bogus d_type readdir entries. Signed-off-by: Pedro Falcato <[email protected]>
Don't use mas_expected_entries (for some reason, resulted in corruption). Also properly destroy the mas state. Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Add test_maple_tree (with Onyx patching on top), in sync with the maple tree's version. This is not a KUNIT test but is only built and ran if CONFIG_KUNIT. Signed-off-by: Pedro Falcato <[email protected]>
Draft
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.
No description provided.