RE: [PATCH v7] libgfortran: Replace mutex with rwlock

2023-12-09 Thread Zhu, Lipeng
On 2023/12/9 23:23, Jakub Jelinek wrote: > On Sat, Dec 09, 2023 at 10:39:45AM -0500, Lipeng Zhu wrote: > > This patch try to introduce the rwlock and split the read/write to > > unit_root tree and unit_cache with rwlock instead of the mutex to > > increase CPU efficiency. In the get_gfc_unit functi

Re: [PATCH v7] libgfortran: Replace mutex with rwlock

2023-12-09 Thread Jakub Jelinek
On Sat, Dec 09, 2023 at 10:39:45AM -0500, Lipeng Zhu wrote: > This patch try to introduce the rwlock and split the read/write to > unit_root tree and unit_cache with rwlock instead of the mutex to > increase CPU efficiency. In the get_gfc_unit function, the percentage > to step into the insert_unit

[PATCH v7] libgfortran: Replace mutex with rwlock

2023-12-09 Thread Lipeng Zhu
This patch try to introduce the rwlock and split the read/write to unit_root tree and unit_cache with rwlock instead of the mutex to increase CPU efficiency. In the get_gfc_unit function, the percentage to step into the insert_unit function is around 30%, in most instances, we can get the unit in t

Re: [patch] OpenMP/Fortran: Implement omp allocators/allocate for ptr/allocatables

2023-12-09 Thread Jakub Jelinek
On Sat, Dec 09, 2023 at 12:19:10PM +0100, Thomas Schwinge wrote: > > --- a/gcc/omp-builtins.def > > +++ b/gcc/omp-builtins.def > > @@ -467,6 +467,9 @@ DEF_GOMP_BUILTIN > > (BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER, > > DEF_GOMP_BUILTIN (BUILT_IN_GOMP_ALLOC, > > "GOMP_allo

RE: [PATCH v6] libgfortran: Replace mutex with rwlock

2023-12-09 Thread Zhu, Lipeng
On 2023/12/8 18:19, Jakub Jelinek wrote: > On Fri, Aug 18, 2023 at 11:18:19AM +0800, Zhu, Lipeng wrote: > > From: Lipeng Zhu > > > > This patch try to introduce the rwlock and split the read/write to > > unit_root tree and unit_cache with rwlock instead of the mutex to > > increase CPU efficiency.

Re: [patch] OpenMP/Fortran: Implement omp allocators/allocate for ptr/allocatables

2023-12-09 Thread Thomas Schwinge
Hi Tobias! On 2023-11-08T17:58:10+0100, Tobias Burnus wrote: > OpenMP/Fortran: Implement omp allocators/allocate for ptr/allocatables Nice work! > This commit adds -fopenmp-allocators which enables support for > 'omp allocators' and 'omp allocate' that are associated with a Fortran > allocate-s