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.3 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 F258CC43461 for ; Mon, 14 Sep 2020 07:03:40 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 9D501208DB for ; Mon, 14 Sep 2020 07:03:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a9FM9I/o" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D501208DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kHiWP-0007Z5-IP; Mon, 14 Sep 2020 07:03:29 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kHiWN-0007Yz-Ob for xen-devel@lists.xenproject.org; Mon, 14 Sep 2020 07:03:27 +0000 X-Inumbo-ID: aa37f92d-8e75-4732-aa43-e584abe3a5a8 Received: from mail-wm1-x341.google.com (unknown [2a00:1450:4864:20::341]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id aa37f92d-8e75-4732-aa43-e584abe3a5a8; Mon, 14 Sep 2020 07:03:17 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id y15so10073970wmi.0 for ; Mon, 14 Sep 2020 00:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:content-language :thread-index; bh=S8LVNUrW/wqfH6wn5gRl4ShdNtSTKdik/mZ8bZKLrFA=; b=a9FM9I/o7Kj5bNO+ELlETAVscUdd5nRq3V1pTw6wZWn8yYG3qlMWJDFII0q35NLchI 6TvkxTVVqDsxPm7bDMAUl/gqUJ9Pgju8T8IieoNQCIxYDUZ/inO5+YW3yTUiuw5kf2Jz sByMseYjIRaOK+GA1k6qOS+HJAi4TePTK4IPcCK9DY1+cRNgLN51V8lk2UBhME8f6MuR 6rD7wDffjgCgXKPd+/QVfQbZP/5OHuGovFEQTvIZOGXt9IJnLR5D/1bcPnywkEOyBdxV 4jin8bgK51TWlG4zNWZvhSIaShIvqTtgef9FfmjkNdQGOaW5/+mkLF00F1TTfa7Wlk3Y SdnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:to:cc:references:in-reply-to :subject:date:message-id:mime-version:content-transfer-encoding :content-language:thread-index; bh=S8LVNUrW/wqfH6wn5gRl4ShdNtSTKdik/mZ8bZKLrFA=; b=FSmPW1idSEpHrFGJ0c5jl/V2zDExljZ8xfze3KaAi24tIF8fTf5lvI6BXLVxq8AaGn DgWQEeSN1HspMEAT6qad4YXKzmAZJApsSfh74+dTx96KWhtAaLRrw4e0vrz1eZT8s/t+ 9mwcfhsbVJ3RLtZQ7u4iq9rFMBfIECfTqeTSZeQ2ejvBiuLjKLlpvB6zi3YaWeHyFyKD 8DpACUGGF4PjL0p6YRqN/+tOYqwA3HQ6yJO4C6ndQuctj8yBPVFioQGfN/1HJY9qQW/S rw9GhD1vav4rPRpX0YbJ4hbhgg4NivHdCQ1siuUk32R0Uvu8HEAd5FFD1m4Yg+fQrc5t +kcw== X-Gm-Message-State: AOAM533dFW1vJRXx+Ztj+TdBI5wlGnljL+aVPPpphzGLgwM3RQ/44l4G NpAr3mkNSQxArUgwyHvs1h0= X-Google-Smtp-Source: ABdhPJwZhDVW7uiqtpTgqI/r3sziwH9TeYGhdIi32jyCU9+lJRvenar/6xMej7bw4wS8dUn/JsNnJQ== X-Received: by 2002:a1c:9a57:: with SMTP id c84mr13398442wme.136.1600066996408; Mon, 14 Sep 2020 00:03:16 -0700 (PDT) Received: from CBGR90WXYV0 (host86-176-94-160.range86-176.btcentralplus.com. [86.176.94.160]) by smtp.gmail.com with ESMTPSA id d5sm19989313wrb.28.2020.09.14.00.03.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2020 00:03:15 -0700 (PDT) From: Paul Durrant X-Google-Original-From: "Paul Durrant" To: "'Julien Grall'" , , Cc: =?utf-8?Q?'Roger_Pau_Monn=C3=A9'?= , "'Bertrand Marquis'" References: <1bc70974-2efb-2e73-34bf-bdd3c1d0ef96@xen.org> In-Reply-To: <1bc70974-2efb-2e73-34bf-bdd3c1d0ef96@xen.org> Subject: RE: Adopting the Linux Kernel Memory Model in Xen? Date: Mon, 14 Sep 2020 07:59:37 +0100 Message-ID: <000101d68a64$9c7ba580$d572f080$@xen.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: en-gb Thread-Index: AQJCSvoMa3CM1riyjMgcUs75aGJDUKiQLdJg X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Reply-To: paul@xen.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" > -----Original Message----- > From: Xen-devel On Behalf Of = Julien Grall > Sent: 11 September 2020 17:34 > To: xen-devel@lists.xenproject.org; committers@xenproject.org > Cc: Roger Pau Monn=C3=A9 ; Bertrand Marquis = > Subject: Adopting the Linux Kernel Memory Model in Xen? >=20 > Hi all, >=20 > At the moment, Xen doesn't have a formal memory model. Instead, we are > relying on intuitions. This can lead to heated discussion on what can = a > processor/compiler do or not. >=20 ...which, in turn, may well lead us into decisions that harm = performance. > We also have some helpers that nearly do the same (such as > {read,write}_atomic() vs ACCESS_ONCE()) with no clear understanding > where to use which. >=20 > In the past few years, Linux community spent a lot of time to write = down > their memory model and make the compiler communities aware of it (see > [1], [2]). >=20 > There are a few reasons I can see for adopting LKMM: > - Xen borrows a fair amount of code from Linux; ...and essentially the same toolchain(s) > - There are efforts to standardize it; > - This will allow us to streamline the discussion. >=20 > Any thoughts? >=20 It seems like a very good idea to me. Paul > Cheers, >=20 > [1] https://www.kernel.org/doc/Documentation/memory-barriers.txt > [2] = http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p0124r7.html >=20 >=20 > -- > Julien Grall