Re: Restartable Sequences system call merged into Linux

2018-06-15 Thread Mathieu Desnoyers
- On Jun 15, 2018, at 1:09 AM, Florian Weimer fwei...@redhat.com wrote: > On 06/14/2018 03:01 PM, Mathieu Desnoyers wrote: >> Another alternative would be to somehow let glibc handle the registration, >> perhaps only doing it for applications expressing their interest for rs

Re: Restartable Sequences system call merged into Linux

2018-06-15 Thread Mathieu Desnoyers
- On Jun 15, 2018, at 1:09 AM, Florian Weimer fwei...@redhat.com wrote: > On 06/14/2018 03:01 PM, Mathieu Desnoyers wrote: >> Another alternative would be to somehow let glibc handle the registration, >> perhaps only doing it for applications expressing their interest for rs

Re: Restartable Sequences system call merged into Linux

2018-06-15 Thread Mathieu Desnoyers
- On Jun 15, 2018, at 1:10 AM, Florian Weimer fwei...@redhat.com wrote: > On 06/14/2018 03:46 PM, Mathieu Desnoyers wrote: >> This would allow registering various TLS data structures with a single >> system call without hindering flexibility on the user-space side. For >&g

Re: Restartable Sequences system call merged into Linux

2018-06-15 Thread Mathieu Desnoyers
- On Jun 15, 2018, at 1:10 AM, Florian Weimer fwei...@redhat.com wrote: > On 06/14/2018 03:46 PM, Mathieu Desnoyers wrote: >> This would allow registering various TLS data structures with a single >> system call without hindering flexibility on the user-space side. For >&g

Re: [PATCH 2/4] MIPS: Add syscall detection for restartable sequences

2018-06-15 Thread Mathieu Desnoyers
t whether there is a > syscall issued erroneously inside a restartable sequence. > > Signed-off-by: Paul Burton > Cc: James Hogan > Cc: Ralf Baechle > Cc: Mathieu Desnoyers > Cc: Peter Zijlstra > Cc: Paul E. McKenney > Cc: Boqun Feng > Cc: linux-m...@linux-mips.org > Cc: li

Re: [PATCH 2/4] MIPS: Add syscall detection for restartable sequences

2018-06-15 Thread Mathieu Desnoyers
t whether there is a > syscall issued erroneously inside a restartable sequence. > > Signed-off-by: Paul Burton > Cc: James Hogan > Cc: Ralf Baechle > Cc: Mathieu Desnoyers > Cc: Peter Zijlstra > Cc: Paul E. McKenney > Cc: Boqun Feng > Cc: linux-m...@linux-mips.org > Cc: li

Re: [PATCH 4/4] rseq/selftests: Implement MIPS support

