For now, copy the mbuf allocator.
Details
- Reviewers
jeff markj - Group Reviewers
manpages - Commits
- rS357547: uma: add UMA_ZONE_CONTIG, and a default contig_alloc
kyua test -k /usr/tests/sys/Kyuafile
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 28738 Build 26751: arc lint + arc unit
Event Timeline
share/man/man9/zone.9 | ||
---|---|---|
345 | drop ", but only" | |
477 | s/yields/allocates memory is used redundantly. I would say 'if memory with special constraints such as attributes, alignment, or address ranges must be used..." | |
sys/vm/uma.h | ||
238 | I think this could be phrased better as a constraint than a statement of fact. "Objects must be physically contiguous" Although that still seems to imply that somehow multiple objects are contiguous. We really want to express that a single object will be. | |
sys/vm/uma_core.c | ||
2070 | There really shouldn't be any boot time contig allocations but I suppose it doesn't hurt to handle it. |
share/man/man9/zone.9 | ||
---|---|---|
477 | Okay, and then drop the VM_MEMATTR_DEFAULT example? | |
sys/vm/uma.h | ||
610–611 | This is gratuitous, but maybe related enough to sneak in here. | |
sys/vm/uma_core.c | ||
1644–1646 | Also gratuitous, but related. | |
2070 | Yes... I thought to handle it since it's easy and I think it works fine with startup_alloc. If you prefer, I can add it to the KASSERT about early boot PCPU alloc instead. |
share/man/man9/zone.9 | ||
---|---|---|
344 | Per mandoc style, sentences should start on new lines. |
sys/vm/uma.h | ||
---|---|---|
238 | Yeah, I'm having trouble phrasing this concisely with the right sense. I think your suggestion is okay. Here's another idea: "Each object must be internally physically contiguous." |
sys/vm/uma.h | ||
---|---|---|
238 | Your proposed phrasing, specifically "Each object", is less likely to be misinterpreted. No description that fits in one line will be unambiguous, If you are willing to use two lines, I would suggest: "Physical memory underlying an object must be contiguous" |
share/man/man9/zone.9 | ||
---|---|---|
345 | I would suggest: "The physical memory underlying each item in this zone must be contiguous. In particular, if an item spans a page boundary, then the underlying physical pages must be contiguous." |
sys/vm/uma.h | ||
---|---|---|
238 | Thanks, I'll use that. |
Rebase over r357392.
@jeff, note that I moved the assignment of uk_allocf = pcpu_page_alloc under the startup_alloc check, because I thought it read better that way. Please let me know if you'd like that restored, or if there was another reason for it being outside that check.