Re: Slow pthread_create() under high load

From: Christopher Smith (x@xman.org)
Date: Wed Mar 29 2000 - 19:30:21 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Mar 29, 2000 at 04:20:15PM -0700, Richard Gooch wrote:
> Christopher Smith writes:
> > Sorry, I should have been more clear. SIGEV_THREAD is allows a
> > signal handler to execute in it's own thread. This has several
> > advantages in certain types of situations.
>
> This should be doable in user-space. We don't need/want kernel support
> for this.

Hmm... I should have been clearer with my english. If I use
SIGEV_THREAD, in sigevent I set a function (sigev_notify_function) and
thread attributes (sigev_notify_attributes). When the signal occurs,
instead of going through a signal handler, the sigev_notify_function
is invoked with sigval as an argument in a thread with attributes
which match sigev_notify_attributes. It's like having a signal handler
that invokes pthread_create(), only much faster, and of course, POSIX
makes no guarantees that you can actually invoke pthread_create() in a
signal handler.

While it's undoubtedly doable in user-space, the whole idea of that
feature is to avoid signal-handling overhead (and replace it with
thread creation overhead I guess ;-). I'm not sure how one would do
THAT in user space without some kind of kernel support.

- --Chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.5 and Gnu Privacy Guard <http://www.gnupg.org/>

iD8DBQE44qAGfrrCpthD+UYRAsbNAKDicldLOTN6pmqER5b2ONIQ0xGU4QCfXqv5
595vsiRP2aYub9VeKYIcJLI=
=bwgx
-----END PGP SIGNATURE-----

-
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/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:26 EST