Messages in this thread | | | Subject | Re: Slow pthread_create() under high load | From | Ulrich Drepper <> | Date | 28 Mar 2000 11:41:19 -0800 |
| |
yodaiken@fsmlabs.com writes:
> So the nonmanager threads do > sigaction(n,s) > === save local copy of s,n,thread_id > real_sigaction(realprocessid(myid)); > if unblocked a signal that is user_space pending > kill self with that signal > > Now the information about who blocks what is available in user space > > kill(gettpid(),n) where gettpid has been fixed to get the > root pid > === find someone who is not blocking and > kill(someone,n) > if all threads block, then mark signal > as pending
You are completely neglecting that the signals are not coming alone:
- there is a signal context. If the process which receives the signal first (mainly the manager) simply returns the signal context on its stack is lost.
Copying it means garbage collection of some kind
- you have to handle certain signal special (segfault, stop/continue). Especially the later contains the possibility for arbitrary many races if not done in the kernel.
- RT signals have to transport data which, again, can be in the signal stack.
- sigaltstack must continue to work
I'm cutting it short here.
-- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------
- 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/
| |