Feature #10704
openallocb() should decide about priority
0%
Description
allocb(9f) documents priority, but marks it as unused. Today, allocb() always allocates with KM_NOSLEEP, which will go to some effort to reclaim space if none is immediately available. As seen in #1452, that may not be optimal, especially in interrupt contexts like IP forwarding. #1452 uses KM_NORMALPRI, and it may be something we wish to consider. Making priority mean something would require a fair amount of testing.
If priority truly doesn't matter and we're fine, perhaps we should eliminate it as a parameter. The question of whether or not to use KM_NORMALPRI as well remains open in this case.
If we choose to make priority matter, there are three values BPRI_{LO,MED,HI}. LO should add KM_NORMALPRI to the allocation, HI should not, and MED is a tossup (could even be random?!?). Also if we choose to make priority matter, we will need to visit every allocb() and friends call to audit their priority parameter.
Related issues
Updated by Dan McDonald about 3 years ago
- Related to Bug #1452: DTrace buffer autoscaling should be less violent added
Updated by Dan McDonald 9 months ago
- Related to Bug #5253: kmem_alloc/kmem_zalloc won't fail with KM_SLEEP added
Updated by Dan McDonald 4 months ago
- Related to Feature #14465: Present KM_NOSLEEP_LAZY as documented interface added