public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Koenig <tkoenig@netcologne.de>
To: Lipeng Zhu <lipeng.zhu@intel.com>,
	fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org
Cc: hongjiu.lu@intel.com, tianyou.li@intel.com, pan.deng@intel.com
Subject: Re: [PATCH v2] libgfortran: Replace mutex with rwlock
Date: Wed, 28 Dec 2022 10:24:53 +0100	[thread overview]
Message-ID: <1051672f-91ff-f9f8-50e8-c44df16b2bd8@netcologne.de> (raw)
In-Reply-To: <20221230001607.2232962-1-lipeng.zhu@intel.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

  reply	other threads:[~2022-12-28  9:25 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 [this message]
2022-12-28 11:46     ` Zhu, Lipeng
2023-01-05  9:17       ` Zhu, Lipeng

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=1051672f-91ff-f9f8-50e8-c44df16b2bd8@netcologne.de \
    --to=tkoenig@netcologne.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hongjiu.lu@intel.com \
    --cc=lipeng.zhu@intel.com \
    --cc=pan.deng@intel.com \
    --cc=tianyou.li@intel.com \
    /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).