-
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
VM work #88
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]>
We use panic() in the file but forgot to include it. Signed-off-by: Pedro Falcato <[email protected]>
Add an interval tree implementation based on lib/binary_search_tree's augmented capabilities. Signed-off-by: Pedro Falcato <[email protected]>
Add a get_per_cpu alternative that does not have volatile and thus can be re-ordered/removed if the compiler chooses to. Signed-off-by: Pedro Falcato <[email protected]>
These functions can in 99.9% of the cases be optimized out, so mark them pure and use get_per_cpu_stable. Signed-off-by: Pedro Falcato <[email protected]>
Add page reclamation code paths, more allocation flags and a cache shrinking framework for caches to be dynamically sized back. Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
map_page_list is broken and deprecated. Use mmiomap for the time being. Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
We forgot to do fence.i for the current, patching CPU. This is obviously incorrect as the icache and dcache will dsync. Signed-off-by: Pedro Falcato <[email protected]>
We were not calculating the load bias correctly, which led to crashes when booting relocatable EFI multiboot2 kernels. Signed-off-by: Pedro Falcato <[email protected]>
We were mismapping the physmap on higher memory (> 1GiB) machines. 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]>
Also separates MAP_PRIVATE handling, and removes some bits of old CoW VMO leftovers. Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Rework munmap, mprotect into correct (one would hope) variants. vma splitting now works correctly with vm_objects and with amaps. amaps also gained split, truncate and hole punching. Signed-off-by: Pedro Falcato <[email protected]>
Linuxize the name (I just like the VMA acronym!) and improve the structure somewhat. Prefix vma members with vma_. Replace vma_pages with vma_end. Signed-off-by: Pedro Falcato <[email protected]>
pahole does not support generating type information for float/double. Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
For future C compatibility... Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
heatd
force-pushed
the
pedro/vm
branch
2 times, most recently
from
November 12, 2023 19:27
df63bf3
to
4e8a750
Compare
This commit includes many changes (some slightly unrelated) that all build together to provide effective refactoring of the page cache. - Filemap handles the generic page cache paths - No one calls vmo_get apart from filemap - This means you cannot map a vmo using the page cache paths anymore, but only a file - This also means MAP_SHARED will need either its own tmpfs anon inode or its own fault_ops - Block devices now have their own superblock with their own inode - You now do not need to hold a lock when doing page cache IO - struct page grew page cache specific info (owner and pageoff) and we killed off struct page_cache_node This commit, however, still leaves you with a borked MAP_SHARED and borked writeback. Signed-off-by: Pedro Falcato <[email protected]>
This follows linux's idea in keeping anonymous tmpfs inodes as the backing for shared memory. Why? Because it's just useful, in case we want to bother dabbling with tmpfs swapping in the future (as then shmem gets it for free, and vice-versa). Signed-off-by: Pedro Falcato <[email protected]>
Add a test that does a basic exercise of MAP_SHARED in anonymous memory, since many boots don't actually get to exercise it at all. Signed-off-by: Pedro Falcato <[email protected]>
Refactor filemap by unifying certain codepaths (e.g bbuffer and filemap). This is done in preparation for writeback overhauling. As of this commit, dirtying does not do anything, and writeback never happens. Signed-off-by: Pedro Falcato <[email protected]>
Preparation for further refactoring. Signed-off-by: Pedro Falcato <[email protected]>
This commit introduces per-zone page stat counting (sharding these counters per-cpu). A few basic counters are introduced (but not yet hooked up). These are: file pages, anon pages, dirty, writeback, reclaimable slab pages, unreclaimable slab pages, and LRU stats for file and anon. With these, struct page_pcpu_data fills exactly two 64-byte cache lines, so it introduces minimal wastage. 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]>
Update ENABLE_SCREAM_EXCEPTION's code to work with the new vm changes. Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Add --fsync and --fsync-dir, to sync the file and the file's parent dir. This helps isolate and debug IO on the actual file. Signed-off-by: Pedro Falcato <[email protected]>
Completely rework writeback functionality. It's now much more stable, although still synchronous. New file_ops callbacks have been added (writepages and fsyncdata). Signed-off-by: Pedro Falcato <[email protected]>
Previously, we forgot locking the cache when freeing an object from the quarantine. This fixes it. While we're at it, add asserts to the slab queues (but disabled by default, even when debugging, as walking through a linked list N times is horrendously expensive). Also, in the meanwhile, add GFP_ATOMIC as the default malloc() flag. This is bad, but it's better than not being able to kick off paged. Signed-off-by: Pedro Falcato <[email protected]>
This fixes crashes when touching uninitialized data, after splitting. Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
Signed-off-by: Pedro Falcato <[email protected]>
The VMO was unused anyway, and it doesn't make much sense. Signed-off-by: Pedro Falcato <[email protected]>
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.