From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Desnoyers Subject: Re: [RFC PATCH] membarrier-sync-core: Document architecture support Date: Tue, 6 Feb 2018 16:58:04 +0000 (UTC) Message-ID: <939962083.17018.1517936284383.JavaMail.zimbra@efficios.com> References: <1517935908-19474-1-git-send-email-mathieu.desnoyers@efficios.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1517935908-19474-1-git-send-email-mathieu.desnoyers@efficios.com> Sender: linux-arch-owner@vger.kernel.org To: Ingo Molnar Cc: linux-kernel , Thomas Gleixner , Peter Zijlstra , Andrea Parri , Andrew Hunter , Andy Lutomirski , Avi Kivity , Benjamin Herrenschmidt , Boqun Feng , Dave Watson , David Sehr , Greg Hackmann , "H. Peter Anvin" , Linus Torvalds , maged michael , Michael Ellerman , "Paul E. McKenney" , Paul Mackerras , "Russell King, ARM Linux" , Will List-Id: linux-api@vger.kernel.org ----- On Feb 6, 2018, at 11:51 AM, efficios efficios@ubuntu.efficios.com wrote: > Ensure we gather architecture requirements about each architecture supporting > the "sync_core" membarrier command in a single file under > Documentation/features. > > [ This patch applies on top of tip sched/core. ] please disregard this email. I will fix my git config on this dev machine and re-send. Thanks, Mathieu > > Signed-off-by: Mathieu Desnoyers > Cc: Ingo Molnar > Cc: Thomas Gleixner > Cc: Peter Zijlstra (Intel) > Cc: Andrea Parri > Cc: Andrew Hunter > Cc: Andy Lutomirski > Cc: Avi Kivity > Cc: Benjamin Herrenschmidt > Cc: Boqun Feng > Cc: Dave Watson > Cc: David Sehr > Cc: Greg Hackmann > Cc: H. Peter Anvin > Cc: Linus Torvalds > Cc: Maged Michael > Cc: Michael Ellerman > Cc: Paul E. McKenney > Cc: Paul Mackerras > Cc: Russell King > Cc: Will Deacon > Cc: linux-api@vger.kernel.org > Cc: linux-arch@vger.kernel.org > --- > .../sched/membarrier-sync-core/arch-support.txt | 62 ++++++++++++++++++++++ > 1 file changed, 62 insertions(+) > create mode 100644 > Documentation/features/sched/membarrier-sync-core/arch-support.txt > > diff --git a/Documentation/features/sched/membarrier-sync-core/arch-support.txt > b/Documentation/features/sched/membarrier-sync-core/arch-support.txt > new file mode 100644 > index 0000000..2c815a7 > --- /dev/null > +++ b/Documentation/features/sched/membarrier-sync-core/arch-support.txt > @@ -0,0 +1,62 @@ > +# > +# Feature name: membarrier-sync-core > +# Kconfig: ARCH_HAS_MEMBARRIER_SYNC_CORE > +# description: arch supports core serializing membarrier > +# > +# Architecture requirements > +# > +# * arm64 > +# > +# Rely on eret context synchronization when returning from IPI handler, and > +# when returning to user-space. > +# > +# * x86 > +# > +# x86-32 uses IRET as return from interrupt, which takes care of the IPI. > +# However, it uses both IRET and SYSEXIT to go back to user-space. The IRET > +# instruction is core serializing, but not SYSEXIT. > +# > +# x86-64 uses IRET as return from interrupt, which takes care of the IPI. > +# However, it can return to user-space through either SYSRETL (compat code), > +# SYSRETQ, or IRET. > +# > +# Given that neither SYSRET{L,Q}, nor SYSEXIT, are core serializing, we rely > +# instead on write_cr3() performed by switch_mm() to provide core serialization > +# after changing the current mm, and deal with the special case of kthread -> > +# uthread (temporarily keeping current mm into active_mm) by issuing a > +# sync_core_before_usermode() in that specific case. > +# > + ----------------------- > + | arch |status| > + ----------------------- > + | alpha: | TODO | > + | arc: | TODO | > + | arm: | TODO | > + | arm64: | ok | > + | blackfin: | TODO | > + | c6x: | TODO | > + | cris: | TODO | > + | frv: | TODO | > + | h8300: | TODO | > + | hexagon: | TODO | > + | ia64: | TODO | > + | m32r: | TODO | > + | m68k: | TODO | > + | metag: | TODO | > + | microblaze: | TODO | > + | mips: | TODO | > + | mn10300: | TODO | > + | nios2: | TODO | > + | openrisc: | TODO | > + | parisc: | TODO | > + | powerpc: | TODO | > + | s390: | TODO | > + | score: | TODO | > + | sh: | TODO | > + | sparc: | TODO | > + | tile: | TODO | > + | um: | TODO | > + | unicore32: | TODO | > + | x86: | ok | > + | xtensa: | TODO | > + ----------------------- > -- > 1.9.1 -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com