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

Ingo Molnar
2007-02-21T23:01:59Z

* Michael K. Edwards <medwards.linux@gmail.com> wrote:

> 3) Reworked threadlet scheduling to allow tens of thousands of blocked
> threadlets to be dispatched efficiently in a controlled, throttled,
> non-cache-and-MMU-thrashing manner, immediately following the softirq
> that unblocks the I/O they're waiting on; and

threadlets, when they dont block, are just regular user-space function
calls - so no need to schedule or throttle them. [*]

threadlets, when they block, are regular kernel threads, so the regular
O(1) scheduler takes care of them. If MMU trashing is of any concern
then syslets should be used to implement the most performance-critical
events: under Linux a kernel thread that does not exit out to user-space
does not do any TLB switching at all. (even if there are multiple
processes active and their syslets intermix)

throttling of outstanding async contexts is most easily done by
user-space - you can see an example in threadlet-test.c, but there's
also fio/engines/syslet-rw.c. v2 had a kernel-space throttling mechanism
as well, i'll probably reintroduce that in later versions.

Ingo

[*] although certain more advanced scheduling tactics like the detection
of frequently executed threadlet functions and their pushing out to
separate contexts is possible too - but this is an optional add-on
and for later.