Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3

From: Ingo Molnar
Date: Tue Feb 27 2007 - 05:57:38 EST



* Evgeniy Polyakov <johnpol@xxxxxxxxxxx> wrote:

> > does that work for you?
>
> Yes, -fomit-frame-point make the deal.
>
> In average, threadlet runs as fast as epoll.

yeah.

> Just because there are _no_ rescheduling in that case.

in my test it was 'little', not 'no'. But yes, that's exactly my point:
we can remove the nonblock hackeries from event loops and just
concentrate on making it schedule in less than 10-20% of the cases. Even
a relatively high 10-20% rescheduling rate is hardly measurable with
threadlets, while it gives a 10%-20% regression (and possibly bad
latencies) for the pure epoll/kevent server.

and such a mixed technique is simply not possible with ordinary
user-space threads, because there it's an all-or-nothing affair: either
you go fully to threads (at which point we are again back to a fully
threaded design, now also saddled with event loop overhead), or you try
to do user-space threads, which Just Make Little Sense (tm).

so threadlets remove the biggest headache from event loops: they dont
have to be '100% nonblocking' anymore. No O_NONBLOCK overhead, no
complex state machines - just handle the most common event type via an
outer event loop and keep the other 99% of server complexity in plain
procedural programming. 1% of state-machine code is perfectly
acceptable.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/