From: Ingo Molnar <mingo@kernel.org>
To: namhyung@kernel.org, adrian.hunter@intel.com, acme@redhat.com,
hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de,
dsahern@gmail.com, jolsa@redhat.com
Cc: 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:56:10 +0200 [thread overview]
Message-ID: <20150609095610.GA18359@gmail.com> (raw)
In-Reply-To: <tip-yk1k08etpd2aoe3tnrf0oizn@git.kernel.org>
* 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.
Thanks!
Ingo
next prev parent reply other threads:[~2015-06-09 9:56 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 [this message]
2015-06-09 14:25 ` Arnaldo Carvalho de Melo
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=20150609095610.GA18359@gmail.com \
--to=mingo@kernel.org \
--cc=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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox