From: "Zhu, Lipeng" <lipeng.zhu@intel.com>
To: Thomas Koenig <tkoenig@netcologne.de>,
"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: "Lu, Hongjiu" <hongjiu.lu@intel.com>,
"Li, Tianyou" <tianyou.li@intel.com>,
"Deng, Pan" <pan.deng@intel.com>
Subject: RE: [PATCH v2] libgfortran: Replace mutex with rwlock
Date: Thu, 5 Jan 2023 09:17:01 +0000 [thread overview]
Message-ID: <PH7PR11MB6056CE4DD3A41A31725DAF5F9FFA9@PH7PR11MB6056.namprd11.prod.outlook.com> (raw)
In-Reply-To: <PH7PR11MB6056276756F4F4ABEBC35DA69FF29@PH7PR11MB6056.namprd11.prod.outlook.com>
> > Hi Lipeng,
> >
> > > 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 the phase of reading the
> > > unit_cache or unit_root tree. So split the read/write phase by
> > > rwlock would be an approach to make it more parallel.
> >
> > No comment on the code itself, as yet... but I'd like to know how throroughly you tested it, using which tools, and on which programs.
> > Did you use valgrind --tool=helgrind or --tool=drd? Since it is prone to race conditions, did you also test Fortran's asynchronous I/O?
> >
> > Best regards
> >
> > Thomas
>
> Hi Thomas,
>
> I didn’t use valgrind and make check-fortran succeed in local.
> And the tools/programs I used is pts/neatbench https://openbenchmarking.org/test/pts/neatbench
>
> Best Regards,
> Lipeng Zhu
Hi Thomas,
Thanks for your comments, I just use valgrind --tool=helgrind or --tool=drd to test make check-fortran, no errors occurred.
==2609780== Helgrind, a thread error detector
==2609780== Copyright (C) 2007-2017, and GNU GPL'd, by OpenWorks LLP et al.
==2609780== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==2609780== Command: make check-fortran -j150
==2609780==
==2609780==
==2609780== Use --history-level=approx or =none to gain increased speed, at
==2609780== the cost of reduced accuracy of conflicting-access information
==2609780== For lists of detected and suppressed errors, rerun with: -s
==2609780== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==2976599== drd, a thread error detector
==2976599== Copyright (C) 2006-2020, and GNU GPL'd, by Bart Van Assche.
==2976599== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==2976599== Command: make check-fortran -j150
==2976599==
==2976599==
==2976599== For lists of detected and suppressed errors, rerun with: -s
==2976599== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
BTW, can you give me some guidance of how to test Fortran's asynchronous I/O?
Best Regards,
Lipeng Zhu
prev parent reply other threads:[~2023-01-05 9:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMe9rOoU3ooV5+UoB69WgE8NipeJSWHe52x=-H=a4cSSTaR_Xw () mail ! gmail ! com>
2022-12-30 0:16 ` Lipeng Zhu
2022-12-28 9:24 ` Thomas Koenig
2022-12-28 11:46 ` Zhu, Lipeng
2023-01-05 9:17 ` Zhu, Lipeng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PH7PR11MB6056CE4DD3A41A31725DAF5F9FFA9@PH7PR11MB6056.namprd11.prod.outlook.com \
--to=lipeng.zhu@intel.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=hongjiu.lu@intel.com \
--cc=pan.deng@intel.com \
--cc=tianyou.li@intel.com \
--cc=tkoenig@netcologne.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).