[Barrelfish-users] VFS and Shared Memory

Kornilios Kourtis kornilios.kourtis at inf.ethz.ch
Tue Nov 11 11:48:00 CET 2014


Hi Dominic,

On Thu, Nov 06, 2014 at 03:05:22PM +0800, Dominic Hung wrote:
> Dear all,
> 
> I would like to ask when vfs is included in an application, will it be hard
> wired to map to a particular physical memory section, like the shared memory
> section (0x80000000 - 0x84000000) of the Intel SCC.
> 
> I have trouble after calling vfs_init in an application, it modified part of a
> virtual memory range (I designated from address 0x500a0000) mapped to the above
> named shared physical memory range. The first thing I encountered is it wrote
> on offset 0x3002 on the mentioned virtual address range, so effectively
> 0x500a3002. But I couldn't found which part of vfs, or some even more
> underlying function that wrote on the address. I hope you can shed me some
> light in to handling this.
> 
> I have tried to increase the virtual memory offset to say, 0x520a0000, but the
> "written on" just followed and wrote on 0x520a3002. And the funny thing is
> that, after vfs_init, when I tried to print what's on such "written on"
> address, the printout is 0x500a0000 or 0x520a0000 on the later case, which is
> the start address of the shared virtual memory range I decided.
> 
> Apart from vfs_init, (vfs_init is just the first occurence of such "written on"
> "mischief"), as the program goes, with more opening of files, read/writes. the
> memory in on/in nearby region changes too.
> 
> Again, I seriously need some help in this. I hope you might have a clue. Thank
> you very much!

Are you running on the SCC using the distributed memory server?

SHARED_MEM_MIN is defined as 0x80000000 for the SCC (see
include/arch/x86_32/barrelfish_kpi/shared_mem_arch.h).

If I remeber correctly, we mainly used the distributed memory server with
the SCC.  As far as I can tell, each server (that runs on a different
core) allocates  16M for each core starting from 0x80000000 for the first
core (see initialize_percore_mem_serv())

So every time an application allocates memory from the mem server (e.g.,
on the first malloc() call), it would be on the address range you
mentioned. 

cheers,
Kornilios.

> 
> Cheers,
> Dominic Hung
> 
> --------------------------------------------------
> C H Dominic Hung, B.Eng. (CE) HK
> M. Phil. Student, Dept. of CS., Faculty of Engg.
> 
> Mobile: +852-9819-9360
> Email: domchdh at hku.hk

> _______________________________________________
> Barrelfish-users mailing list
> Barrelfish-users at lists.inf.ethz.ch
> https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users


-- 
Kornilios Kourtis



More information about the Barrelfish-users mailing list