DragonFly kernel List (threaded) for 2007-04
DragonFly BSD
DragonFly kernel List (threaded) for 2007-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Preview synchronized on HEAD - some instability may occur


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 28 Apr 2007 18:21:17 -0700 (PDT)

    I'm going to start committing the resource structure reference
    counter and sysid subsystem.  I have a lot of structures to cover
    so it may cause some instability in HEAD.

    I finally settled on calling it SYSREF instead of SYSREG, and it is
    a pretty nifty piece of work if I do say so myself.  It will handle:

    * Structural reference count, including creation and termination
      sequencing (e.g. where the structure might be temporarily referenced
      during termination).

    * Allocation.  It uses an objcache backend for optimal allocation,
      deallocation, and memory recovery.

    * Sysid assignment and red-black tree indexing.  It does this in the
      objcache CTOR and DTOR so it costs us absolutely nothing in the
      resource allocation / deallocation critical path.  sysids will be
      reused unless they are externally accessed.

    My work on the system structures will entail replacing all of the
    roll-your-own ref counting and allocation/deallocation mechanisms we
    have with the new SYSREF API.  Some instability may ensue as I commit
    that work.

    The API is 100% MPSAFE, though callbacks set up by other subsystems
    might not be.  The API is performance-agnostic.  It might even improve
    performance in certain cases since we will be using the objcache.  System
    memory use is probably a wash... I'm adding a bit of bloat but will also
    be removing the ZALLOC API which has no ability to recover memory.

    This work will allow *ALL* major system resource structures not only to
    have sysid assignments, but also to be accessible via the sysid.  This
    in turn will allow us to implement remote access to just about everything
    and will form the backend to the syslink mesh interfaces and protocols on
    a host.  It will also incidently allow us to create a sysctl API capable
    of safely iterating through all major system resources, but that's for
    later on (maybe I can get someone else to work that angle).

						-Matt




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]