From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-api <linux-api@vger.kernel.org>,
Andy Lutomirski <luto@kernel.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Boqun Feng <boqun.feng@gmail.com>, Andrew Hunter <ahh@google.com>,
maged michael <maged.michael@gmail.com>,
Avi Kivity <avi@scylladb.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Dave Watson <davejwatson@fb.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrea Parri <parri.andrea@gmail.com>,
"Russell King, ARM Linux" <linux@armlinux.org.uk>,
Greg Hackmann <ghackmann@google.com>,
Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH for 4.16 00/11] membarrier updates for 4.16
Date: Mon, 29 Jan 2018 16:02:46 +0000 (UTC) [thread overview]
Message-ID: <1278608578.11357.1517241766434.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20180123155733.3404-1-mathieu.desnoyers@efficios.com>
Hi Ingo, Hi Peter,
Please let me know if you find anything that prevents you from integrating
this patchset into the scheduler tree.
Thanks,
Mathieu
----- On Jan 23, 2018, at 10:57 AM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote:
> Hi Ingo, Peter, Thomas,
>
> Here is the updated membarrier patch series following review from
> Andy.
>
> It would be appreciated of those can go through the scheduler tree for
> the 4.16 merge window.
>
> Patch "x86: Implement sync_core_before_usermode" got a reviewed-by from
> Thomas, but I removed the tag following KPTI-related optimizations based
> on the discussion with Andy afterwards.
>
> Highlights:
>
> "powerpc: membarrier: Skip memory barrier in switch_mm()" takes care of
> a TODO that was left in the private expedited implementation when merged
> in 4.14: an extra memory barrier was added on context switch on powerpc.
> Ensure that the barrier is only performed when scheduling between
> different processes, only for threads belonging to processes that have
> registered their intent to use the private expedited command.
>
> "membarrier: provide GLOBAL_EXPEDITED command" adds new commands to
> membarrier for registration and use of membarrier across processes
> communicating through shared memory mappings. The non-expedited command
> has proven to be really too slow (taking 10ms and more to complete) for
> real-world use. The expedited version completes in a matter of
> microseconds. This patch renames the pre-existing MEMBARRIER_CMD_SHARED
> to MEMBARRIER_CMD_GLOBAL for consistency, keeping the old enum label
> as an alias for backward compatibility.
>
> "membarrier: Provide core serializing command" provides core
> serialization for JIT reclaim. We received positive feedback from
> Android developers that the proposed ABI fits their use-case.
> Only x86 32/64 and arm 64 implement this command so far. This is
> opt-in per architecture.
>
> The other patches add selftests and documentation.
>
> Thanks,
>
> Mathieu
>
> Mathieu Desnoyers (11):
> membarrier: selftest: Test private expedited cmd (v2)
> powerpc: membarrier: Skip memory barrier in switch_mm() (v7)
> membarrier: Document scheduler barrier requirements (v5)
> membarrier: provide GLOBAL_EXPEDITED command (v3)
> membarrier: selftest: Test global expedited cmd (v2)
> Introduce sync_core_before_usermode (v2)
> x86: Implement sync_core_before_usermode (v3)
> membarrier: Provide core serializing command (v2)
> membarrier: x86: Provide core serializing command (v4)
> membarrier: arm64: Provide core serializing command
> membarrier: selftest: Test private expedited sync core cmd
>
> MAINTAINERS | 1 +
> arch/arm64/Kconfig | 1 +
> arch/arm64/kernel/entry.S | 4 +
> arch/powerpc/Kconfig | 1 +
> arch/powerpc/include/asm/membarrier.h | 27 +++
> arch/powerpc/mm/mmu_context.c | 7 +
> arch/x86/Kconfig | 2 +
> arch/x86/entry/entry_32.S | 5 +
> arch/x86/entry/entry_64.S | 4 +
> arch/x86/include/asm/sync_core.h | 28 +++
> arch/x86/mm/tlb.c | 6 +
> include/linux/sched/mm.h | 40 +++-
> include/linux/sync_core.h | 21 ++
> include/uapi/linux/membarrier.h | 74 ++++++-
> init/Kconfig | 9 +
> kernel/sched/core.c | 53 +++--
> kernel/sched/membarrier.c | 177 +++++++++++++--
> .../testing/selftests/membarrier/membarrier_test.c | 237 +++++++++++++++++++--
> 18 files changed, 629 insertions(+), 68 deletions(-)
> create mode 100644 arch/powerpc/include/asm/membarrier.h
> create mode 100644 arch/x86/include/asm/sync_core.h
> create mode 100644 include/linux/sync_core.h
>
> --
> 2.11.0
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-api <linux-api@vger.kernel.org>,
Andy Lutomirski <luto@kernel.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Boqun Feng <boqun.feng@gmail.com>, Andrew Hunter <ahh@google.com>,
maged michael <maged.michael@gmail.com>,
Avi Kivity <avi@scylladb.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Dave Watson <davejwatson@fb.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrea Parri <parri.andrea@gmail.com>,
"Russell King, ARM Linux" <linux@armlinux.org.uk>,
Greg Hackmann <ghackmann@google.com>,
Will Deacon <will.deacon@arm.com>, David Sehr <sehr@google.com>,
x86 <x86@kernel.org>
Subject: Re: [PATCH for 4.16 00/11] membarrier updates for 4.16
Date: Mon, 29 Jan 2018 16:02:46 +0000 (UTC) [thread overview]
Message-ID: <1278608578.11357.1517241766434.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20180123155733.3404-1-mathieu.desnoyers@efficios.com>
Hi Ingo, Hi Peter,
Please let me know if you find anything that prevents you from integrating
this patchset into the scheduler tree.
Thanks,
Mathieu
----- On Jan 23, 2018, at 10:57 AM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote:
> Hi Ingo, Peter, Thomas,
>
> Here is the updated membarrier patch series following review from
> Andy.
>
> It would be appreciated of those can go through the scheduler tree for
> the 4.16 merge window.
>
> Patch "x86: Implement sync_core_before_usermode" got a reviewed-by from
> Thomas, but I removed the tag following KPTI-related optimizations based
> on the discussion with Andy afterwards.
>
> Highlights:
>
> "powerpc: membarrier: Skip memory barrier in switch_mm()" takes care of
> a TODO that was left in the private expedited implementation when merged
> in 4.14: an extra memory barrier was added on context switch on powerpc.
> Ensure that the barrier is only performed when scheduling between
> different processes, only for threads belonging to processes that have
> registered their intent to use the private expedited command.
>
> "membarrier: provide GLOBAL_EXPEDITED command" adds new commands to
> membarrier for registration and use of membarrier across processes
> communicating through shared memory mappings. The non-expedited command
> has proven to be really too slow (taking 10ms and more to complete) for
> real-world use. The expedited version completes in a matter of
> microseconds. This patch renames the pre-existing MEMBARRIER_CMD_SHARED
> to MEMBARRIER_CMD_GLOBAL for consistency, keeping the old enum label
> as an alias for backward compatibility.
>
> "membarrier: Provide core serializing command" provides core
> serialization for JIT reclaim. We received positive feedback from
> Android developers that the proposed ABI fits their use-case.
> Only x86 32/64 and arm 64 implement this command so far. This is
> opt-in per architecture.
>
> The other patches add selftests and documentation.
>
> Thanks,
>
> Mathieu
>
> Mathieu Desnoyers (11):
> membarrier: selftest: Test private expedited cmd (v2)
> powerpc: membarrier: Skip memory barrier in switch_mm() (v7)
> membarrier: Document scheduler barrier requirements (v5)
> membarrier: provide GLOBAL_EXPEDITED command (v3)
> membarrier: selftest: Test global expedited cmd (v2)
> Introduce sync_core_before_usermode (v2)
> x86: Implement sync_core_before_usermode (v3)
> membarrier: Provide core serializing command (v2)
> membarrier: x86: Provide core serializing command (v4)
> membarrier: arm64: Provide core serializing command
> membarrier: selftest: Test private expedited sync core cmd
>
> MAINTAINERS | 1 +
> arch/arm64/Kconfig | 1 +
> arch/arm64/kernel/entry.S | 4 +
> arch/powerpc/Kconfig | 1 +
> arch/powerpc/include/asm/membarrier.h | 27 +++
> arch/powerpc/mm/mmu_context.c | 7 +
> arch/x86/Kconfig | 2 +
> arch/x86/entry/entry_32.S | 5 +
> arch/x86/entry/entry_64.S | 4 +
> arch/x86/include/asm/sync_core.h | 28 +++
> arch/x86/mm/tlb.c | 6 +
> include/linux/sched/mm.h | 40 +++-
> include/linux/sync_core.h | 21 ++
> include/uapi/linux/membarrier.h | 74 ++++++-
> init/Kconfig | 9 +
> kernel/sched/core.c | 53 +++--
> kernel/sched/membarrier.c | 177 +++++++++++++--
> .../testing/selftests/membarrier/membarrier_test.c | 237 +++++++++++++++++++--
> 18 files changed, 629 insertions(+), 68 deletions(-)
> create mode 100644 arch/powerpc/include/asm/membarrier.h
> create mode 100644 arch/x86/include/asm/sync_core.h
> create mode 100644 include/linux/sync_core.h
>
> --
> 2.11.0
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2018-01-29 16:02 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 15:57 [PATCH for 4.16 00/11] membarrier updates for 4.16 Mathieu Desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
2018-01-23 15:57 ` [PATCH 01/11] membarrier: selftest: Test private expedited cmd (v2) Mathieu Desnoyers
2018-01-23 15:57 ` [Linux-kselftest-mirror] " Mathieu Desnoyers
2018-01-23 15:57 ` mathieu.desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
[not found] ` <20180123155733.3404-1-mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2018-01-23 15:57 ` [PATCH 02/11] powerpc: membarrier: Skip memory barrier in switch_mm() (v7) Mathieu Desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
2018-01-23 15:57 ` [PATCH 04/11] membarrier: provide GLOBAL_EXPEDITED command (v3) Mathieu Desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
2018-01-23 15:57 ` [PATCH 05/11] membarrier: selftest: Test global expedited cmd (v2) Mathieu Desnoyers
2018-01-23 15:57 ` [Linux-kselftest-mirror] " Mathieu Desnoyers
2018-01-23 15:57 ` mathieu.desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
2018-01-23 15:57 ` [PATCH 07/11] x86: Implement sync_core_before_usermode (v3) Mathieu Desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
2018-01-23 15:57 ` [PATCH 09/11] membarrier: x86: Provide core serializing command (v4) Mathieu Desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
2018-01-29 19:13 ` [PATCH for 4.16 00/11] membarrier updates for 4.16 Peter Zijlstra
2018-01-29 19:13 ` Peter Zijlstra
2018-01-23 15:57 ` [PATCH 03/11] membarrier: Document scheduler barrier requirements (v5) Mathieu Desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
2018-01-23 15:57 ` [PATCH 06/11] Introduce sync_core_before_usermode (v2) Mathieu Desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
2018-01-23 15:57 ` [PATCH 08/11] membarrier: Provide core serializing command (v2) Mathieu Desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
2018-01-29 18:04 ` Peter Zijlstra
2018-01-29 18:04 ` Peter Zijlstra
[not found] ` <20180129180414.GO2249-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2018-01-29 18:15 ` Peter Zijlstra
2018-01-29 18:15 ` Peter Zijlstra
[not found] ` <20180129181529.GG2295-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2018-01-29 18:36 ` Mathieu Desnoyers
2018-01-29 18:36 ` Mathieu Desnoyers
[not found] ` <485936677.11601.1517250965043.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2018-01-29 19:09 ` Peter Zijlstra
2018-01-29 19:09 ` Peter Zijlstra
[not found] ` <20180129190923.GP2249-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2018-01-29 19:20 ` Mathieu Desnoyers
2018-01-29 19:20 ` Mathieu Desnoyers
2018-01-23 15:57 ` [PATCH 10/11] membarrier: arm64: Provide core serializing command Mathieu Desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
2018-01-23 15:57 ` [PATCH 11/11] membarrier: selftest: Test private expedited sync core cmd Mathieu Desnoyers
2018-01-23 15:57 ` [Linux-kselftest-mirror] " Mathieu Desnoyers
2018-01-23 15:57 ` mathieu.desnoyers
2018-01-23 15:57 ` Mathieu Desnoyers
2018-01-29 16:02 ` Mathieu Desnoyers [this message]
2018-01-29 16:02 ` [PATCH for 4.16 00/11] membarrier updates for 4.16 Mathieu Desnoyers
2018-01-29 17:40 ` Linus Torvalds
2018-01-29 17:40 ` Linus Torvalds
[not found] ` <CA+55aFxdqXJidPLFb--pa8cmJnepzGpLRD=gNXgktkjNW+jJug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-05 16:33 ` Ingo Molnar
2018-02-05 16:33 ` Ingo Molnar
[not found] ` <20180205163353.llyamby4o7ajsvt7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-05 17:23 ` Linus Torvalds
2018-02-05 17:23 ` Linus Torvalds
[not found] ` <CA+55aFw9r1bLhPZ8bOApD7dBPTtFLBk+A71qLNF+XrEOL8+1oA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-05 18:33 ` Ingo Molnar
2018-02-05 18:33 ` Ingo Molnar
2018-02-05 18:53 ` Mathieu Desnoyers
2018-02-05 18:53 ` Mathieu Desnoyers
[not found] ` <1659703322.16254.1517856780591.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2018-02-05 19:49 ` Ingo Molnar
2018-02-05 19:49 ` Ingo Molnar
2018-02-05 19:54 ` Linus Torvalds
2018-02-05 19:54 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2018-01-29 20:20 Mathieu Desnoyers
2018-01-29 20:20 ` Mathieu Desnoyers
[not found] ` <20180129202020.8515-1-mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2018-02-05 21:21 ` Ingo Molnar
2018-02-05 21:21 ` Ingo Molnar
2018-01-17 16:54 Mathieu Desnoyers
2018-01-17 16:54 ` Mathieu Desnoyers
2018-01-10 15:46 Mathieu Desnoyers
2018-01-10 15:46 ` Mathieu Desnoyers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1278608578.11357.1517241766434.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=ahh@google.com \
--cc=avi@scylladb.com \
--cc=benh@kernel.crashing.org \
--cc=boqun.feng@gmail.com \
--cc=davejwatson@fb.com \
--cc=ghackmann@google.com \
--cc=hpa@zytor.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luto@kernel.org \
--cc=maged.michael@gmail.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=parri.andrea@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.