On Fri, Sep 07, 2007 at 01:34:15PM -0700, Seth Goldberg wrote:
> > You'll also want to ensure that you have some consumers for this
> > functionality-- the obvious thing would be to rip out the various
> > other strdup's which exist.
>    The obvious question is-- how does one specify whether KM_SLEEP/KM_NOSLEEP 
> is used for the underlying allocation (for kernel applications).

The first-cut "obvious" answer is KM_NOSLEEP, since strdup() CAN return NULL
on failure.

The reason I put "obvious" in quotes is because KM_SLEEP allocations have
unusual properties that can cause starvation or some other undesirable system
effect.  I can't recall the bugid, but there's an RFE out there for a
lighter-weight KM_NOSLEEP, which has the semantics of KM_SLEEP but for the
actual blocking, instead returning NULL.

I'm Bcc:-ing someone who discovered this problem, and may know the bugid, as
well as the precise issue with using KM_NOSLEEP.


Reply via email to