gcc/libgomp/config
Jakub Jelinek 5809be05a2 openmp: Add support for OMP_PLACES=ll_caches
This patch implements support for ll_caches abstract name in OMP_PLACES,
which stands for places where logical cpus in each place share the last
level cache.

This seems to work fine for me on x86 and kernel sources show that it is
in common code, but on some machines on CompileFarm the files I'm using,
i.e.
/sys/devices/system/cpu/cpuN/cache/indexN/level
/sys/devices/system/cpu/cpuN/cache/indexN/shared_cpu_list
don't exist, is that because they have too old kernel and newer kernels
are fine or should I implement some fallback methods (which)?
E.g. on gcc112.fsffrance.org I see just shared_cpu_map and not shared_cpu_list
(with shared_cpu_map being harder to parse) and on another box I didn't even
see the cache subdirectories.

Way to test this is
OMP_PLACES=ll_caches OMP_DISPLAY_ENV=true LD_PRELOAD=.libs/libgomp.so.1 /bin/true
and see what it prints on OMP_PLACES line.

2021-10-15  Jakub Jelinek  <jakub@redhat.com>

	* env.c (parse_places_var): Handle ll_caches as level 4.
	* config/linux/affinity.c (gomp_affinity_find_last_cache_level): New
	function.
	(gomp_affinity_init_level_1): Handle level 4 as logical cpus sharing
	last level cache.
	(gomp_affinity_init_level): Likewise.
	* testsuite/libgomp.c/places-1.c: New test.
	* testsuite/libgomp.c/places-2.c: New test.
	* testsuite/libgomp.c/places-3.c: New test.
	* testsuite/libgomp.c/places-4.c: New test.
2021-10-15 12:06:51 +02:00
..
accel libgomp: Don't access gomp_sem_t as int using atomics unconditionally 2021-01-18 07:18:46 +01:00
bsd Update copyright years. 2021-01-04 10:26:59 +01:00
darwin Update copyright years. 2021-01-04 10:26:59 +01:00
gcn openmp: Implement omp_get_device_num routine 2021-08-05 23:29:03 +08:00
hpux Update copyright years. 2021-01-04 10:26:59 +01:00
linux openmp: Add support for OMP_PLACES=ll_caches 2021-10-15 12:06:51 +02:00
mingw32 Update copyright years. 2021-01-04 10:26:59 +01:00
nvptx Make the OpenMP 'error' directive work for nvptx offloading 2021-08-22 11:08:26 +02:00
posix libgomp: Don't access gomp_sem_t as int using atomics unconditionally 2021-01-18 07:18:46 +01:00
rtems RTEMS: Fix libgomp build 2021-01-18 07:24:56 +01:00
t-aix aix: remove libgomp and libatomic archives before creating FAT archives 2020-10-11 17:30:24 -04:00