[Vm-dev] Re: Cog Rump Xen unikernel (spur mmap)

David T. Lewis lewis at mail.msen.com
Wed Dec 16 18:57:40 UTC 2015


Try running your VM with "-help" and/or check the man page (sorry to be
vague, I'm not able to check right now). You should be able to start the
VM with malloc to allocate the heap rather than mmap, which should get you
around the problem. I can't recall the parameter but it should be in the
-help.

Dave


>
> On Thu, Dec 17, 2015 at 1:43 AM, Ben Coman <btc at openinworld.com> wrote:
>> I'm having a go at getting this working with the Spur svn sources per...
>> http://www.mirandabanda.org/cogblog/compiling-the-vm/
>
> @Eliot,
> I am currently stuck on Spur's requirement for mmap.
> Could you describe this requirement and any ideas on path to proceed
> to check compatibilty with these...
>
> https://github.com/rumpkernel/wiki/wiki/Info:-FAQ
> says "For simplicity reasons, the Rumprun unikernel does not support
> virtual memory -- unnecessary in a unikernel -- nor does it support
> signals the traditional way. That means that programs which absolutely
> depend on things like fork(),execve(), mmap() and sigaction() may not
> work correctly. In some cases we provide a small amount of cheap
> emulation for common cases (e.g. mmap(MAP_ANON))"
>
> http://rumpkernel.org/misc/usenix-login-2014/login_1410_03_kantee.pdf
> says "The more or less only negative effect caused by the lack of
> virtual memory support is that the mmap() system call cannot be fully
> handled by a rump kernel. A number of workarounds are possible for
> applications that absolutely need to use mmap(). For example, the
> bozohttpd Web server uses mmap() to read the files it serves, so when
> running bozohttpd on top of a rump kernel, we simply read the mmap’d
> window into memory at the time the mapping is made instead of
> gradually faulting pages in. A perfect emulation of mmap() is hard to
> achieve, but one that works for most practical purposes is easy to
> achieve"
>
> cheers -ben
>
> P.S. Here is the compilation error...
>
> platforms/unix/vm/sqUnixSpurMemory.c:72:3: error: #error "Spur requires
> mmap"
>  # error "Spur requires mmap"
>    ^
> platforms/unix/vm/sqUnixSpurMemory.c: In function ‘sqAllocateMemory’:
> platforms/unix/vm/sqUnixSpurMemory.c:108:47: warning: passing argument
> 3 of ‘sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto’ from
> incompatible pointer type
>      (roundUpToPage(desiredHeapSize), address, &allocBytes);
>                                                ^
> In file included from platforms/unix/vm/sqUnixSpurMemory.c:33:0:
> platforms/Cross/vm/sq.h:88:14: note: expected ‘sqInt *’ but argument
> is of type ‘long unsigned int *’
>  extern void *sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto(sqInt
> sz, void *minAddr, sqInt *asp);
>               ^
> Makefile:276: recipe for target 'sqUnixSpurMemory.o' failed
> make[1]: *** [sqUnixSpurMemory.o] Error 1
> Makefile:407: recipe for target 'vm/vm.a' failed
> make: *** [vm/vm.a] Error 2
>




More information about the Vm-dev mailing list