public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-13] nvptx: update comment re delayed free
@ 2023-09-12 16:12 Andrew Stubbs
  0 siblings, 0 replies; only message in thread
From: Andrew Stubbs @ 2023-09-12 16:12 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ea922f2d6e0c8e454bc503eaf321e534702d7ece

commit ea922f2d6e0c8e454bc503eaf321e534702d7ece
Author: Andrew Stubbs <ams@codesourcery.com>
Date:   Mon Sep 11 17:58:40 2023 +0100

    nvptx: update comment re delayed free
    
    Polling the delayed free is roughly the same as freeing them between
    reverse offload kernels.
    
    libgomp/ChangeLog:
    
            * plugin/plugin-nvptx.c (GOMP_OFFLOAD_run): Update comment.

Diff:
---
 libgomp/plugin/plugin-nvptx.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index 176bb983bdc1..0cf497195151 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -2703,12 +2703,10 @@ GOMP_OFFLOAD_run (int ord, void *tgt_fn, void *tgt_vars, void **args)
 	       a following reverse offload does
 	       'GOMP_OFFLOAD_page_locked_host_alloc', and that then runs the
 	       deferred 'cuMemFreeHost's -- which may dead-lock?!
-	       TODO: This may need more considerations for the case that
-	       different host threads do reverse offload?  We could move
-	       'free_host_blocks' into 'aq' (which is separate per reverse
-	       offload) instead of global, like
-	       'page_locked_host_unregister_blocks', but that doesn't seem the
-	       right thing for OpenACC 'async' generally?  */
+	       Note: even though the reverse offload kernels are now run in
+	       multiple backgroud threads, *this* thread (or one of these
+	       threads, anyway) will live the whole time, so polling
+	       free_host_blocks should be effective.  */
 	    if (!nvptx_run_deferred_page_locked_host_free ())
 	      exit (EXIT_FAILURE);
 	  }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-12 16:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12 16:12 [gcc/devel/omp/gcc-13] nvptx: update comment re delayed free Andrew Stubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).