From: Ingo Molnar <mingo@elte.hu>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>
Cc: "hpa@zytor.com" <hpa@zytor.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-tip-commits@vger.kernel.org"
<linux-tip-commits@vger.kernel.org>
Subject: Re: [tip:tracing/hw-branch-tracing] tracing/hw-branch-tracing: convert bts-tracer mutex to a spinlock
Date: Wed, 25 Feb 2009 10:58:14 +0100 [thread overview]
Message-ID: <20090225095814.GC12352@elte.hu> (raw)
In-Reply-To: <928CFBE8E7CB0040959E56B4EA41A77E4A4C1EF6@irsmsx504.ger.corp.intel.com>
* Metzger, Markus T <markus.t.metzger@intel.com> wrote:
> > static void trace_bts_prepare(struct trace_iterator *iter)
> > {
> >- mutex_lock(&bts_tracer_mutex);
> >+ spin_lock(&bts_tracer_lock);
> >
> > on_each_cpu(trace_bts_cpu, iter->tr, 1);
> >
> >- mutex_unlock(&bts_tracer_mutex);
> >+ spin_unlock(&bts_tracer_lock);
> > }
>
> Whereas start/stop are relatively fast, the above operation is
> rather expensive. Would it make sense to use
> schedule_on_each_cpu() instead of on_each_cpu()?
it's perfectly fine to do that on_each_cpu() under the spinlock.
schedule_on_each_cpu() would likely be more expensive - and for
no good reason.
Ingo
next prev parent reply other threads:[~2009-02-25 9:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tip-2d542cf34264ac92e9e7ac55c0b096b066d569d2@kernel.org>
2009-02-25 9:51 ` Metzger, Markus T
2009-02-25 9:58 ` Ingo Molnar [this message]
2009-02-25 10:08 ` Metzger, Markus T
2009-02-25 11:11 ` Ingo Molnar
2009-02-25 11:35 ` Metzger, Markus T
2009-02-25 11:45 ` Ingo Molnar
2009-02-25 11:49 ` Metzger, Markus T
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=20090225095814.GC12352@elte.hu \
--to=mingo@elte.hu \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=markus.t.metzger@intel.com \
--cc=mingo@redhat.com \
--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
all inboxes | Powered by JetHome®