objcache depot not used?

Matthew Dillon dillon at apollo.backplane.com
Tue Jan 29 11:12:40 PST 2008


:
:Matthew Dillon wrote:
:>     The objcache_put() path cannot allocate a magazine without potentia=
:lly
:>     deadlocking the memory subsystem
:
:How would that happen?  We'd have to be in an extremely low memory=20
:situation, I guess?  We could *try* allocating memory (M_NULLOK) and if=20
:that fails, we just go on and free the object.
:
:cheers
:   simon

    objcache_put() is supposed to be a non-blocking path from the point
    of view of the SMP implementation, similar to how kfree() must be a
    non-blocking path.  I want it callable from e.g. interrupts and such.
    I definitely do not want it diving into the VM system.

    We could do M_NONBLOCK|M_NULLOK but we don't need to.  It's better to
    simply pre-allocate the required structures when the objcache is created.

						-Matt






More information about the Kernel mailing list