From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EF42C49EA3 for ; Fri, 18 Jun 2021 19:58:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 55EF6613C1 for ; Fri, 18 Jun 2021 19:58:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233602AbhFRUAq (ORCPT ); Fri, 18 Jun 2021 16:00:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:44250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232605AbhFRUAn (ORCPT ); Fri, 18 Jun 2021 16:00:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 62B7D60C3D; Fri, 18 Jun 2021 19:58:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624046313; bh=D7oBl/0a90lKe9pWfqLnpCpCt9G9AbWx/2EijH8CQy4=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=ZFwYmRIs2uRf1tIy8hT6Wi0I+iZUU7Gz+mTMkEZBflk9hqT2FNIz0/3iBhFoj0iYf zFbcLcIY3NG911o6doq5+lh9n4k8TAoWTjKvg7+suYYJ4Z//xJQ7SW/1Q6tZ5oqlqC KRbz/ZENYmXGbxnzQFHAaRU0My3Pe9jLWUrnEsHYt801nl7MUg4TJK/qYoS/6sOOgF RpP2phEll/ZETdKFJS/NSI2oES8OAx6Gar9IN3BHHe3jpi1DaLqPV47F9x/nt6ffIi 44khMWq29Tid3SRb8+DbVNpwVwPkswRfo/BJbyWc3atNlPFDD1wWjPEPAoCIaK5MKa +kN/kviVn/f+w== Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailauth.nyi.internal (Postfix) with ESMTP id 76E9127C0054; Fri, 18 Jun 2021 15:58:31 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute2.internal (MEProxy); Fri, 18 Jun 2021 15:58:31 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeffedgudefiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdet nhguhicunfhuthhomhhirhhskhhifdcuoehluhhtoheskhgvrhhnvghlrdhorhhgqeenuc ggtffrrghtthgvrhhnpedvleehjeejvefhuddtgeegffdtjedtffegveethedvgfejieev ieeufeevuedvteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegrnhguhidomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudduiedu keehieefvddqvdeifeduieeitdekqdhluhhtoheppehkvghrnhgvlhdrohhrgheslhhinh hugidrlhhuthhordhush X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 8510651C0060; Fri, 18 Jun 2021 15:58:28 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-526-gf020ecf851-fm-20210616.001-gf020ecf8 Mime-Version: 1.0 Message-Id: <1d617df2-57fa-4953-9c75-6de3909a6f14@www.fastmail.com> In-Reply-To: <593983567.12619.1624033908849.JavaMail.zimbra@efficios.com> References: <07a8b963002cb955b7516e61bad19514a3acaa82.1623813516.git.luto@kernel.org> <827549827.10547.1623941277868.JavaMail.zimbra@efficios.com> <26196903-4aee-33c4-bed8-8bf8c7b46793@kernel.org> <593983567.12619.1624033908849.JavaMail.zimbra@efficios.com> Date: Fri, 18 Jun 2021 12:58:07 -0700 From: "Andy Lutomirski" To: "Mathieu Desnoyers" Cc: "the arch/x86 maintainers" , "Dave Hansen" , "Linux Kernel Mailing List" , linux-mm , "Andrew Morton" , "Michael Ellerman" , "Benjamin Herrenschmidt" , "Paul Mackerras" , linuxppc-dev , "Nicholas Piggin" , "Catalin Marinas" , "Will Deacon" , linux-arm-kernel , "Peter Zijlstra (Intel)" , stable Subject: =?UTF-8?Q?Re:_[PATCH_8/8]_membarrier:_Rewrite_sync=5Fcore=5Fbefore=5Fuse?= =?UTF-8?Q?rmode()_and_improve_documentation?= Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 18, 2021, at 9:31 AM, Mathieu Desnoyers wrote: > ----- On Jun 17, 2021, at 8:12 PM, Andy Lutomirski luto@kernel.org wro= te: >=20 > > On 6/17/21 7:47 AM, Mathieu Desnoyers wrote: > >=20 > >> Please change back this #ifndef / #else / #endif within function fo= r > >>=20 > >> if (!IS_ENABLED(CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE)) { > >> ... > >> } else { > >> ... > >> } > >>=20 > >> I don't think mixing up preprocessor and code logic makes it more r= eadable. > >=20 > > I agree, but I don't know how to make the result work well. > > membarrier_sync_core_before_usermode() isn't defined in the !IS_ENAB= LED > > case, so either I need to fake up a definition or use #ifdef. > >=20 > > If I faked up a definition, I would want to assert, at build time, t= hat > > it isn't called. I don't think we can do: > >=20 > > static void membarrier_sync_core_before_usermode() > > { > > BUILD_BUG_IF_REACHABLE(); > > } >=20 > Let's look at the context here: >=20 > static void ipi_sync_core(void *info) > { > [....] > membarrier_sync_core_before_usermode() > } >=20 > ^ this can be within #ifdef / #endif >=20 > static int membarrier_private_expedited(int flags, int cpu_id) > [...] > if (!IS_ENABLED(CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE)) > return -EINVAL; > if (!(atomic_read(&mm->membarrier_state) & > MEMBARRIER_STATE_PRIVATE_EXPEDITED_SYNC_CORE_REA= DY)) > return -EPERM; > ipi_func =3D ipi_sync_core; >=20 > All we need to make the line above work is to define an empty ipi_sync= _core > function in the #else case after the ipi_sync_core() function definiti= on. >=20 > Or am I missing your point ? Maybe? My objection is that an empty ipi_sync_core is a lie =E2=80=94 it doesn=E2= =80=99t sync the core. I would be fine with that if I could have the co= mpiler statically verify that it=E2=80=99s not called, but I=E2=80=99m u= ncomfortable having it there if the implementation is actively incorrect= . From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D31AC48BDF for ; Fri, 18 Jun 2021 19:59:05 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC98660C3D for ; Fri, 18 Jun 2021 19:59:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC98660C3D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4G68rR5V5sz3c5m for ; Sat, 19 Jun 2021 05:59:03 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ZFwYmRIs; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=luto@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ZFwYmRIs; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4G68qx3mZCz3btr for ; Sat, 19 Jun 2021 05:58:37 +1000 (AEST) Received: by mail.kernel.org (Postfix) with ESMTPSA id 62B7D60C3D; Fri, 18 Jun 2021 19:58:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624046313; bh=D7oBl/0a90lKe9pWfqLnpCpCt9G9AbWx/2EijH8CQy4=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=ZFwYmRIs2uRf1tIy8hT6Wi0I+iZUU7Gz+mTMkEZBflk9hqT2FNIz0/3iBhFoj0iYf zFbcLcIY3NG911o6doq5+lh9n4k8TAoWTjKvg7+suYYJ4Z//xJQ7SW/1Q6tZ5oqlqC KRbz/ZENYmXGbxnzQFHAaRU0My3Pe9jLWUrnEsHYt801nl7MUg4TJK/qYoS/6sOOgF RpP2phEll/ZETdKFJS/NSI2oES8OAx6Gar9IN3BHHe3jpi1DaLqPV47F9x/nt6ffIi 44khMWq29Tid3SRb8+DbVNpwVwPkswRfo/BJbyWc3atNlPFDD1wWjPEPAoCIaK5MKa +kN/kviVn/f+w== Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailauth.nyi.internal (Postfix) with ESMTP id 76E9127C0054; Fri, 18 Jun 2021 15:58:31 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute2.internal (MEProxy); Fri, 18 Jun 2021 15:58:31 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeffedgudefiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdet nhguhicunfhuthhomhhirhhskhhifdcuoehluhhtoheskhgvrhhnvghlrdhorhhgqeenuc ggtffrrghtthgvrhhnpedvleehjeejvefhuddtgeegffdtjedtffegveethedvgfejieev ieeufeevuedvteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegrnhguhidomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudduiedu keehieefvddqvdeifeduieeitdekqdhluhhtoheppehkvghrnhgvlhdrohhrgheslhhinh hugidrlhhuthhordhush X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 8510651C0060; Fri, 18 Jun 2021 15:58:28 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-526-gf020ecf851-fm-20210616.001-gf020ecf8 Mime-Version: 1.0 Message-Id: <1d617df2-57fa-4953-9c75-6de3909a6f14@www.fastmail.com> In-Reply-To: <593983567.12619.1624033908849.JavaMail.zimbra@efficios.com> References: <07a8b963002cb955b7516e61bad19514a3acaa82.1623813516.git.luto@kernel.org> <827549827.10547.1623941277868.JavaMail.zimbra@efficios.com> <26196903-4aee-33c4-bed8-8bf8c7b46793@kernel.org> <593983567.12619.1624033908849.JavaMail.zimbra@efficios.com> Date: Fri, 18 Jun 2021 12:58:07 -0700 From: "Andy Lutomirski" To: "Mathieu Desnoyers" Subject: =?UTF-8?Q?Re:_[PATCH_8/8]_membarrier:_Rewrite_sync=5Fcore=5Fbefore=5Fuse?= =?UTF-8?Q?rmode()_and_improve_documentation?= Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , Will Deacon , linux-mm , "Peter Zijlstra \(Intel\)" , the arch/x86 maintainers , Linux Kernel Mailing List , Nicholas Piggin , Dave Hansen , Paul Mackerras , stable , Andrew Morton , linuxppc-dev , linux-arm-kernel Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Jun 18, 2021, at 9:31 AM, Mathieu Desnoyers wrote: > ----- On Jun 17, 2021, at 8:12 PM, Andy Lutomirski luto@kernel.org wro= te: >=20 > > On 6/17/21 7:47 AM, Mathieu Desnoyers wrote: > >=20 > >> Please change back this #ifndef / #else / #endif within function fo= r > >>=20 > >> if (!IS_ENABLED(CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE)) { > >> ... > >> } else { > >> ... > >> } > >>=20 > >> I don't think mixing up preprocessor and code logic makes it more r= eadable. > >=20 > > I agree, but I don't know how to make the result work well. > > membarrier_sync_core_before_usermode() isn't defined in the !IS_ENAB= LED > > case, so either I need to fake up a definition or use #ifdef. > >=20 > > If I faked up a definition, I would want to assert, at build time, t= hat > > it isn't called. I don't think we can do: > >=20 > > static void membarrier_sync_core_before_usermode() > > { > > BUILD_BUG_IF_REACHABLE(); > > } >=20 > Let's look at the context here: >=20 > static void ipi_sync_core(void *info) > { > [....] > membarrier_sync_core_before_usermode() > } >=20 > ^ this can be within #ifdef / #endif >=20 > static int membarrier_private_expedited(int flags, int cpu_id) > [...] > if (!IS_ENABLED(CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE)) > return -EINVAL; > if (!(atomic_read(&mm->membarrier_state) & > MEMBARRIER_STATE_PRIVATE_EXPEDITED_SYNC_CORE_REA= DY)) > return -EPERM; > ipi_func =3D ipi_sync_core; >=20 > All we need to make the line above work is to define an empty ipi_sync= _core > function in the #else case after the ipi_sync_core() function definiti= on. >=20 > Or am I missing your point ? Maybe? My objection is that an empty ipi_sync_core is a lie =E2=80=94 it doesn=E2= =80=99t sync the core. I would be fine with that if I could have the co= mpiler statically verify that it=E2=80=99s not called, but I=E2=80=99m u= ncomfortable having it there if the implementation is actively incorrect= . From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AA38C49361 for ; Fri, 18 Jun 2021 20:00:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE9BC613C1 for ; Fri, 18 Jun 2021 20:00:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE9BC613C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:Cc:To:From:Date:References: In-Reply-To:Message-Id:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hKD1fKYKL6SlBEo1LlhcvgxTLvr/7yQ8o+kz4wKkOZs=; b=BvW8+Z0jai9f7M /Cm4xjIc2mHiRV55yHoBbh0M2Jqat27bP/IMDIIrWhiMe6EFDZMAQDTtH65DPXCX/7z+/f09uk2TJ u1Pm+v9lZU+toEDV/fzXwp66Mxiz20xBCsbZCTKqwQlPF/m+qqGL11I28F7ActtOEFEKQ0IYAJPjC wL9u1wx9qGTB/nmnWIMtjgAAIH1xHOhI11ciDh5JWw+fKYMEakaD5VmQQbgSc54xz+rDGvsdWAFS9 +2/JIhzmMjTZgs9K/T2sbSZ5OkJka7xWkP3l2J5eKfZ4Ux5xR/M14DG1rT0im4nRSzQYCB0LgfpFC 1tGrihiAuaRQMwZUiv9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1luKdR-00FOiE-Rp; Fri, 18 Jun 2021 19:58:38 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1luKdO-00FOhE-02 for linux-arm-kernel@lists.infradead.org; Fri, 18 Jun 2021 19:58:35 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 62B7D60C3D; Fri, 18 Jun 2021 19:58:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624046313; bh=D7oBl/0a90lKe9pWfqLnpCpCt9G9AbWx/2EijH8CQy4=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=ZFwYmRIs2uRf1tIy8hT6Wi0I+iZUU7Gz+mTMkEZBflk9hqT2FNIz0/3iBhFoj0iYf zFbcLcIY3NG911o6doq5+lh9n4k8TAoWTjKvg7+suYYJ4Z//xJQ7SW/1Q6tZ5oqlqC KRbz/ZENYmXGbxnzQFHAaRU0My3Pe9jLWUrnEsHYt801nl7MUg4TJK/qYoS/6sOOgF RpP2phEll/ZETdKFJS/NSI2oES8OAx6Gar9IN3BHHe3jpi1DaLqPV47F9x/nt6ffIi 44khMWq29Tid3SRb8+DbVNpwVwPkswRfo/BJbyWc3atNlPFDD1wWjPEPAoCIaK5MKa +kN/kviVn/f+w== Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailauth.nyi.internal (Postfix) with ESMTP id 76E9127C0054; Fri, 18 Jun 2021 15:58:31 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute2.internal (MEProxy); Fri, 18 Jun 2021 15:58:31 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeffedgudefiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdet nhguhicunfhuthhomhhirhhskhhifdcuoehluhhtoheskhgvrhhnvghlrdhorhhgqeenuc ggtffrrghtthgvrhhnpedvleehjeejvefhuddtgeegffdtjedtffegveethedvgfejieev ieeufeevuedvteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpegrnhguhidomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudduiedu keehieefvddqvdeifeduieeitdekqdhluhhtoheppehkvghrnhgvlhdrohhrgheslhhinh hugidrlhhuthhordhush X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 8510651C0060; Fri, 18 Jun 2021 15:58:28 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-526-gf020ecf851-fm-20210616.001-gf020ecf8 Mime-Version: 1.0 Message-Id: <1d617df2-57fa-4953-9c75-6de3909a6f14@www.fastmail.com> In-Reply-To: <593983567.12619.1624033908849.JavaMail.zimbra@efficios.com> References: <07a8b963002cb955b7516e61bad19514a3acaa82.1623813516.git.luto@kernel.org> <827549827.10547.1623941277868.JavaMail.zimbra@efficios.com> <26196903-4aee-33c4-bed8-8bf8c7b46793@kernel.org> <593983567.12619.1624033908849.JavaMail.zimbra@efficios.com> Date: Fri, 18 Jun 2021 12:58:07 -0700 From: "Andy Lutomirski" To: "Mathieu Desnoyers" Cc: "the arch/x86 maintainers" , "Dave Hansen" , "Linux Kernel Mailing List" , linux-mm , "Andrew Morton" , "Michael Ellerman" , "Benjamin Herrenschmidt" , "Paul Mackerras" , linuxppc-dev , "Nicholas Piggin" , "Catalin Marinas" , "Will Deacon" , linux-arm-kernel , "Peter Zijlstra (Intel)" , stable Subject: =?UTF-8?Q?Re:_[PATCH_8/8]_membarrier:_Rewrite_sync=5Fcore=5Fbefore=5Fuse?= =?UTF-8?Q?rmode()_and_improve_documentation?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210618_125834_116346_E3545447 X-CRM114-Status: GOOD ( 19.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver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