[Barrelfish-users] page size in barrelfish virtual memory system

Kornilios Kourtis kornilios.kourtis at inf.ethz.ch
Wed Oct 10 16:25:59 CEST 2012

On Wed, Oct 10, 2012 at 01:46:56PM +0000, Xiaowen Wang wrote:
> For my problem, my architecture requires 64KB small page size, much larger than
> 4KB, so that consumes much memory when running the function of "spawn_module
> (...)" (startup.c:174), and I noticed that in this function, when it allocates
> memory for "slot_alloc_cn0", for example, it requests "OBJBITS_CTE +
> SLOT_ALLOC_CNODE_BITS" amount of memory, in which "SLOT_ALLOC_CNODE_BITS" is
> defined as "DEFAULT_CNODE_BITS * 2" (barrelfish/init.h:91), which it is too big
> in my case. And the number of allocated memory grows exponentially with the
> page size. What it is the desired meaning of the "* 2"?
> What is the meaning of this three CNodes of "slot_alloc_cn0",
> "slot_alloc_cn1" and "slot_alloc_cn2"?

Indeed, the *2 seems a bit strange...

| // include/barrelfish_kpi/capabilities.h:
| #define OBJBITS_CTE             6
| // include/barrelfish_kpi/init.h:

Based on the definitions above, for BASE_PAGE_BITS=12,
SLOT_ALLOC_CNODE_BITS is (12-6)*2 = 12.

I'm not sure why it's set this way, but it might worth to change
SLOT_ALLOC_CNODE_BITS to BASE_PAGE_BITS and see what happens...


Kornilios Kourtis

More information about the Barrelfish-users mailing list