Re: [ANNOUNCE] Native POSIX Thread Library 0.1

From: dean gaudet (
Date: Sun Sep 22 2002 - 17:13:44 EST

On 22 Sep 2002, Eric W. Biederman wrote:

> I fail to see why:
> /* This is a safe point ... */
> if (needs to be suspended) {
> save_all_registers_on_the_stack()
> flag_gc_thread()
> wait_until_gc_thread_has_what_it_needs()
> }
> Needs kernel support.

given that the existing code uses self-modifying-code for the safe-points
i'm guessing there are so many safe-points that the above if statement
would be excessive overhead (and the save/flag/wait stuff would probably
cause a huge amount of code bloat -- but could probably be a subroutine).

there was some really interesting GC work i heard about years ago where
the compiler generated GC code along-side the normal executable code.
the GC code understood the structure of the function and could make much
better choices of GC targets than a generic routine could. when GC needs
to occur, a walk up the stack in each thread executing the
routine-specific GC stubs would be performed. (given just the stack
frames you can index into a lookup table for the GC stubs... so there's no
overhead when GC isn't occuring.) i don't have a reference handy though.

anyhow, this is probably getting off-topic :)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Sep 23 2002 - 22:00:36 EST