Re: [RFC PATCH v7 1/7] Restartable sequences system call

From
Christoph Lameter <hidden>
Date
2016-08-10 20:38:29
Also in
lkml
Reply to
Mathieu Desnoyers, 2016-08-10
On Wed, 10 Aug 2016, Mathieu Desnoyers wrote:
quoted hunk ↗ jump to hunk
- preemption of kernel code (for atomicity wrt other threads). This would
  replace preempt_disable()/preempt_enable() critical sections touching
  per-cpu data shared with other threads. We would have to do the event_counter
  increment and ip fixup directly in the sched_out hook when preempting
  kernel code.
What we would need is special handling when returning from a context
switch so that we recognize in what type of code section we are in and
continue execution at the proper retry site. This can be done by putting
code into special sections or other methods that do not require additional
coee.
quoted hunk ↗ jump to hunk
- possibly interrupt handlers (for atomicity wrt interrupts). This would
  replace local irq save/restore when touching per-cpu data shared with
  interrupt handlers. We would have to increment the event_counter and
  fixup on the pre-irq kernel frame.
Same thing as before. Test if we are in a section by testing the return
address and then maybe continue elsewhere.
Those supplementary hooks may add significant overall performance overhead,
so careful benchmarking would be required to figure out if it's worth it.
We need a design that does not need these hooks. If we check the return
IP address for a special range then we would not need those. Any hooks
would bloat the code in such a way that the implementation would not be
acceptable for the kernel code.
Thread (64 messages) 64 messages, 6 authors, last reply 2016-08-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help