Provide (transitional) vm_fault_quick_hold_pages_e() function that returns distinguishable errors in different failure situation. Also it does not panic() on too short array case, but return an error, allowing sometimes lessen the burden of the check from the caller. vm_fault_quick_hold_pages() becomes a wrapper, that should be eliminated eventually.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| sys/vm/vm_fault.c | ||
|---|---|---|
| 2035 | With count having the int type, I think this would be not correct. | |
Generally I like it, but the name is very long and specific for the logical concept of 'map this into the physical for I/O and keep it there'. But I have no better name, so I'll just grouse because I never could remember the order of the verbs when I was writing the nvme mapping code.
| sys/vm/vm_fault.c | ||
|---|---|---|
| 2005 | s/error is returned/error is returned and any holds are released./ maybe? Either *ALL* the pages are held, or NONE of them are, never some subset (there's code that thinks that a subset can be a possible result in the tree that we should attend to). | |
| 2035 | Yea, I agree. Logically it makes sense, but in the face of possible overflows, the current conservatism is better. | |
| sys/vm/vm_fault.c | ||
|---|---|---|
| 2114 | This needs to be updated too. | |
I would suggest dropping "quick_" from the name before anyone actually starts using it. The origin of "quick_" dates back to the Dyson-era, and represents the fact that the code tries to lookup the physical page(s) from the pmap before consulting the machine-independent data structures. Today, I don't see that as being important.