Project

General

Profile

Feature #10704

allocb() should decide about priority

Added by Dan McDonald about 1 year 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?!?).


Related issues

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

Actions

History

#1

Updated by Dan McDonald about 1 year ago

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

Also available in: Atom PDF