Skip to content

Syslets, generic asynchronous system call support, v2

Ingo Molnar lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 13 repliesIn review

Changes since v1 from the cover letter

- FPU support fixed: detach FPU state from kernel thread state (implemented by Arjan van de Ven)

- remove superfluous CLONE_VM from create_async_thread() (noticed by Jens Axboe)

- sys_umem_add() does not ignore -EFAULT of __put_user() (noticed by Andrew Morton)

- use VERIFY_READ instead of VERIFY_WRITE in copy_uatom() (noticed by Andrew Morton)

- move schedule() to tail of loop in cachemiss_loop() (noticed by Andrew Morton)

- added move_user_context() arch op

- added async_syscall() and recursion protection against re-entry of sys_async_exec(), sys_fork()/sys_clone(), etc.

- added sys_async_thread() call - a user-space thread can thus call back into the syslet subsystem and continue cachemiss work.

- further cleanups in the include files

- race fixes to sys_async_wait()

- optimized out the kmalloc()/kfree() of the async_head

- async_thread structure not on the kernel stack anymore, to allow async contexts to run user-space.

- added support for head_stack and head_eip to enable the initial thread/task to run a cachemiss user context too, if it gets turned into a cachemiss thread.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14syslets: add async.h include file, kernel-side API definitionsinclude/linux/async.h+96 -00 replies
2/14syslets: add syslet.h include file, user API/ABI definitionsinclude/linux/Kbuild include/linux/syslet.h+144 -00 replies
3/14syslets: generic kernel bitsinclude/linux/sched.h kernel/exit.c kernel/fork.c +1 more+36 -10 replies
4/14syslets: core, data structureskernel/async.h+2 -01 reply
5/14syslets: core codekernel/Makefile kernel/async.c+898 -03 replies
6/14syslets: core, documentationDocumentation/syslet-design.txt+137 -02 replies
7/14x86: split FPU state from task statearch/i386/kernel/i387.c arch/i386/kernel/process.c arch/i386/kernel/traps.c +4 more+123 -640 replies
8/14syslets: x86, add create_async_thread() methodarch/i386/kernel/entry.S arch/i386/kernel/process.c include/asm-i386/processor.h+61 -02 replies
9/14syslets: x86, add move_user_context() methodarch/i386/kernel/process.c include/asm-i386/system.h+28 -02 replies
10/14syslets: x86, mark async unsafe syscallsarch/i386/kernel/process.c+6 -00 replies
11/14syslets: x86: enable ASYNC_SUPPORTarch/i386/Kconfig+4 -00 replies
12/14syslets: x86, wire up the syslet system callsarch/i386/kernel/syscall_table.S include/asm-i386/unistd.h+13 -10 replies
13/14syslets: x86: optimized copy_uatom()arch/i386/lib/getuser.S+115 -00 replies
14/14syslets: x86: optimized sys_umem_add()arch/i386/lib/getuser.S+27 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 00/14] Syslets, generic asynchronous system call support, v2

this is the v2 release of the syslet subsystem. This is an interim release, not all known and pending items are fixed/changed yet - the tree is still work in progress:

http://redhat.com/~mingo/syslet-patches/

The biggest conceptual change in v2 is the ability of cachemiss threads to be turned into user threads. This fixes signal handling, makes them ptrace-eable, etc. (I've updated the sample userspace code at the URL above to also do user-space cachemiss processing - just Ctrl-Z the async-test.c run to trigger it action.)

Things not yet done in v2 and planned for v3:

- multiple completion rings support

- share the 'spare thread' between multiple rings, to further reduce startup costs.

- remove mlock() reliance

Changes since v1:

- FPU support fixed: detach FPU state from kernel thread state (implemented by Arjan van de Ven)

- remove superfluous CLONE_VM from create_async_thread() (noticed by Jens Axboe)

- sys_umem_add() does not ignore -EFAULT of __put_user() (noticed by Andrew Morton)

- use VERIFY_READ instead of VERIFY_WRITE in copy_uatom() (noticed by Andrew Morton)

- move schedule() to tail of loop in cachemiss_loop() (noticed by Andrew Morton)

- added move_user_context() arch op

- added async_syscall() and recursion protection against re-entry of sys_async_exec(), sys_fork()/sys_clone(), etc.

- added sys_async_thread() call - a user-space thread can thus call back into the syslet subsystem and continue cachemiss work.

- further cleanups in the include files

- race fixes to sys_async_wait()

- optimized out the kmalloc()/kfree() of the async_head

- async_thread structure not on the kernel stack anymore, to allow async contexts to run user-space.

- added support for head_stack and head_eip to enable the initial thread/task to run a cachemiss user context too, if it gets turned into a cachemiss thread.

As always, comments, suggestions, reports are welcome.

Ingo