From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: namhyung@kernel.org, adrian.hunter@intel.com, hpa@zytor.com,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
dsahern@gmail.com, jolsa@redhat.com,
linux-tip-commits@vger.kernel.org
Subject: Re: [tip:perf/core] perf tools: Protect accesses the dso rbtrees/ lists with a rw lock
Date: Tue, 9 Jun 2015 11:25:15 -0300 [thread overview]
Message-ID: <20150609142515.GD2195@redhat.com> (raw)
In-Reply-To: <20150609095610.GA18359@gmail.com>
Em Tue, Jun 09, 2015 at 11:56:10AM +0200, Ingo Molnar escreveu:
> * tip-bot for Arnaldo Carvalho de Melo <tipbot@zytor.com> wrote:
> > +void dsos__add(struct dsos *dsos, struct dso *dso)
> > +{
> > + pthread_rwlock_wrlock(&dsos->lock);
> > + __dsos__add(dsos, dso);
> > + pthread_rwlock_unlock(&dsos->lock);
> > }
>
> Please introduce wrappers and use the kernel API names:
> read_lock()/read_unlock()/etc. (and name the mutex primitives
> mutex_lock()/unlock())
>
> That way kernel developers will find their way around the perf locking details
> easily, and we can also use liblockdep to check locking correctness.
Yeah, we discussed about that, will do it eventually, you said this was
already present in some tools/ code, but I couldn't find it:
[acme@zoo linux]$ find tools/ -type f | xargs grep '\<mutex_unlock'
[acme@zoo linux]$
Anyway, worthy goal, will do.
- Arnaldo
next prev parent reply other threads:[~2015-06-09 14:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 9:53 [tip:perf/core] perf tools: Protect accesses the dso rbtrees/ lists with a rw lock tip-bot for Arnaldo Carvalho de Melo
2015-06-09 9:56 ` Ingo Molnar
2015-06-09 14:25 ` Arnaldo Carvalho de Melo [this message]
2015-06-10 7:04 ` Ingo Molnar
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=20150609142515.GD2195@redhat.com \
--to=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.