Re: [patch 00/11] ANNOUNCE: "Syslets", generic asynchronous system call support




* Evgeniy Polyakov <johnpol@xxxxxxxxxxx> wrote:

[...] it still has a problem - syscall blocks and the same thread thus
is not allowed to continue execution and fill the pipe - so what if
system issues thousands of requests and there are only tens of working
thread at most. [...]

the same thread is allowed to continue execution even if the system call
blocks: take a look at async_schedule(). The blocked system-call is 'put
aside' (in a sleeping thread), the kernel switches the user-space
context (registers) to a free kernel thread and switches to it - and
returns to user-space as if nothing happened - allowing the user-space
context to 'fill the pipe' as much as it can. Or did i misunderstand
your point?

basically there's SYSLET_ASYNC for 'always async' and SYSLET_SYNC for
'always sync' - but the default syslet behavior is: 'try sync and switch
transparently to async on demand'. The testcode i sent very much uses
this. (and this mechanism is in essence Zach's fibril-switching thing,
but done via kernel threads.)

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/



Relevant Pages

  • Re: USB2 + kdb support (UMASS disk dump + USB keyboard)
    ... Instead I want to enforce normal running mode where USB and timer callbacks are handled like normal when in the kernel debugger. ... When the CPU is in the debugger and is asking for USB devices to be polled, is there a way to get the USB threads running again so that callbacks can be handled? ... From within callout handlers and task queue execution environments. ... While in DDB, in general, no further kernel execution is permitted, and we disable interrupts and IPI all CPUs to ensure that is the case. ...
    (freebsd-current)
  • Re: [patch 00/11] ANNOUNCE: "Syslets", generic asynchronous system call support
    ... properly separating the user execution context from the kernel execution ... What about TLS related kernel ...
    (Linux-Kernel)
  • Re: [tip:perfcounters/core] perf_counter: x86: Fix call-chain support to use NMI-safe method
    ... See the numbers in the other mail: about 33 million pagefaults ... speed up the kernel entry and exit, the few tens of cycles we ... Execution of a newly forked/exec'd process instruction causes a fault. ...
    (Linux-Kernel)
  • Re: AT_EXECFN not useful
    ... have to canonicalize the path (call realpath etc). ... AT_EXECFN also may have an advantage when the kernel ... Perhaps glibc cannot verify the value, so that may be a reason to avoid ... the value in the case of suid/sgid execution. ...
    (Linux-Kernel)
  • Re: [Full-disclosure] [Dailydave] What RedHat doesnt want you to know about ExecShield (without
    ... SE Linux has nothing to do with buffer overflows besides checking that the ... highest executable mapping in the address space is executable. ... The mapping addresses are a policy of the kernel. ... Until the kernel address space has no execution permission ...
    (Full-Disclosure)