rtems-libbsd - UMA, Pages and slabs

Joel Sherrill joel.sherrill at OARcorp.com
Thu Apr 19 18:57:13 UTC 2012


Jennifer removed the RTEMS specific UMA file and
switched us to the BSD UMA file with all unreferenced
routines disabled and some paths which look unneeded

At the bottom of the UMA code logically, it  allocates
pages which are treated as slabs from which allocations
are made for each UMA pool.

We don't have pages so we are stuck at how best
to address the following:

+ page_alloc/page_free in uma_core.c.
    - how/what to allocate.
+ uma_find_refcnt() in uma_core.c uses a reference
    count inside the page that was allocated as a slab.
    This method is needed but
+ vtoslab in uma_find_refcnt()

Do we need to implement our own page_free/page_alloc
which are more than a  keep a list of "pages" allocated
and then be able to track the refcnt?

This may involve also replacing keg_alloc_slab()
and startup_alloc() before we are done because
we only have one way to allocate "slabs" and it should
work anytime we need one.

This doesn't necessarily seem like a lot of code that
would be RTEMS specific but it has to be right. :)

Joel Sherrill, Ph.D.             Director of Research&   Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985

More information about the devel mailing list