[Mono-dev] [PATCH] more support for Google Native Client

Elijah Taylor elijahtaylor at google.com
Sat Dec 25 12:27:59 EST 2010


Hi Rodrigo,

On Sat, Dec 25, 2010 at 5:01 AM, Rodrigo Kumpera <kumpera at gmail.com> wrote:
>
> The patchset is indeed huge and will take quite some review effort to get
> it in. I'll start by reviewing the bug fixes then move to ILP32 support.
>

Yes, sorry about that.  I would have loved to have sent more targetted
changes, but there were always "gotchas" with a lot of stuff not working
until the whole system worked.  No rush on getting this checked in, it's
your codebase.

>
> Since you guys had to add GC support for cooperative parking, it would be
> interesting to merge this effort with the current one toward adding it
> to sgen, which has received quite some reviewing and testing. Mark Probst
> can better talk about it once he gets back from his vacations.
>

I would very much love to get GC working with Sgen, but haven't put in the
effort yet.  We were working off of a snapshot from earlier this year prior
to 2.8 so we just had boehm mature enough to work on.


One problem I see in the general description of how parking is been done is
> that it doesn't handle blocking syscalls, which might lead to a single
> thread make the GC halt.
>
>
I glazed over the details a little coarsely, but we do handle this case.
 All OS syscalls in Native Client are handled by the trusted runtime
component of our system.  Any time we issue a Native Client syscall (move
from untrusted code to trusted code) that has a chance of blocking I store a
context and count that thread as "parked" (threads in trusted code can't
permute untrusted GC memory).  Upon returning from trusted code I check if
we're in the middle of GC and if so actually park until it's done.  For
details you can check libgc/pthread_stop_world.c, search for "syscall"  and
you can see the enter and exit hooks I've exposed from our syscall
interface.


I'll start reviewing/cherry picking patches next year once I get back to
> work. Just wanted to give you a heads up.
>
>
>
 Great, ping me if you have any questions or concerns and I'll try to get
back to you quickly.  I'm on vacation off and on until after the new year,
but I'll have email access most of the time.

-Elijah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20101225/3ee79d42/attachment.html 


More information about the Mono-devel-list mailing list