public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [ANN] Userspace M-on-N threading model implementation. Alpha release.
@ 2007-01-30 21:16 Kaz Kylheku
  2007-01-31  8:47 ` Evgeniy Polyakov
  2007-02-02 16:12 ` Bill Davidsen
  0 siblings, 2 replies; 20+ messages in thread
From: Kaz Kylheku @ 2007-01-30 21:16 UTC (permalink / raw)
  To: Evgeniy Polyakov, Chris Friesen; +Cc: linux-kernel, libc-hacker, libc-alpha

Evgeniy Polyakov wrote:
> I described in details why and how M:N model better, and its drawbacks
> include all issues mentioned by Ulrich Drepper, but nevertheless its
> advantages are far too superiour than those which can be
> provided by 1:1
> model.

M:N threading is an unnecessary performance hack that's needed by people
who are living in a C or C++ exile away from some language that has
lexical closures, generators or first-class continuations. Not having
these niceties, they resort to emulating them with threads. The proper
thing to do is to rewrite the code to use state machines which can be
driven by any available thread. Or else, write yourself a
source-to-source transformer that will give C the lexical closure,
generator, or continuation features that you need to express the
solution that way.

There is no need to retain any vestiges of a user space threading
implementation when you have the real thing.

Programs which appear to benefit from that model are badly optimized or
badly designed. A smartly written program uses an available thread to do
as much work as possible, until that thread happens to block or its time
slice burns up.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2007-02-14 12:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <40f323d00701290747y68c8e27ege824694bfa378f58@mail.gmail.com>
2007-01-29 14:52 ` [ANN] Userspace M-on-N threading model implementation. Alpha release Evgeniy Polyakov
2007-01-29 14:57   ` Evgeniy Polyakov
2007-01-29 16:40   ` Chris Friesen
2007-01-30  9:46     ` Evgeniy Polyakov
2007-01-30  1:18   ` Samuel Thibault
2007-01-30  9:53     ` Evgeniy Polyakov
2007-01-30 10:24       ` Samuel Thibault
2007-01-30 10:43         ` Evgeniy Polyakov
2007-02-01  4:28   ` Lee Revell
2007-02-01  7:09     ` Evgeniy Polyakov
2007-01-30 21:16 Kaz Kylheku
2007-01-31  8:47 ` Evgeniy Polyakov
2007-02-02 16:12 ` Bill Davidsen
2007-02-03 15:26   ` Arjan van de Ven
2007-02-04 20:12     ` Bill Davidsen
2007-02-04 20:20       ` Jakub Jelinek
2007-02-04 21:42         ` Bill Davidsen
2007-02-05  6:14           ` Arjan van de Ven
2007-02-14 12:17           ` Pavel Machek
2007-02-04 22:52         ` Davide Libenzi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox