[Barrelfish-users] Issue allocating RAM by user
zhanqing Zhan(Qing)
zhanqing.zhan at huawei.com
Thu May 23 05:05:29 CEST 2013
Dear All,
I'm working to emulate a RAM allocator on barrelfish mem_serv.I used lib mm to initialize and allocate the RAM in mem_serv's way, but now I encountered a problem.
When I allocate a small RAM from a big block, we use slot_prealloc_refill function to refill a slab, then the refill func need to retype the node which is found in the mm_node tree. In this way, the node could not be retyped because it can't be looked up(Case 1: At first I used cnode_super to be the mem_cap which is not initialized in a user domain). Then I used the ACPI's way instead (I create a cnode and cnoderef to do cnode_super's job and also create the mem_cap from a RAM), when I use cap_copy to create a cap from RAM, it is INVALID to retype(case 2).
Case1:
ERROR: failed to init slot allocator
Failure: ( libmm) Nested failure in slot allocator calling mm_alloc [MM_ERR_SLOT_MM_ALLOC]
Failure: ( libbarrelfish) Failure in cap_retype() [LIB_ERR_CAP_RETYPE]
Failure: ( kernel) Error looking up source capability [SYS_ERR_SOURCE_CAP_LOOKUP]
Failure: ( kernel) Capability not found (empty slot encountered) [SYS_ERR_CAP_NOT_FOUND]
Aborted
Case 2:
ERROR: failed to init slot allocator
Failure: ( libmm) Nested failure in slot allocator calling mm_alloc [MM_ERR_SLOT_MM_ALLOC]
Failure: ( libbarrelfish) Failure in cap_retype() [LIB_ERR_CAP_RETYPE]
Failure: ( kernel) Invalid source/destination type pair for retyping [SYS_ERR_INVALID_RETYPE]
Aborted
So, How mem_serv's mm_node struct define the cap? (Is it the node's corresponding RAM which manages base & size or another thing?)
Which type the cap should be? Which type should I use? (CNode/RAM/Fram/...?)
How the cap's type transfer when I chunk a node? (Because cap_retype defines the cap must be CNode type, and transfer to mm_ram's registed type. Should it transfer from CNODE to RAM?)
Best Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20130523/5617fd55/attachment.html
More information about the Barrelfish-users
mailing list