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

2023-12-06 Thread Zhu, Lipeng
> > [CCing Ian as libgcc maintainer] > > > > On Wed, 1 Nov 2023 10:14:37 + > > "Zhu, Lipeng" wrote: > > > > > > > > > > > > Hi Lipeng, > > > > > > > > > > >>> Sure, as your comments, in the patch V6, I added 3 test > > > > > >>> cases with OpenMP to test different cases in concurrency > respec

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

2023-11-23 Thread Zhu, Lipeng
> [CCing Ian as libgcc maintainer] > > On Wed, 1 Nov 2023 10:14:37 + > "Zhu, Lipeng" wrote: > > > > > > > > > Hi Lipeng, > > > > > > > > >>> Sure, as your comments, in the patch V6, I added 3 test cases > > > > >>> with OpenMP to test different cases in concurrency respectively: > > > > >>>

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

2023-11-02 Thread Bernhard Reutner-Fischer
[CCing Ian as libgcc maintainer] On Wed, 1 Nov 2023 10:14:37 + "Zhu, Lipeng" wrote: > > > > > > Hi Lipeng, > > > > > > >>> Sure, as your comments, in the patch V6, I added 3 test cases with > > > >>> OpenMP to test different cases in concurrency respectively: > > > >>> 1. find and create u

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

2023-11-01 Thread Zhu, Lipeng
> > > > Hi Lipeng, > > > > >>> Sure, as your comments, in the patch V6, I added 3 test cases with > > >>> OpenMP to test different cases in concurrency respectively: > > >>> 1. find and create unit very frequently to stress read lock and write > > >>> lock. > > >>> 2. only access the unit which ex

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

2023-10-23 Thread Zhu, Lipeng
> > Hi Lipeng, > > >>> Sure, as your comments, in the patch V6, I added 3 test cases with > >>> OpenMP to test different cases in concurrency respectively: > >>> 1. find and create unit very frequently to stress read lock and write > >>> lock. > >>> 2. only access the unit which exist in cache t

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

2023-10-22 Thread Thomas Koenig
Hi Lipeng, Sure, as your comments, in the patch V6, I added 3 test cases with OpenMP to test different cases in concurrency respectively: 1. find and create unit very frequently to stress read lock and write lock. 2. only access the unit which exist in cache to stress read lock. 3. access the sa

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

2023-10-22 Thread Zhu, Lipeng
> > > Hi Thomas, > > > > > > > > Hi Lipeng, > > > > > > > May I know any comment or concern on this patch, thanks for your > > > > time > > > > 😄 > > > > > > Thanks for your patience in getting this reviewed. > > > > > > A few remarks / questions. > > > > > > Which strategy is used in this impleme

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

2023-09-14 Thread Zhu, Lipeng via Gcc-patches
> Hi Thomas, > > > > > Hi Lipeng, > > > > > May I know any comment or concern on this patch, thanks for your > > > time > > > 😄 > > > > Thanks for your patience in getting this reviewed. > > > > A few remarks / questions. > > > > Which strategy is used in this implementation, read-preferring or >

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

2023-08-17 Thread Zhu, Lipeng via Gcc-patches
Hi Thomas, > > Hi Lipeng, > > > May I know any comment or concern on this patch, thanks for your time > > 😄 > > Thanks for your patience in getting this reviewed. > > A few remarks / questions. > > Which strategy is used in this implementation, read-preferring or write- > preferring? And if

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

2023-05-25 Thread Zhu, Lipeng via Gcc-patches
On 1/1/1970 8:00 AM, Thomas Koenig wrote: Hi Lipeng, May I know any comment or concern on this patch, thanks for your time :) Thanks for your patience in getting this reviewed. A few remarks / questions. Which strategy is used in this implementation, read-preferring or write-preferring

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

2023-05-24 Thread Thomas Koenig via Gcc-patches
Hi Lipeng, May I know any comment or concern on this patch, thanks for your time 😄 Thanks for your patience in getting this reviewed. A few remarks / questions. Which strategy is used in this implementation, read-preferring or write-preferring? And if read-preferring is used, is there a dan

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

2023-05-22 Thread Zhu, Lipeng via Gcc-patches
On 5/16/2023 3:08 PM, Zhu, Lipeng wrote: On 5/9/2023 10:32 AM, Zhu, Lipeng wrote: On 1/1/1970 8:00 AM, Bernhard Reutner-Fischer wrote: On Mon,  8 May 2023 17:44:43 +0800 Lipeng Zhu wrote: This patch try to introduce the rwlock and split the read/write to unit_root tree and unit_cache

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

2023-05-16 Thread Zhu, Lipeng via Gcc-patches
On 5/9/2023 10:32 AM, Zhu, Lipeng wrote: On 1/1/1970 8:00 AM, Bernhard Reutner-Fischer wrote: On Mon,  8 May 2023 17:44:43 +0800 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

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

2023-05-08 Thread Zhu, Lipeng via Gcc-patches
On 1/1/1970 8:00 AM, Bernhard Reutner-Fischer wrote: On Mon, 8 May 2023 17:44:43 +0800 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 functio

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

2023-05-08 Thread Bernhard Reutner-Fischer via Gcc-patches
On Mon, 8 May 2023 17:44:43 +0800 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 func

[PATCH v4] libgfortran: Replace mutex with rwlock

2023-05-08 Thread Lipeng Zhu via Gcc-patches
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