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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Wednesday, February 28, 2007 - 2:45 am

* Davide Libenzi <davidel@xmailserver.org> wrote:


there are so many variants of what people think 'asynchronous IO' should 
look like - i'd not like to limit them. I agree that once a particular 
syslet script becomes really popular, it might (and should) in fact be 
pushed into a separate system call.

But i also agree that a one-shot-syscall sys_async() syscall could be 
done too - for those uses where only a single system call is needed and 
where the fetching of a single uatom would be small but nevertheless 
unnecessary overhead. A one-shot async syscall needs to get /8/ 
parameters (the syscall nr is the seventh parameter and the return code 
of the nested syscall is the eighth). So at least two parameters will 
have to be passed in indirectly and validated, and 32/64-bit compat 
conversions added, etc. anyway!

The copy_uatom() assembly code i did is really fast so i doubt there 
would be much measurable performance difference between the two 
solutions. Plus, putting the uatom into user memory allows the caching 
of uatoms - further dilluting the advantage of passing in the values per 
register. The whole difference should be on the order of 10 cycles, so 
this really isnt a high prio item in my view.


no, threadlets dont really solve the basic issue of people wanting to 
'combine' syscalls, avoid the syscall entry overhead (even if that is 
small), and the desire to rely on kthread->kthread context switching 
which is even faster than uthread->uthread context-switching, etc. 
Furthermore, syslets dont really cause any new problem. They are almost 
totally orthogonal, isolated, and cause no wide infrastructure needs.

as long as syslets remain a syscall-level API, for the measured use of 
the likes of glibc and libaio (and not exposed in a programmable manner 
to user-space), i see no big problem with them at all. They can also be 
used without them having any classic pthread user-state (without linking 
to libpthread). Think of it like the raw use of clone(): possible and 
useful in some cases, but not something that a typical application would 
do. This is a 'raw syscall plugins' thing, to be used by those 
user-space entities that use raw syscalls: infrastructure libraries. Raw 
syscalls themselves are tied to the platform, are not easily used in 
some cases, thus almost no application uses them directly, but uses the 
generic functions glibc exposes.

in the long run, sys_syslet_exec(), were it not to establish itself as a 
widely used interface, could be implemented purely from user-space too 
(say from the VDSO, at much worse performance, but the kernel would stay 
backwards compatible with the syscall), so there's almost no risk here. 
You dont like it => dont use it. Meanwhile, i'll happily take any 
suggestion to make the syslet API more digestable.

	Ingo
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 03/13] syslets: generic kernel bits, Ingo Molnar, (Wed Feb 21, 2:15 pm)
[patch 04/13] syslets: core code, Ingo Molnar, (Wed Feb 21, 2:15 pm)
[patch 05/13] syslets: core, documentation, Ingo Molnar, (Wed Feb 21, 2:15 pm)
[patch 06/13] x86: split FPU state from task state, Ingo Molnar, (Wed Feb 21, 2:15 pm)
[patch 09/13] syslets: x86, mark async unsafe syscalls, Ingo Molnar, (Wed Feb 21, 2:15 pm)
[patch 10/13] syslets: x86: enable ASYNC_SUPPORT, Ingo Molnar, (Wed Feb 21, 2:15 pm)
[patch 12/13] syslets: x86: optimized copy_uatom(), Ingo Molnar, (Wed Feb 21, 2:15 pm)
[patch 13/13] syslets: x86: optimized sys_umem_add(), Ingo Molnar, (Wed Feb 21, 2:16 pm)
Re: x86 hardware and transputers (Re: [patch 00/13] Syslet ..., Michael K. Edwards, (Thu Feb 22, 1:45 pm)
Re: A quick fio test (was Re: [patch 00/13] Syslets, &quot;Thre ..., Suparna Bhattacharya, (Fri Feb 23, 6:55 am)
Re: A quick fio test (was Re: [patch 00/13] Syslets, &quot;Thre ..., Suparna Bhattacharya, (Fri Feb 23, 8:15 am)
Re: A quick fio test (was Re: [patch 00/13] Syslets, &quot;Thre ..., Suparna Bhattacharya, (Fri Feb 23, 10:13 am)
Re: [patch 04/13] syslets: core code, Davide Libenzi, (Fri Feb 23, 4:08 pm)
Re: [patch 04/13] syslets: core code, Ingo Molnar, (Sat Feb 24, 12:04 am)
[patchset] Syslets/threadlets, generic AIO support, v4, Ingo Molnar, (Sat Feb 24, 12:41 am)
Re: [patch 04/13] syslets: core code, Davide Libenzi, (Sat Feb 24, 2:10 pm)
Re: [patch 04/13] syslets: core code, Kyle Moffett, (Sat Feb 24, 3:08 pm)
Re: [patch 04/13] syslets: core code, Davide Libenzi, (Sat Feb 24, 3:25 pm)
Re: [patch 04/13] syslets: core code, Ingo Molnar, (Sun Feb 25, 12:59 am)
Threadlet/syslet v4 bug report., Evgeniy Polyakov, (Sun Feb 25, 7:33 am)
Re: A quick fio test (was Re: [patch 00/13] Syslets, &quot;Thre ..., Suparna Bhattacharya, (Mon Feb 26, 7:13 am)
Re: [patch 05/13] syslets: core, documentation, Randy Dunlap, (Mon Feb 26, 2:32 pm)
Re: A quick fio test (was Re: [patch 00/13] Syslets, &quot;Thre ..., Suparna Bhattacharya, (Mon Feb 26, 9:33 pm)
Re: [patch 05/13] syslets: core, documentation, Ingo Molnar, (Mon Feb 26, 11:20 pm)
Re: A quick fio test (was Re: [patch 00/13] Syslets, &quot;Thre ..., Suparna Bhattacharya, (Tue Feb 27, 5:39 am)
Re: [patch 00/13] Syslets, "Threadlets", generic AIO suppo ..., Ingo Molnar, (Wed Feb 28, 2:45 am)