[Barrelfish-users] Questions about ram_set_affinity and ram_alloc
Shi Jinghao
jhshi at cs.hku.hk
Thu Jul 26 09:55:57 CEST 2012
Hi,
>From what I learn from bulk_create, suppose I want to allocate a frame in
the shared memory region on SCC by the following code snippet:
size_t bytes = PAGE_SIZE, allocated_size;
struct capref frame;
ram_set_affinity(SHARED_MEM_MIN, SHARED_MEM_MIN+bytes);
frame_alloc(&frame, bytes, &allocated_size);
(Q1)
Is this the right way to use ram_set_affinity (i.e, specify the following
ram_alloc's physical memory range)?
(Q2)
During my experiment, the above code works well on core 1, 2, 3, etc (in
independent runs), but it failed on core 0 with error MM_ERR_NOT_FOUND (Ram
alloc failed due to constraints to mem_serv). Any ideas about this error?
(Q3)
When I set affinity to (SHARED_MEM_MIN, SHARED_MEM_MIN+PERCORE_MEM_SIZE), I
can allocate a maximum 4MB frame, any frame_alloc attempt that larger that
4MB would fail with MM_ERR_NOT_FOUND. Since PERCORE_MEM_SIZE equals to
16MB, I don't under stand why even a 4MB alloc would fail. On the other
hand, when I call frame_alloc without ram_set_affinity, then I could
allocate a pretty large frame (say, 128MB). So the problems seems lie in
the affinity settings.
Thanks in advance,
Jinghao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20120726/b0399d1e/attachment.html
More information about the Barrelfish-users
mailing list