From patchwork Fri Mar 24 15:49:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 74615 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp729051vqo; Fri, 24 Mar 2023 08:56:16 -0700 (PDT) X-Google-Smtp-Source: AKy350ZButoLWBuIPKbSCpP5U18UUOBr/DY0y+v8JY5ZMJlYzRbSozf0rKBdDRvXGkrjV0Zj6VNG X-Received: by 2002:aa7:cc04:0:b0:4fd:2a29:ceac with SMTP id q4-20020aa7cc04000000b004fd2a29ceacmr3344751edt.14.1679673375904; Fri, 24 Mar 2023 08:56:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679673375; cv=none; d=google.com; s=arc-20160816; b=FTNWKf3WpAAujm/wtqX5rKrV0uL9kj3ENn8D9MQbGD75Clyy9stumioU9Ig2Xczd+4 Gis+1rPdS+ag4ec+MEUO96bmzquRkLOj1zUvGn0USBeg0dmWoeB0+bw6InT1y7iNEcha 1VpGGazg0O/C37YqJ7O3OOSZsoJJBmFAQveICnPzZEiw3JibW+vuVGUemhcFUKYObV3D YMGKKKbwGF5lQ9UdSHtIhTY/Sh6dqYli1p3x/HBN1kwi57odSGRZm3ayVJSyMb+nNBmF GC3OUuqTt2wQUGeXiu9/jtcksiio0d4hTvtGsVpPqM7klCjupH5hgKz43u/mzu4gzerD SmhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:references:subject:to:from:ironport-sdr:dmarc-filter :delivered-to; bh=d93oslENdm0CBlFwvunftsepm/92WU81BLrYU4Ht8mo=; b=cWJpdWvha7EQ9ZUY691TLzCwHBwQBrF41l1QzoNtIx8oX369OAkfajqQ4FO/YtMjbc 6ARvC/VxYT2gHZ/zCiH1VQkmsPJKYNbTOqDpGqiOo8s7tqMAORVU0rsS2/3NaHTOQ+0/ 5JnnUF2Pxym6KuBi8nPY/ySbUFV4IVZ04Gfu3P95G4TSQfQiS2azYjfq6CW7eoOXmyfz U3fv0Dz0nzZFSSUBbNsUvb+nRoVmsB5PLsby+gKLYmBu/H5MkM2WfAs5jzw8SNYUx30Z UTag3axNV/0p9Sm+BLW2oBZxfe1ppmq6ZIxNFMKWLg4BC+H9wIFCk+9/InqocW+Tgbhu PJwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id p7-20020aa7d307000000b004fb9900e237si20705049edq.255.2023.03.24.08.56.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 08:56:15 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BE12438708B9 for ; Fri, 24 Mar 2023 15:53:24 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 3CB66384D1B0 for ; Fri, 24 Mar 2023 15:51:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3CB66384D1B0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.98,288,1673942400"; d="scan'208,223";a="276767" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 24 Mar 2023 07:49:59 -0800 IronPort-SDR: xqX3CSbnc7ThOnct7nKVDecNzFPCwtHWtDVG8iYqvHr+geYJWfFX3QfO4oMDy4bzIezldKp6sk nvKo2yIYBMNTkA2DxHpRAEqCZ3KMdUGpJlZHCQFN7NlFCJRCVr/MiaqX+2IgzCl0g/SfGeV1kM Zo9WjhEW0KauT92P0hz9ff1nfc7nLuygq4Y4dcRukc9RDotui4N14t7gwovIC9IiwUl/GW2w1Z fcrcThRIvi9T4Kv5hUuqY58yP9C+v0rgWj+QJ1ytYNZjzqRceEDNWjoEreGkjlYLFYq6mzF3wY LMQ= From: Thomas Schwinge To: , Andrew Stubbs , "Tobias Burnus" Subject: [og12] libgomp: Document OpenMP 'pinned' memory (was: [PATCH] libgomp, openmp: pinned memory References: User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Fri, 24 Mar 2023 16:49:53 +0100 Message-ID: <87bkki9mji.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761265189794163381?= X-GMAIL-MSGID: =?utf-8?q?1761265189794163381?= Hi! On 2022-01-04T15:32:17+0000, Andrew Stubbs wrote: > This patch implements the OpenMP pinned memory trait [...] I figure it may be helpful to document the current og12 state of affairs; does the attached "libgomp: Document OpenMP 'pinned' memory" look good to you? Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From 35ac1fb2d37f6c33a69f85ca8bac6f6a7bd7d837 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 24 Mar 2023 15:14:57 +0100 Subject: [PATCH] libgomp: Document OpenMP 'pinned' memory libgomp/ * libgomp.texi (AMD Radeon, nvptx): Document OpenMP 'pinned' memory. --- libgomp/libgomp.texi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi index 288e0b3a8ea..1cfae0cb8d1 100644 --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -4456,6 +4456,9 @@ The implementation remark: @item OpenMP code that has a requires directive with @code{unified_address} or @code{unified_shared_memory} will remove any GCN device from the list of available devices (``host fallback''). +@item OpenMP @emph{pinned} memory (@code{omp_atk_pinned}, + @code{ompx_pinned_mem_alloc}, for example) is allocated not via + the device, but via @code{mmap}, @code{mlock}. @end itemize @@ -4518,6 +4521,10 @@ The implementation remark: @item OpenMP code that has a requires directive with @code{unified_address} or @code{unified_shared_memory} will remove any nvptx device from the list of available devices (``host fallback''). +@item OpenMP @emph{pinned} memory (@code{omp_atk_pinned}, + @code{ompx_pinned_mem_alloc}, for example) is allocated via the + device, thus helping lower-overhead host <-> device data + transfers. @end itemize -- 2.25.1