-
Notifications
You must be signed in to change notification settings - Fork 48
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
UVM: basic implementation of amap #1072
Conversation
* Add missing PAGE_SHIFT definition in vm_param for AArch64 & mips. * Add definition of uvm_amap. * Add interface for uvm_amap. * Add definition of uvm_aref. * Add simple test for uvm_amap. It's based on NetBSD implementation [1] described by Cranor [2]. [1] https://nxr.netbsd.org/xref/src/sys/uvm/uvm_amap.c [2] https://chuck.cranor.org/p/diss.pdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be happy to see assertions about held lock in functions that require it (at least in functions *_nolock
). It could help in future.
What do you think about moving tests into |
I'm not sure. From my point of view amap is a separate structure that can live without rest of UVM. But if you thing that one place for all tests is a better idea you can push that directly here. It's not a a big thing for me. |
Hm... I'm not sure if it's necessary. That functions are private for amap and called only from their locked brothers now. |
int *am_slot; /* (@) slots of used anons - refers to am_bckptr */ | ||
int *am_bckptr; /* (@) stack of used anons - refers to am_anon & am_slots */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to UVM functionality of am_slot and am_backptr should be swapped.
Closing the PR as requested in #1072 (comment) |
It's a first step for new virtual memory subsystem [1] in Mimiker.
amap describes an area of anonymous memory. It 's a upper layer of UVM’s two-layer mapping scheme.
It's based on NetBSD implementation [2] described by Cranor [3].
[1] #1073
[2] https://nxr.netbsd.org/xref/src/sys/uvm/uvm_amap.c
[3] https://chuck.cranor.org/p/diss.pdf