Project

General

Profile

Actions

Feature #10704

open

allocb() should decide about priority

Added by Dan McDonald about 3 years ago. Updated 9 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
networking
Start date:
2019-04-09
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

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

Related to illumos gate - Bug #1452: DTrace buffer autoscaling should be less violentResolvedRich Lowe2011-09-04

Actions
Related to illumos gate - Bug #5253: kmem_alloc/kmem_zalloc won't fail with KM_SLEEPNewJosef Sipek2014-10-23

Actions
Related to illumos gate - Feature #14465: Present KM_NOSLEEP_LAZY as documented interfaceClosed

Actions
Actions #1

Updated by Dan McDonald about 3 years ago

  • Related to Bug #1452: DTrace buffer autoscaling should be less violent added
Actions #2

Updated by Dan McDonald 9 months ago

  • Related to Bug #5253: kmem_alloc/kmem_zalloc won't fail with KM_SLEEP added
Actions #3

Updated by Dan McDonald 9 months ago

  • Description updated (diff)
Actions #4

Updated by Dan McDonald 4 months ago

  • Related to Feature #14465: Present KM_NOSLEEP_LAZY as documented interface added
Actions

Also available in: Atom PDF