This is an updated version of the v5 patchset I posted last year. Compared to that version, patches 1 & 2 were already committed, and patches 3 & 4 have been dropped (apparently they were causing friction), so this series is an updated version of patches 5 & 6.
First, we add an implementation of pinned memory using Cuda, if present. This patch was previously approved, but could not be committed due to dependencies on the other patches in the series (mostly textual). These dependencies have now been removed, so the patch should be unblocked. Previous patch: https://patchwork.sourceware.org/project/gcc/patch/[email protected]/ Second, we add a custom allocator to allieviate the problem where very few pinned memory allocations are permitted. This patch has likewise had the dependencies removed. It has also had the "usmpin" name replaced; the old name referenced my intention to reuse the code in future patches to improve the "Unified Shared Memory" features, but we're now leaning toward naming those features "Managed Memory", so the name needed to change. The choice of "simple" differentiates it from the "basic" allocator that already exists, without promising to be an all-singing, all-dancing malloc equivalent. Previous patch: https://patchwork.sourceware.org/project/gcc/patch/[email protected]/ Andrew Stubbs (2): libgomp, nvptx: Cuda pinned memory libgomp: fine-grained pinned memory allocator libgomp/Makefile.am | 4 +- libgomp/Makefile.in | 13 +- libgomp/basic-allocator.c | 5 + libgomp/config/linux/allocator.c | 187 ++++++++--- libgomp/libgomp-plugin.h | 2 + libgomp/libgomp.h | 15 + libgomp/libgomp.texi | 17 +- libgomp/libgomp_g.h | 1 + libgomp/plugin/plugin-nvptx.c | 42 +++ libgomp/simple-allocator.c | 323 +++++++++++++++++++ libgomp/target.c | 136 ++++++++ libgomp/testsuite/libgomp.c/alloc-pinned-1.c | 26 ++ libgomp/testsuite/libgomp.c/alloc-pinned-2.c | 26 ++ libgomp/testsuite/libgomp.c/alloc-pinned-3.c | 45 ++- libgomp/testsuite/libgomp.c/alloc-pinned-4.c | 44 ++- libgomp/testsuite/libgomp.c/alloc-pinned-5.c | 26 ++ libgomp/testsuite/libgomp.c/alloc-pinned-6.c | 34 +- libgomp/testsuite/libgomp.c/alloc-pinned-8.c | 122 +++++++ 18 files changed, 1004 insertions(+), 64 deletions(-) create mode 100644 libgomp/simple-allocator.c create mode 100644 libgomp/testsuite/libgomp.c/alloc-pinned-8.c -- 2.51.0
