These functions have become somewhat sprawling. This is partially my fault. Now that we never grab or grab_pages without a busy lock held the same asserts work in both cases. Other than this, I do not intend for there to be any functional differences.
Details
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 27919 Build 26088: arc lint + arc unit
Event Timeline
sys/vm/vm_page.c | ||
---|---|---|
865 | I renamed this to vm_page_acquire_flags in a different patch since it will also wire the page. I think I like this name better. I also feel like this file should really be split. Can svn do that while maintaining version history? |
sys/vm/vm_page.c | ||
---|---|---|
865 | I believe you can preserve history by doing an svn cp of the file before removing most of its contents. The file is kind of unwieldy but I also like the fact that basically all logic for manipulating vm_page structures is in one file. How do you propose splitting it? | |
4392 | It is confusing that we use pflags as allocation flags and allocflags for everything else. | |
4478–4482 | Why test == 0 when the function returns a bool? |
sys/vm/vm_page.c | ||
---|---|---|
4392 | It is somewhat confusing but unfortunately necessary. I could also break out the asserts and only compute pflags when calling vm_page_alloc so the visibility is limited. |
sys/vm/vm_page.c | ||
---|---|---|
865 | I think lookup/grab/busy/wire and allocation could be split. I don't think it's absolutely necessary to do though. |