[Barrelfish-users] How to use fopen on a span-ed dispatcher on Barrelfish

Georgios Varisteas yorgos at kth.se
Fri Apr 26 09:54:16 CEST 2013


Hi Andrew,

> (e.g. if you want to use shared memory, create several dispatchers and then send caps between them to map a shared region)
Could you please elaborate on this one?

Specifically, is domain_new_dispatcher_varstack() creating a secondary dispatcher? If yes then I cannot find any other mechanism for creating dispatchers, except through a domain (start several copies of the program, MPI style) which will also create new virtual regions thus defeating the purpose.


Thanks,
Georgios


________________________________________
From: Andrew Baumann [Andrew.Baumann at microsoft.com]
Sent: Friday, April 26, 2013 01:49
To: Chothia  Zaheer; 郭明宇; barrelfish-users at lists.inf.ethz.ch
Subject: Re: [Barrelfish-users] How to use fopen on a span-ed dispatcher        on      Barrelfish

Hi all,

Unless something has changed recently, VFS operations do not work on secondary dispatchers of spanned domains. In fact, the only thing I know that does work reliably on a spanned domain is thread synchronisation primitives. Spanned domains were put together as something of a hack to enable us to run shared-memory benchmarks, but they weren't widely used beyond this and more work is needed to make other parts of the system work with them. Some of the problems are simply lazy code (e.g. assuming that a global variable is local to a dispatcher), but there are harder structural issues to be resolved, including managing capabilities, and abstracting over inherently core-local structures such as waitsets.

As workarounds, I would suggest either avoiding the spanned domain (e.g. if you want to use shared memory, create several dispatchers and then send caps between them to map a shared region), or doing what Zaheer suggested.

Andrew

-----Original Message-----
From: Chothia Zaheer [mailto:zchothia at student.ethz.ch]
Sent: Thursday, 25 April 2013 03:42
To: 郭明宇; barrelfish-users at lists.inf.ethz.ch
Subject: Re: [Barrelfish-users] How to use fopen on a span-ed dispatcher on Barrelfish

[+barrelfish-users]

Hi Guo,

I can reproduce the issue you describe although I don't understand the
underlying problem.  Adding the list in case someone else can comment.

The step which fails is opening a file on the remote core.  Full error message:
  ERROR: autorun1.1 in resolve_path() ../lib/vfs/vfs_ramfs.c:81
  ERROR: transport error in lookup
  Failure: (         kernel) Capability not found (empty slot encountered) [SYS_ERR_CAP_NOT_FOUND]

I also tried opening on the main thread, then reading from the remote core
which also fails:
  ERROR: autorun1.1 in read_bulk() ../lib/vfs/vfs_ramfs.c:342
  ERROR: transport error in read
  nRRFaORi:l uraeut:o r( u n 1. 1    i n  vkfersnfed_lr) eSald(o)t  s.p./elciifbi/evfds f/ovrfs _LfRPdC. c:d1oe0s0
   oEt RcROoRn:ta ienrr oanr  einn dvpofisn_rte caadp
   [SYS_ERR_LRPC_NOT_ENDPOINT]
  Failure: (         kernel) Slot specified for LRPC does not contain an endpoint cap [SYS_ERR_LRPC_NOT_ENDPOINT]

As a workaround you may be able to register a stub which shuttles requests to
and back from core 0 for processing (using newlib_register_fsops__).

Best,

--Zaheer

From: 郭明宇 [mailto:369389319 at qq.com]
Sent: 25 April 2013 07:11
To: Chothia Zaheer
Subject: How to use fopen on a span-ed dispatcher on Barrelfish

Hi, Zaheer:

May I ask you question about fs on Barrelfish?

I know how to read or write a file on Barrelfish. I can use:
main(){
    vfs_init();
    fopen();
    fread();
    fclose();
}

But, when I read a file in a spaned dispatcher. I got some pagefault error. I did this:
func(){
    fopen();
    fread();
    fclose();
}
main(){
    vfs_init();
    span_a_new_dispatcher_and_create_a_thread_on_it(func);
}
It says that "transport error in lookup" in lib/vfs/vfs_ramfs.c:81

I thought that I may should use vfs_init in the new dispatcher. But after I did that, it told me that vfs_init should not be called twice.

Can you please tell me, how to read a file on a span-ed dispatcher on Barrelfish?

Really really thanks,
Guo Mingyu
_______________________________________________
Barrelfish-users mailing list
Barrelfish-users at lists.inf.ethz.ch
https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
_______________________________________________
Barrelfish-users mailing list
Barrelfish-users at lists.inf.ethz.ch
https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users



More information about the Barrelfish-users mailing list