Sending SIGSTP or a unrelated signal have near the same cost.
Similar waitpid for a STOP and sigwaitinfo.
It depends on what you find more important:
latency from creation to child run [sigqueueinfo/sigwaitinfo have a slight advantage
here because it can simply run through without caring about the parent]
or
latency from calling pthread_create to its return [SIGSTP/waitpid may be better here,
because the final thread restart is decoupled from the caller]
On UP it probably makes not much difference because one CPU has to do all the work
anyways, on SMP it may look different.
> code I've orignially posted, The code size increase in the kernel is
> minial. What can possibly be wrong with this?
What I didn't like with your idea is that it is 100% equivalent (even from the
work the kernel has to do) to kill(getpid(), SIGSTP); at the beginning
of the child.
-Andi
-- This is like TV. I don't like TV.- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/