2018-06-15 Thread Mathieu Desnoyers
ribute__((aligned(4 * sizeof(__u64, and considering this comment: /* * struct rseq_cs is aligned on 4 * 8 bytes to ensure it is always * contained within a single cache-line. It is usually declared as * link-time constant data. */ The .balign 32 is the right thing to do here. I will add a .b

Re: [PATCH 4/4] rseq/selftests: Implement MIPS support

2018-06-15 Thread Mathieu Desnoyers
ribute__((aligned(4 * sizeof(__u64, and considering this comment: /* * struct rseq_cs is aligned on 4 * 8 bytes to ensure it is always * contained within a single cache-line. It is usually declared as * link-time constant data. */ The .balign 32 is the right thing to do here. I will add a .b

Re: Restartable Sequences system call merged into Linux

2018-06-14 Thread Mathieu Desnoyers
- On Jun 14, 2018, at 10:41 AM, Florian Weimer fwei...@redhat.com wrote: > On 06/14/2018 04:36 PM, Mathieu Desnoyers wrote: >> - On Jun 14, 2018, at 10:00 AM, Florian Weimer fwei...@redhat.com wrote: >> >>> On 06/14/2018 03:49 PM, Pavel Machek wrote: >>>

Re: Restartable Sequences system call merged into Linux

2018-06-14 Thread Mathieu Desnoyers
- On Jun 14, 2018, at 10:41 AM, Florian Weimer fwei...@redhat.com wrote: > On 06/14/2018 04:36 PM, Mathieu Desnoyers wrote: >> - On Jun 14, 2018, at 10:00 AM, Florian Weimer fwei...@redhat.com wrote: >> >>> On 06/14/2018 03:49 PM, Pavel Machek wrote: >>>

Re: Restartable Sequences system call merged into Linux

2018-06-14 Thread Mathieu Desnoyers
n many cases. > > Isn't that fork? I expect that the rseq arena is inherited on fork and > fork-type clone, otherwise it's going to be painful. On fork or clone creating a new process, the rseq tls area is inherited from the thread that does the fork syscall. On creation of a new thread with clone, there is no such inheritance. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: Restartable Sequences system call merged into Linux

2018-06-14 Thread Mathieu Desnoyers
n many cases. > > Isn't that fork? I expect that the rseq arena is inherited on fork and > fork-type clone, otherwise it's going to be painful. On fork or clone creating a new process, the rseq tls area is inherited from the thread that does the fork syscall. On creation of a new thread with clone, there is no such inheritance. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: Restartable Sequences system call merged into Linux

2018-06-14 Thread Mathieu Desnoyers
ray, size_t nb) This would allow registering various TLS data structures with a single system call without hindering flexibility on the user-space side. For instance, we could still use initial-exec and the __rseq_abi symbol for rseq with this approach. Thoughts ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: Restartable Sequences system call merged into Linux

2018-06-14 Thread Mathieu Desnoyers
ray, size_t nb) This would allow registering various TLS data structures with a single system call without hindering flexibility on the user-space side. For instance, we could still use initial-exec and the __rseq_abi symbol for rseq with this approach. Thoughts ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: Restartable Sequences system call merged into Linux

2018-06-14 Thread Mathieu Desnoyers
gt;> checks >> whether it's in a rseq critical section, >> - rseq_migrate: on migration, the scheduler sets TIF_NOTIFY_RESUME as well, > > Yes, this is not likely to be noticeable. > > But the proposal wanted to add a syscall to thread creation, right? > And I believe that may be noticeable. Fair point! Do we have a standard benchmark that would stress this ? If it ends up being noticeable overhead, I wonder whether we could extend clone() with a new CLONE_RSEQ flag so glibc could pass a pointer to the rseq TLS area through an extra argument to the clone system call rather than do an extra syscall on thread creation ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: Restartable Sequences system call merged into Linux

2018-06-14 Thread Mathieu Desnoyers
gt;> checks >> whether it's in a rseq critical section, >> - rseq_migrate: on migration, the scheduler sets TIF_NOTIFY_RESUME as well, > > Yes, this is not likely to be noticeable. > > But the proposal wanted to add a syscall to thread creation, right? > And I believe that may be noticeable. Fair point! Do we have a standard benchmark that would stress this ? If it ends up being noticeable overhead, I wonder whether we could extend clone() with a new CLONE_RSEQ flag so glibc could pass a pointer to the rseq TLS area through an extra argument to the clone system call rather than do an extra syscall on thread creation ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: Restartable Sequences system call merged into Linux

2018-06-14 Thread Mathieu Desnoyers
- On Jun 14, 2018, at 8:27 AM, Pavel Machek pa...@ucw.cz wrote: > On Tue 2018-06-12 12:31:24, Mathieu Desnoyers wrote: >> - On Jun 12, 2018, at 9:11 AM, Florian Weimer fwei...@redhat.com wrote: >> >> > On 06/11/2018 10:04 PM, Mathieu Desnoyers wrote: >> >

Re: Restartable Sequences system call merged into Linux

2018-06-14 Thread Mathieu Desnoyers
- On Jun 14, 2018, at 8:27 AM, Pavel Machek pa...@ucw.cz wrote: > On Tue 2018-06-12 12:31:24, Mathieu Desnoyers wrote: >> - On Jun 12, 2018, at 9:11 AM, Florian Weimer fwei...@redhat.com wrote: >> >> > On 06/11/2018 10:04 PM, Mathieu Desnoyers wrote: >> >

Re: Restartable Sequences system call merged into Linux

2018-06-13 Thread Mathieu Desnoyers
- On Jun 13, 2018, at 12:14 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jun 13, 2018, at 7:48 AM, heiko carstens heiko.carst...@de.ibm.com > wrote: [...] >> >> Is there any documentation available of what is the exact semantics of the >

Re: Restartable Sequences system call merged into Linux

2018-06-13 Thread Mathieu Desnoyers
- On Jun 13, 2018, at 12:14 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jun 13, 2018, at 7:48 AM, heiko carstens heiko.carst...@de.ibm.com > wrote: [...] >> >> Is there any documentation available of what is the exact semantics of the >

Re: Restartable Sequences system call merged into Linux

2018-06-13 Thread Mathieu Desnoyers
- On Jun 13, 2018, at 7:48 AM, heiko carstens heiko.carst...@de.ibm.com wrote: > On Mon, Jun 11, 2018 at 03:49:18PM -0400, Mathieu Desnoyers wrote: >> Hi! >> >> Good news! The restartable sequences (rseq) system call is now merged into >> the >> master >

Re: Restartable Sequences system call merged into Linux

2018-06-13 Thread Mathieu Desnoyers
- On Jun 13, 2018, at 7:48 AM, heiko carstens heiko.carst...@de.ibm.com wrote: > On Mon, Jun 11, 2018 at 03:49:18PM -0400, Mathieu Desnoyers wrote: >> Hi! >> >> Good news! The restartable sequences (rseq) system call is now merged into >> the >> master >

Re: Restartable Sequences system call merged into Linux

2018-06-12 Thread Mathieu Desnoyers
- On Jun 12, 2018, at 9:11 AM, Florian Weimer fwei...@redhat.com wrote: > On 06/11/2018 10:04 PM, Mathieu Desnoyers wrote: >> - On Jun 11, 2018, at 3:55 PM, Florian Weimer fwei...@redhat.com wrote: >> >>> On 06/11/2018 09:49 PM, Mathieu Desnoyers wrote:

Re: Restartable Sequences system call merged into Linux

2018-06-12 Thread Mathieu Desnoyers
- On Jun 12, 2018, at 9:11 AM, Florian Weimer fwei...@redhat.com wrote: > On 06/11/2018 10:04 PM, Mathieu Desnoyers wrote: >> - On Jun 11, 2018, at 3:55 PM, Florian Weimer fwei...@redhat.com wrote: >> >>> On 06/11/2018 09:49 PM, Mathieu Desnoyers wrote:

Re: Restartable Sequences system call merged into Linux

2018-06-11 Thread Mathieu Desnoyers
- On Jun 11, 2018, at 3:55 PM, Florian Weimer fwei...@redhat.com wrote: > On 06/11/2018 09:49 PM, Mathieu Desnoyers wrote: >> It should be noted that there can be only one rseq TLS area registered per >> thread, >> which can then be used by many libraries and

Re: Restartable Sequences system call merged into Linux

2018-06-11 Thread Mathieu Desnoyers
- On Jun 11, 2018, at 3:55 PM, Florian Weimer fwei...@redhat.com wrote: > On 06/11/2018 09:49 PM, Mathieu Desnoyers wrote: >> It should be noted that there can be only one rseq TLS area registered per >> thread, >> which can then be used by many libraries and

Restartable Sequences system call merged into Linux

2018-06-11 Thread Mathieu Desnoyers
this is a process-wide (per-thread) resource that we need to manage carefully. Thoughts ? Thanks! Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Restartable Sequences system call merged into Linux

2018-06-11 Thread Mathieu Desnoyers
this is a process-wide (per-thread) resource that we need to manage carefully. Thoughts ? Thanks! Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

[RFC PATCH for 4.18 14/16] rseq: selftests: Provide basic percpu ops test (v2)

2018-06-02 Thread Mathieu Desnoyers
"basic_percpu_ops_test" is a slightly more "realistic" variant, implementing a few simple per-cpu operations and testing their correctness. Signed-off-by: Mathieu Desnoyers CC: Shuah Khan CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Pau

[RFC PATCH for 4.18 00/16] Restartable Sequences

2018-06-02 Thread Mathieu Desnoyers
for restartable sequences powerpc: Wire up restartable sequences system call Mathieu Desnoyers (13): uapi headers: Provide types_32_64.h (v2) rseq: Introduce restartable sequences system call (v13) arm: Add restartable sequences support arm: Add syscall detection for restartable sequences

[RFC PATCH for 4.18 00/16] Restartable Sequences

2018-06-02 Thread Mathieu Desnoyers
for restartable sequences powerpc: Wire up restartable sequences system call Mathieu Desnoyers (13): uapi headers: Provide types_32_64.h (v2) rseq: Introduce restartable sequences system call (v13) arm: Add restartable sequences support arm: Add syscall detection for restartable sequences

[RFC PATCH for 4.18 14/16] rseq: selftests: Provide basic percpu ops test (v2)

2018-06-02 Thread Mathieu Desnoyers
"basic_percpu_ops_test" is a slightly more "realistic" variant, implementing a few simple per-cpu operations and testing their correctness. Signed-off-by: Mathieu Desnoyers CC: Shuah Khan CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Pau

[RFC PATCH for 4.18 03/16] arm: Add restartable sequences support

2018-06-02 Thread Mathieu Desnoyers
Call the rseq_handle_notify_resume() function on return to userspace if TIF_NOTIFY_RESUME thread flag is set. Perform fixup on the pre-signal frame when a signal is delivered on top of a restartable sequence critical section. Signed-off-by: Mathieu Desnoyers CC: Russell King CC: Catalin

[RFC PATCH for 4.18 04/16] arm: Add syscall detection for restartable sequences

2018-06-02 Thread Mathieu Desnoyers
Syscalls are not allowed inside restartable sequences, so add a call to rseq_syscall() at the very beginning of system call exiting path for CONFIG_DEBUG_RSEQ=y kernel. This could help us to detect whether there is a syscall issued inside restartable sequences. Signed-off-by: Mathieu Desnoyers

[RFC PATCH for 4.18 03/16] arm: Add restartable sequences support

2018-06-02 Thread Mathieu Desnoyers
Call the rseq_handle_notify_resume() function on return to userspace if TIF_NOTIFY_RESUME thread flag is set. Perform fixup on the pre-signal frame when a signal is delivered on top of a restartable sequence critical section. Signed-off-by: Mathieu Desnoyers CC: Russell King CC: Catalin

[RFC PATCH for 4.18 04/16] arm: Add syscall detection for restartable sequences

2018-06-02 Thread Mathieu Desnoyers
Syscalls are not allowed inside restartable sequences, so add a call to rseq_syscall() at the very beginning of system call exiting path for CONFIG_DEBUG_RSEQ=y kernel. This could help us to detect whether there is a syscall issued inside restartable sequences. Signed-off-by: Mathieu Desnoyers

[RFC PATCH for 4.18 02/16] rseq: Introduce restartable sequences system call (v13)

2018-06-02 Thread Mathieu Desnoyers
ogle.com Link: http://lkml.kernel.org/r/20150624222609.6116.86035.st...@kitami.mtv.corp.google.com Signed-off-by: Mathieu Desnoyers Acked-by: Peter Zijlstra (Intel) CC: Thomas Gleixner CC: Paul Turner CC: Andrew Hunter CC: Peter Zijlstra CC: Andy Lutomirski CC: Andi Kleen CC: Dave Watson CC

[RFC PATCH for 4.18 02/16] rseq: Introduce restartable sequences system call (v13)

2018-06-02 Thread Mathieu Desnoyers
ogle.com Link: http://lkml.kernel.org/r/20150624222609.6116.86035.st...@kitami.mtv.corp.google.com Signed-off-by: Mathieu Desnoyers Acked-by: Peter Zijlstra (Intel) CC: Thomas Gleixner CC: Paul Turner CC: Andrew Hunter CC: Peter Zijlstra CC: Andy Lutomirski CC: Andi Kleen CC: Dave Watson CC

[RFC PATCH for 4.18 11/16] selftests: lib.mk: Introduce OVERRIDE_TARGETS

2018-06-02 Thread Mathieu Desnoyers
Introduce OVERRIDE_TARGETS to allow tests to express dependencies on header files and .so, which require to override the selftests lib.mk targets. Signed-off-by: Mathieu Desnoyers Acked-by: Shuah Khan CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Paul Turner

[RFC PATCH for 4.18 13/16] rseq: selftests: Provide basic test

2018-06-02 Thread Mathieu Desnoyers
"basic_test" only asserts that RSEQ works moderately correctly. E.g. that the CPUID pointer works. Signed-off-by: Mathieu Desnoyers CC: Shuah Khan CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Paul Turner CC: Andrew Hunter CC: Peter Zijlstra

[RFC PATCH for 4.18 11/16] selftests: lib.mk: Introduce OVERRIDE_TARGETS

2018-06-02 Thread Mathieu Desnoyers
Introduce OVERRIDE_TARGETS to allow tests to express dependencies on header files and .so, which require to override the selftests lib.mk targets. Signed-off-by: Mathieu Desnoyers Acked-by: Shuah Khan CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Paul Turner

[RFC PATCH for 4.18 13/16] rseq: selftests: Provide basic test

2018-06-02 Thread Mathieu Desnoyers
"basic_test" only asserts that RSEQ works moderately correctly. E.g. that the CPUID pointer works. Signed-off-by: Mathieu Desnoyers CC: Shuah Khan CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Paul Turner CC: Andrew Hunter CC: Peter Zijlstra

[RFC PATCH for 4.18 12/16] rseq: selftests: Provide rseq library (v5)

2018-06-02 Thread Mathieu Desnoyers
may know where to place breakpoints when single-stepping through assembly blocks which may be aborted at any point by the kernel. Signed-off-by: Mathieu Desnoyers CC: Shuah Khan CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Paul Turner CC: Andrew Hunter CC

[RFC PATCH for 4.18 12/16] rseq: selftests: Provide rseq library (v5)

2018-06-02 Thread Mathieu Desnoyers
may know where to place breakpoints when single-stepping through assembly blocks which may be aborted at any point by the kernel. Signed-off-by: Mathieu Desnoyers CC: Shuah Khan CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Paul Turner CC: Andrew Hunter CC

[RFC PATCH for 4.18 15/16] rseq: selftests: Provide parametrized tests (v2)

2018-06-02 Thread Mathieu Desnoyers
is the same as "param_test", but it performs each comparison within rseq critical section twice, thus validating invariants. If any of the second comparisons fails, an error message is printed and the test aborts. Signed-off-by: Mathieu Desnoyers CC: Shuah Khan CC: Russell King CC: Cat

[RFC PATCH for 4.18 15/16] rseq: selftests: Provide parametrized tests (v2)

2018-06-02 Thread Mathieu Desnoyers
is the same as "param_test", but it performs each comparison within rseq critical section twice, thus validating invariants. If any of the second comparisons fails, an error message is printed and the test aborts. Signed-off-by: Mathieu Desnoyers CC: Shuah Khan CC: Russell King CC: Cat

[RFC PATCH for 4.18 16/16] rseq: selftests: Provide Makefile, scripts, gitignore (v2)

2018-06-02 Thread Mathieu Desnoyers
A run_param_test.sh script runs many variants of the parametrizable tests. Wire up the rseq Makefile, add directory entry into MAINTAINERS file. Signed-off-by: Mathieu Desnoyers CC: Shuah Khan CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Paul Turner CC

[RFC PATCH for 4.18 16/16] rseq: selftests: Provide Makefile, scripts, gitignore (v2)

2018-06-02 Thread Mathieu Desnoyers
A run_param_test.sh script runs many variants of the parametrizable tests. Wire up the rseq Makefile, add directory entry into MAINTAINERS file. Signed-off-by: Mathieu Desnoyers CC: Shuah Khan CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Paul Turner CC

[RFC PATCH for 4.18 05/16] arm: Wire up restartable sequences system call

2018-06-02 Thread Mathieu Desnoyers
. Signed-off-by: Mathieu Desnoyers CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Paul Turner CC: Andrew Hunter CC: Peter Zijlstra CC: Andy Lutomirski CC: Andi Kleen CC: Dave Watson CC: Chris Lameter CC: Ingo Molnar CC: Ben Maurer CC: Steven Rostedt CC

[RFC PATCH for 4.18 05/16] arm: Wire up restartable sequences system call

2018-06-02 Thread Mathieu Desnoyers
. Signed-off-by: Mathieu Desnoyers CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Paul Turner CC: Andrew Hunter CC: Peter Zijlstra CC: Andy Lutomirski CC: Andi Kleen CC: Dave Watson CC: Chris Lameter CC: Ingo Molnar CC: Ben Maurer CC: Steven Rostedt CC

[RFC PATCH for 4.18 06/16] x86: Add support for restartable sequences (v2)

2018-06-02 Thread Mathieu Desnoyers
sections by invoking rseq_signal() from syscall_return_slowpath(). With CONFIG_DEBUG_RSEQ, such behavior results in termination of the process with SIGSEGV. Signed-off-by: Mathieu Desnoyers Reviewed-by: Thomas Gleixner CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Paul Turner CC

[RFC PATCH for 4.18 10/16] powerpc: Wire up restartable sequences system call

2018-06-02 Thread Mathieu Desnoyers
-reservation/store-conditional atomics. Signed-off-by: Boqun Feng Signed-off-by: Mathieu Desnoyers CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Michael Ellerman CC: Peter Zijlstra CC: "Paul E. McKenney" CC: linuxppc-...@lists.ozlabs.org --- arch/powerpc/include/asm/systbl.h |

[RFC PATCH for 4.18 06/16] x86: Add support for restartable sequences (v2)

2018-06-02 Thread Mathieu Desnoyers
sections by invoking rseq_signal() from syscall_return_slowpath(). With CONFIG_DEBUG_RSEQ, such behavior results in termination of the process with SIGSEGV. Signed-off-by: Mathieu Desnoyers Reviewed-by: Thomas Gleixner CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Paul Turner CC

[RFC PATCH for 4.18 10/16] powerpc: Wire up restartable sequences system call

2018-06-02 Thread Mathieu Desnoyers
-reservation/store-conditional atomics. Signed-off-by: Boqun Feng Signed-off-by: Mathieu Desnoyers CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Michael Ellerman CC: Peter Zijlstra CC: "Paul E. McKenney" CC: linuxppc-...@lists.ozlabs.org --- arch/powerpc/include/asm/systbl.h |

[RFC PATCH for 4.18 08/16] powerpc: Add support for restartable sequences

2018-06-02 Thread Mathieu Desnoyers
From: Boqun Feng Call the rseq_handle_notify_resume() function on return to userspace if TIF_NOTIFY_RESUME thread flag is set. Perform fixup on the pre-signal when a signal is delivered on top of a restartable sequence critical section. Signed-off-by: Boqun Feng Signed-off-by: Mathieu

[RFC PATCH for 4.18 08/16] powerpc: Add support for restartable sequences

2018-06-02 Thread Mathieu Desnoyers
From: Boqun Feng Call the rseq_handle_notify_resume() function on return to userspace if TIF_NOTIFY_RESUME thread flag is set. Perform fixup on the pre-signal when a signal is delivered on top of a restartable sequence critical section. Signed-off-by: Boqun Feng Signed-off-by: Mathieu

[RFC PATCH for 4.18 01/16] uapi headers: Provide types_32_64.h (v2)

2018-06-02 Thread Mathieu Desnoyers
. The order of padding and 32-bit integer depends on the endianness. Signed-off-by: Mathieu Desnoyers CC: "Paul E. McKenney" CC: Peter Zijlstra CC: Paul Turner CC: Thomas Gleixner CC: Andrew Hunter CC: Andy Lutomirski CC: Andi Kleen CC: Dave Watson CC: Chris Lameter CC: Ingo Moln

[RFC PATCH for 4.18 07/16] x86: Wire up restartable sequence system call

2018-06-02 Thread Mathieu Desnoyers
r-cpu data. Signed-off-by: Mathieu Desnoyers Reviewed-by: Thomas Gleixner CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Paul Turner CC: Andrew Hunter CC: Peter Zijlstra CC: Andy Lutomirski CC: Andi Kleen CC: Dave Watson CC: Chris Lameter CC: Ingo Molnar CC: "H. Peter

[RFC PATCH for 4.18 01/16] uapi headers: Provide types_32_64.h (v2)

2018-06-02 Thread Mathieu Desnoyers
. The order of padding and 32-bit integer depends on the endianness. Signed-off-by: Mathieu Desnoyers CC: "Paul E. McKenney" CC: Peter Zijlstra CC: Paul Turner CC: Thomas Gleixner CC: Andrew Hunter CC: Andy Lutomirski CC: Andi Kleen CC: Dave Watson CC: Chris Lameter CC: Ingo Moln

[RFC PATCH for 4.18 07/16] x86: Wire up restartable sequence system call

2018-06-02 Thread Mathieu Desnoyers
r-cpu data. Signed-off-by: Mathieu Desnoyers Reviewed-by: Thomas Gleixner CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Paul Turner CC: Andrew Hunter CC: Peter Zijlstra CC: Andy Lutomirski CC: Andi Kleen CC: Dave Watson CC: Chris Lameter CC: Ingo Molnar CC: "H. Peter

Re: [PATCH v8 5/8] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-06-01 Thread Mathieu Desnoyers
o do/while (0) loop. > > "return;" is also used from "if (!(cond))" above so I prefer be consistent > and just use return than break as done above, but please let me know if you > still object. It's fine by me, Thanks! Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [PATCH v8 5/8] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-06-01 Thread Mathieu Desnoyers
o do/while (0) loop. > > "return;" is also used from "if (!(cond))" above so I prefer be consistent > and just use return than break as done above, but please let me know if you > still object. It's fine by me, Thanks! Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [PATCH v8 5/8] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-05-31 Thread Mathieu Desnoyers
srcu(_srcu, head, srcu_free_old_probes); > +} > + > static inline void release_probes(struct tracepoint_func *old) > { > if (old) { > struct tp_probes *tp_probes = container_of(old, > struct tp_probes, probes[0

Re: [PATCH v8 5/8] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-05-31 Thread Mathieu Desnoyers
srcu(_srcu, head, srcu_free_old_probes); > +} > + > static inline void release_probes(struct tracepoint_func *old) > { > if (old) { > struct tp_probes *tp_probes = container_of(old, > struct tp_probes, probes[0

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-28 Thread Mathieu Desnoyers
- On May 24, 2018, at 3:03 AM, Michael Ellerman m...@ellerman.id.au wrote: > Mathieu Desnoyers <mathieu.desnoy...@efficios.com> writes: >> - On May 23, 2018, at 4:14 PM, Mathieu Desnoyers >> mathieu.desnoy...@efficios.com wrote: > ... >>> >>

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-28 Thread Mathieu Desnoyers
- On May 24, 2018, at 3:03 AM, Michael Ellerman m...@ellerman.id.au wrote: > Mathieu Desnoyers writes: >> - On May 23, 2018, at 4:14 PM, Mathieu Desnoyers >> mathieu.desnoy...@efficios.com wrote: > ... >>> >>> Hi Boqun, >>> >>> I t

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-23 Thread Mathieu Desnoyers
- On May 23, 2018, at 4:14 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On May 20, 2018, at 10:08 AM, Boqun Feng boqun.f...@gmail.com wrote: > >> On Fri, May 18, 2018 at 02:17:17PM -0400, Mathieu Desnoyers wrote: >>> - On May 17, 2018, a

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-23 Thread Mathieu Desnoyers
- On May 23, 2018, at 4:14 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On May 20, 2018, at 10:08 AM, Boqun Feng boqun.f...@gmail.com wrote: > >> On Fri, May 18, 2018 at 02:17:17PM -0400, Mathieu Desnoyers wrote: >>> - On May 17, 2018, a

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-23 Thread Mathieu Desnoyers
- On May 20, 2018, at 10:08 AM, Boqun Feng boqun.f...@gmail.com wrote: > On Fri, May 18, 2018 at 02:17:17PM -0400, Mathieu Desnoyers wrote: >> - On May 17, 2018, at 7:50 PM, Boqun Feng boqun.f...@gmail.com wrote: >> [...] >> >> > I think you're right. So

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-23 Thread Mathieu Desnoyers
- On May 20, 2018, at 10:08 AM, Boqun Feng boqun.f...@gmail.com wrote: > On Fri, May 18, 2018 at 02:17:17PM -0400, Mathieu Desnoyers wrote: >> - On May 17, 2018, at 7:50 PM, Boqun Feng boqun.f...@gmail.com wrote: >> [...] >> >> > I think you're right. So

Re: [PATCH 03/14] arm: Add restartable sequences support

2018-05-22 Thread Mathieu Desnoyers
- On May 17, 2018, at 11:30 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: [...] > > Or as proposed by Boqun, we can simply call rseq_syscall in a > CONFIG_DEBUG_RSEQ > ifdef. Given that this is a debug option, is it worth it to add the > current->rs

Re: [PATCH 03/14] arm: Add restartable sequences support

2018-05-22 Thread Mathieu Desnoyers
- On May 17, 2018, at 11:30 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: [...] > > Or as proposed by Boqun, we can simply call rseq_syscall in a > CONFIG_DEBUG_RSEQ > ifdef. Given that this is a debug option, is it worth it to add the > current->rs

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-18 Thread Mathieu Desnoyers
YSCALL_DOTRACE|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) >> > By the way, I think this is not the right spot to call rseq_syscall, because interrupts are disabled. I think we should move this hunk right after system_call_exit. Would you like to implement and test an updated patch adding those calls for ppc 32 and 64 ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-18 Thread Mathieu Desnoyers
YSCALL_DOTRACE|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) >> > By the way, I think this is not the right spot to call rseq_syscall, because interrupts are disabled. I think we should move this hunk right after system_call_exit. Would you like to implement and test an updated patch adding those calls for ppc 32 and 64 ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [PATCH 03/14] arm: Add restartable sequences support

2018-05-17 Thread Mathieu Desnoyers
- On May 17, 2018, at 9:32 AM, Will Deacon will.dea...@arm.com wrote: > On Wed, May 16, 2018 at 04:13:13PM -0400, Mathieu Desnoyers wrote: >> - On May 16, 2018, at 12:18 PM, Peter Zijlstra pet...@infradead.org >> wrote: >> >> > On Mon, Apr 30, 2018 at 06:44

Re: [PATCH 03/14] arm: Add restartable sequences support

2018-05-17 Thread Mathieu Desnoyers
- On May 17, 2018, at 9:32 AM, Will Deacon will.dea...@arm.com wrote: > On Wed, May 16, 2018 at 04:13:13PM -0400, Mathieu Desnoyers wrote: >> - On May 16, 2018, at 12:18 PM, Peter Zijlstra pet...@infradead.org >> wrote: >> >> > On Mon, Apr 30, 2018 at 06:44

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-17 Thread Mathieu Desnoyers
- On May 16, 2018, at 9:19 PM, Boqun Feng boqun.f...@gmail.com wrote: > On Wed, May 16, 2018 at 04:13:16PM -0400, Mathieu Desnoyers wrote: >> - On May 16, 2018, at 12:18 PM, Peter Zijlstra pet...@infradead.org >> wrote: >> >> > On Mon, Apr 30, 2018 at 06:44

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-17 Thread Mathieu Desnoyers
- On May 16, 2018, at 9:19 PM, Boqun Feng boqun.f...@gmail.com wrote: > On Wed, May 16, 2018 at 04:13:16PM -0400, Mathieu Desnoyers wrote: >> - On May 16, 2018, at 12:18 PM, Peter Zijlstra pet...@infradead.org >> wrote: >> >> > On Mon, Apr 30, 2018 at 06:44

Re: [PATCH 02/14] rseq: Introduce restartable sequences system call (v13)

2018-05-16 Thread Mathieu Desnoyers
- On May 16, 2018, at 12:24 PM, Peter Zijlstra pet...@infradead.org wrote: > On Mon, Apr 30, 2018 at 06:44:21PM -0400, Mathieu Desnoyers wrote: >> Expose a new system call allowing each thread to register one userspace >> memory area to be used as an ABI between kernel and use

Re: [PATCH 02/14] rseq: Introduce restartable sequences system call (v13)

2018-05-16 Thread Mathieu Desnoyers
- On May 16, 2018, at 12:24 PM, Peter Zijlstra pet...@infradead.org wrote: > On Mon, Apr 30, 2018 at 06:44:21PM -0400, Mathieu Desnoyers wrote: >> Expose a new system call allowing each thread to register one userspace >> memory area to be used as an ABI between kernel and use

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-16 Thread Mathieu Desnoyers
- On May 16, 2018, at 12:18 PM, Peter Zijlstra pet...@infradead.org wrote: > On Mon, Apr 30, 2018 at 06:44:26PM -0400, Mathieu Desnoyers wrote: >> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig >> index c32a181a7cbb..ed21a777e8c6 100644 >> --- a/arch/powerpc/

Re: [PATCH 07/14] powerpc: Add support for restartable sequences

2018-05-16 Thread Mathieu Desnoyers
- On May 16, 2018, at 12:18 PM, Peter Zijlstra pet...@infradead.org wrote: > On Mon, Apr 30, 2018 at 06:44:26PM -0400, Mathieu Desnoyers wrote: >> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig >> index c32a181a7cbb..ed21a777e8c6 100644 >> --- a/arch/powerpc/

Re: [PATCH 03/14] arm: Add restartable sequences support

2018-05-16 Thread Mathieu Desnoyers
- On May 16, 2018, at 12:18 PM, Peter Zijlstra pet...@infradead.org wrote: > On Mon, Apr 30, 2018 at 06:44:22PM -0400, Mathieu Desnoyers wrote: >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig >> index a7f8e7f4b88f..4f5c386631d4 100644 >> --- a/arch/arm/Kconfig >

Re: [PATCH 03/14] arm: Add restartable sequences support

2018-05-16 Thread Mathieu Desnoyers
- On May 16, 2018, at 12:18 PM, Peter Zijlstra pet...@infradead.org wrote: > On Mon, Apr 30, 2018 at 06:44:22PM -0400, Mathieu Desnoyers wrote: >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig >> index a7f8e7f4b88f..4f5c386631d4 100644 >> --- a/arch/arm/Kconfig >

[RELEASE] LTTng-modules 2.9.9 (Linux kernel tracer)

2018-05-09 Thread Mathieu Desnoyers
* Fix: update timer instrumentation on 4.16 and 4.14-rt * Update kvm instrumentation for debian kernel 4.14.0-3 -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

[RELEASE] LTTng-modules 2.9.9 (Linux kernel tracer)

2018-05-09 Thread Mathieu Desnoyers
* Fix: update timer instrumentation on 4.16 and 4.14-rt * Update kvm instrumentation for debian kernel 4.14.0-3 -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

[RELEASE] LTTng-modules 2.10.6 (Linux kernel tracer)

2018-05-09 Thread Mathieu Desnoyers
instrumentation for v4.16 * Fix: update timer instrumentation on 4.16 and 4.14-rt * Update kvm instrumentation for debian kernel 4.14.0-3 -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

[RELEASE] LTTng-modules 2.10.6 (Linux kernel tracer)

2018-05-09 Thread Mathieu Desnoyers
instrumentation for v4.16 * Fix: update timer instrumentation on 4.16 and 4.14-rt * Update kvm instrumentation for debian kernel 4.14.0-3 -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [PATCH RFC v6 4/5] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-05-07 Thread Mathieu Desnoyers
- On May 7, 2018, at 5:46 PM, Joel Fernandes, Google j...@joelfernandes.org wrote: > On Mon, May 07, 2018 at 05:05:41PM -0400, Mathieu Desnoyers wrote: >> - On May 7, 2018, at 4:41 PM, Joel Fernandes joe...@google.com wrote: >> [...] >> > +extern struct src

Re: [PATCH RFC v6 4/5] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-05-07 Thread Mathieu Desnoyers
- On May 7, 2018, at 5:46 PM, Joel Fernandes, Google j...@joelfernandes.org wrote: > On Mon, May 07, 2018 at 05:05:41PM -0400, Mathieu Desnoyers wrote: >> - On May 7, 2018, at 4:41 PM, Joel Fernandes joe...@google.com wrote: >> [...] >> > +extern struct src

Re: [PATCH RFC v6 4/5] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-05-07 Thread Mathieu Desnoyers
t;> Mean: 3.020 (I would consider the improvement against the "without >> this series" case as just noise). >> Median: 3.013 >> Std Dev: 0.033 >> >> [1] https://patchwork.kernel.org/patch/10344297/ >> >> Cc: Steven Rostedt <rost.

Re: [PATCH RFC v6 4/5] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-05-07 Thread Mathieu Desnoyers
d consider the improvement against the "without >> this series" case as just noise). >> Median: 3.013 >> Std Dev: 0.033 >> >> [1] https://patchwork.kernel.org/patch/10344297/ >> >> Cc: Steven Rostedt >> Cc: Peter Zilstra >>

Re: [PATCH RFC v6 4/5] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-05-07 Thread Mathieu Desnoyers
nt_module_notifier(struct > notifier_block *nb) > */ > static inline void tracepoint_synchronize_unregister(void) > { > +#ifdef CONFIG_TRACEPOINTS > + synchronize_srcu(_srcu); > +#endif > synchronize_sched(); Why is this ifdef needed ? Thanks, Mathieu

Re: [PATCH RFC v6 4/5] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-05-07 Thread Mathieu Desnoyers
nt_module_notifier(struct > notifier_block *nb) > */ > static inline void tracepoint_synchronize_unregister(void) > { > +#ifdef CONFIG_TRACEPOINTS > + synchronize_srcu(_srcu); > +#endif > synchronize_sched(); Why is this ifdef needed ? Thanks, Mathieu

Re: [RFC PATCH for 4.18 12/23] cpu_opv: Provide cpu_opv system call (v7)

2018-05-04 Thread Mathieu Desnoyers
- On Apr 16, 2018, at 4:58 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Apr 16, 2018, at 3:26 PM, Linus Torvalds > torva...@linux-foundation.org > wrote: > >> On Mon, Apr 16, 2018 at 12:21 PM, Mathieu Desnoyers >> <mathieu.de

Re: [RFC PATCH for 4.18 12/23] cpu_opv: Provide cpu_opv system call (v7)

2018-05-04 Thread Mathieu Desnoyers
- On Apr 16, 2018, at 4:58 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Apr 16, 2018, at 3:26 PM, Linus Torvalds > torva...@linux-foundation.org > wrote: > >> On Mon, Apr 16, 2018 at 12:21 PM, Mathieu Desnoyers >> wrote: >>> >&

Re: [RFC PATCH for 4.18 00/14] Restartable Sequences

2018-05-03 Thread Mathieu Desnoyers
- On May 3, 2018, at 12:22 PM, Daniel Colascione dan...@google.com wrote: > On Thu, May 3, 2018 at 9:12 AM Mathieu Desnoyers < > mathieu.desnoy...@efficios.com> wrote: >> By the way, if we eventually find a way to enhance user-space mutexes in > the >> fashion

Re: [RFC PATCH for 4.18 00/14] Restartable Sequences

2018-05-03 Thread Mathieu Desnoyers
- On May 3, 2018, at 12:22 PM, Daniel Colascione dan...@google.com wrote: > On Thu, May 3, 2018 at 9:12 AM Mathieu Desnoyers < > mathieu.desnoy...@efficios.com> wrote: >> By the way, if we eventually find a way to enhance user-space mutexes in > the >> fashion

Re: [RFC PATCH for 4.18 00/14] Restartable Sequences

2018-05-03 Thread Mathieu Desnoyers
- On May 2, 2018, at 12:07 PM, Daniel Colascione dan...@google.com wrote: > On Wed, May 2, 2018 at 9:03 AM Mathieu Desnoyers < > mathieu.desnoy...@efficios.com> wrote: > >> - On May 1, 2018, at 11:53 PM, Daniel Colascione dan...@google.com > wrote: >> [

Re: [RFC PATCH for 4.18 00/14] Restartable Sequences

2018-05-03 Thread Mathieu Desnoyers
- On May 2, 2018, at 12:07 PM, Daniel Colascione dan...@google.com wrote: > On Wed, May 2, 2018 at 9:03 AM Mathieu Desnoyers < > mathieu.desnoy...@efficios.com> wrote: > >> - On May 1, 2018, at 11:53 PM, Daniel Colascione dan...@google.com > wrote: >> [

<    7   8   9   10   11   12   13   14   15   16   >