From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
LKML <linux-kernel@vger.kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Jason Wessel <jason.wessel@windriver.com>,
Thomas Gleixner <tglx@linutronix.de>,
Prasad <prasad@linux.vnet.ibm.com>,
Will Deacon <will.deacon@arm.com>,
Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH 3/6] x86: Allow the user not to build hw_breakpoints
Date: Thu, 21 Jul 2011 15:03:38 +0200 [thread overview]
Message-ID: <20110721130334.GA16081@somewhere> (raw)
In-Reply-To: <20110721072656.GF9216@elte.hu>
On Thu, Jul 21, 2011 at 09:26:56AM +0200, Ingo Molnar wrote:
>
> * H. Peter Anvin <hpa@zytor.com> wrote:
>
> > On 07/14/2011 08:03 AM, Frederic Weisbecker wrote:
> > > So that hw_breakpoints and perf can be not built on
> > > specific embedded systems.
> >
> > I want to emphasize I am very, very unhappy about this. It should
> > be possible to not build perf while still have breakpoints
> > available... breakpoints are way more important than perf.
>
> What we could indeed do is to separate out a 'core perf' portion that
> is necessary for hw-breakpoints to work fine, thus allowing for
> example the PMU drivers to be disabled.
That would still require a big chunk of perf.
>
> Otherwise we have expressed hw breakpoint APIs via perf events and
> that model is working well. Making hw-breakpoints a separate
> subsystem again with isolated (and partly duplicated) infrastructure
> would be a step back really.
I actually don't think it's working well. What we have with the current
design is the dependency to perf as a big midlayer that is apparently
convenient but actually induce some nasty things.
Just look how we need those ptrace_get_breakpoints() protection to deal
with perf exit path implementation for example. Or the need for archs
to translate arch ptrace breakpoint info into generic perf attrs.
I think we had to try the current design just to see if that could plug
nicely. But now that we have this for several releases, I can only conclude
that we should revert back to the design Prasad proposed, consisting in
having breakpoints a service used by perf but not the opposite.
For ptrace, all it takes is a generic hook in the preempt notifiers to
activate/deactivate breakpoints. I much prefer that to a big dependency
on a perf core midlayer.
next prev parent reply other threads:[~2011-07-21 13:03 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-14 15:03 [GIT PULL] hw_breakpoints updates Frederic Weisbecker
2011-07-14 15:03 ` [PATCH 1/6] hw_breakpoints: Split hardware breakpoints config Frederic Weisbecker
2011-07-14 15:03 ` [PATCH 2/6] hw_breakpoints: Migrate breakpoint conditional build under new config Frederic Weisbecker
2011-07-14 15:03 ` [PATCH 3/6] x86: Allow the user not to build hw_breakpoints Frederic Weisbecker
2011-07-14 21:26 ` H. Peter Anvin
2011-07-14 21:51 ` Frederic Weisbecker
2011-07-21 7:26 ` Ingo Molnar
2011-07-21 12:36 ` Peter Zijlstra
2011-07-21 13:03 ` Frederic Weisbecker [this message]
2011-07-14 15:03 ` [PATCH 4/6] hw_breakpoints: Breakpoints arch ability don't need perf events Frederic Weisbecker
2011-07-14 15:03 ` [PATCH 5/6] hw_breakpoints: Only force perf events if breakpoints are selected Frederic Weisbecker
2011-07-14 15:03 ` [PATCH 6/6] hw_breakpoints: Drop remaining misplaced dependency on perf Frederic Weisbecker
-- strict thread matches above, loose matches on Subject: below --
2011-05-24 21:52 [PATCH v2] hw_breakpoint: Let the user choose not to build it (and perf too) Frederic Weisbecker
2011-05-24 21:52 ` [PATCH 3/6] x86: Allow the user not to build hw_breakpoints Frederic Weisbecker
2011-05-24 21:52 ` Frederic Weisbecker
2011-04-27 16:59 [PATCH 0/6] hw_breakpoint: Let the user choose not to build it (and perf too) Frederic Weisbecker
2011-04-27 16:59 ` [PATCH 3/6] x86: Allow the user not to build hw_breakpoints Frederic Weisbecker
2011-04-27 17:38 ` H. Peter Anvin
2011-04-27 18:26 ` Frederic Weisbecker
2011-04-27 19:10 ` Michael Bohan
[not found] ` <008d59a3-bd23-4cb3-8a73-1640137e3ac4@email.android.com>
2011-04-27 19:50 ` Frederic Weisbecker
2011-05-03 15:35 ` H. Peter Anvin
2011-05-03 23:12 ` Frederic Weisbecker
2011-05-03 23:40 ` H. Peter Anvin
2011-05-03 23:54 ` Frederic Weisbecker
2011-05-03 23:56 ` H. Peter Anvin
2011-05-04 0:13 ` Frederic Weisbecker
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=20110721130334.GA16081@somewhere \
--to=fweisbec@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=jason.wessel@windriver.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=prasad@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.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 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.