rtems-libbsd - UMA, Pages and slabs

Joel Sherrill joel.sherrill at OARcorp.com
Thu Apr 19 19:55:44 UTC 2012


On 04/19/2012 02:44 PM, Gedare Bloom wrote:
> On Thu, Apr 19, 2012 at 2:57 PM, Joel Sherrill
> <joel.sherrill at oarcorp.com>  wrote:
>> Hi
>>
>> 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
>> disabled.
>>
>> 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?
>>
> What are the allocation requirements? We should think about
> implementing an "allocation" score manager that can satisfy all the
> various allocators that are sitting around... regions, partitions, the
> new rbheap, this UMA pool..
We should think about it but we need something that works RSN. :)

I am leaning to faking out the routines mentioned. We can't
do that much surgery on this code.
>> 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
>>
>>
>> _______________________________________________
>> rtems-devel mailing list
>> rtems-devel at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-devel


-- 
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