public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Luke Dalessandro <luked@cs.rochester.edu>
To: gcc@gcc.gnu.org
Subject: extend gthr-posix.h with rwlock
Date: Thu, 05 Jun 2008 18:02:00 -0000	[thread overview]
Message-ID: <48482A0B.4080609@cs.rochester.edu> (raw)

We have code that fails to scale do to the object_mutex lock in 
unwind-dw2-fde.c. This mutex protects two lists local to the file. The primary 
list is used in "read-mostly" mode, with the secondary list used rarely when 
writing needs to happen.

I am trying to change this locking scheme to use a reader/writer lock (I'd 
prefer something even more scalable, like an RCU style algorithm, or seqlock + 
partially visible reader count, but I don't have time at the moment to do 
anything like that).

I've set up forwarding to pthread_rwlock_t and the corresponding functions in 
gthr-posix.h, just following the template of how pthread_mutex_t is linked in.

My problem is that unwind-dw2-fde.c seems to be compiled multiple times during 
a gcc build, and sometimes my additions are found but other times they are 
not. I am rebuilding again (AIX 5.1), and I'll post more information for 
anyone that needs it.

In the meantime, is there a how-to anywhere that describes adding or modifying 
gthr.h models in gcc?

Thanks,
Luke

             reply	other threads:[~2008-06-05 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05 18:02 Luke Dalessandro [this message]
2008-06-05 18:27 ` David Edelsohn
2008-06-05 22:41   ` Luke Dalessandro
2008-06-05 22:59     ` David Edelsohn
2008-06-06  0:05       ` Luke Dalessandro

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=48482A0B.4080609@cs.rochester.edu \
    --to=luked@cs.rochester.edu \
    --cc=gcc@gcc.gnu.org \
    /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).