From: Peter Zijlstra <peterz@infradead.org>
To: Mike Galbraith <efault@gmx.de>
Cc: "Lin Ming" <ming.m.lin@intel.com>,
mingo@elte.hu, tglx@linutronix.de,
linux-kernel <linux-kernel@vger.kernel.org>,
"Zhang, Yanmin" <yanmin_zhang@linux.intel.com>,
"Frédéric Weisbecker" <fweisbec@gmail.com>
Subject: Re: tbench regression with 2.6.33-rc1
Date: Sun, 27 Dec 2009 11:11:02 +0100 [thread overview]
Message-ID: <1261908662.15854.4.camel@laptop> (raw)
In-Reply-To: <1261906883.5451.1.camel@marge.simson.net>
On Sun, 2009-12-27 at 10:41 +0100, Mike Galbraith wrote:
> On Sun, 2009-12-27 at 09:59 +0100, Peter Zijlstra wrote:
> > On Sun, 2009-12-27 at 09:32 +0100, Mike Galbraith wrote:
> > > Perf also isn't free, and in 33, we lost the ability to config it out,
> >
> > Uhm, that's a plain bug, we should be able to build a kernel without
> > perf support, does the hw breakpoint support have an unfortunate select
> > some place or something?
>
> Yeah, it's selected in arch/x86/Kconfig. The kernel won't build without
> it either.
Came from this :/
Any way we can fix this? Frederic/Ingo?
---
commit 99e8c5a3b875a34d894a711c9a3669858d6adf45
Author: Frederic Weisbecker <fweisbec@gmail.com>
Date: Thu Dec 17 01:33:54 2009 +0100
hw-breakpoints: Fix hardware breakpoints -> perf events dependency
The kbuild's select command doesn't propagate through the config
dependencies.
Hence the current rules of hardware breakpoint's config can't
ensure perf can never be disabled under us.
We have:
config X86
selects HAVE_HW_BREAKPOINTS
config HAVE_HW_BREAKPOINTS
select PERF_EVENTS
config PERF_EVENTS
[...]
x86 will select the breakpoints but that won't propagate to perf
events. The user can still disable the latter, but it is
necessary for the breakpoints.
What we need is:
- x86 selects HAVE_HW_BREAKPOINTS and PERF_EVENTS
- HAVE_HW_BREAKPOINTS depends on PERF_EVENTS
so that we ensure PERF_EVENTS is enabled and frozen for x86.
This fixes the following kind of build errors:
In file included from arch/x86/kernel/hw_breakpoint.c:31:
include/linux/hw_breakpoint.h: In function 'hw_breakpoint_addr':
include/linux/hw_breakpoint.h:39: error: 'struct perf_event' has no member named 'attr'
v2: Select also ANON_INODES from x86, required for perf
Reported-by: Cyrill Gorcunov <gorcunov@gmail.com>
Reported-by: Michal Marek <mmarek@suse.cz>
Reported-by: Andrew Randrianasulu <randrik_a@yahoo.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
LKML-Reference: <1261010034-7786-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/Kconfig b/arch/Kconfig
index d828758..9d055b4 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -135,9 +135,7 @@ config HAVE_DEFAULT_NO_SPIN_MUTEXES
config HAVE_HW_BREAKPOINT
bool
- depends on HAVE_PERF_EVENTS
- select ANON_INODES
- select PERF_EVENTS
+ depends on PERF_EVENTS
config HAVE_USER_RETURN_NOTIFIER
bool
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 3b2a5ac..55298e8 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -50,6 +50,8 @@ config X86
select HAVE_KERNEL_BZIP2
select HAVE_KERNEL_LZMA
select HAVE_HW_BREAKPOINT
+ select PERF_EVENTS
+ select ANON_INODES
select HAVE_ARCH_KMEMCHECK
select HAVE_USER_RETURN_NOTIFIER
next prev parent reply other threads:[~2009-12-27 10:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-25 11:11 tbench regression with 2.6.33-rc1 Lin Ming
2009-12-27 8:32 ` Mike Galbraith
2009-12-27 8:59 ` Peter Zijlstra
2009-12-27 9:41 ` Mike Galbraith
2009-12-27 10:11 ` Peter Zijlstra [this message]
2010-01-02 3:56 ` Frederic Weisbecker
2009-12-29 2:09 ` Lin Ming
2009-12-29 5:24 ` Mike Galbraith
2009-12-29 5:19 ` Lin Ming
2009-12-29 5:49 ` Mike Galbraith
2010-01-06 6:01 ` Mike Galbraith
2010-01-06 5:55 ` Lin Ming
2010-01-06 6:52 ` Lin Ming
2010-01-06 7:44 ` Mike Galbraith
2010-01-11 12:08 ` Peter Zijlstra
2010-01-11 16:16 ` Mike Galbraith
2010-01-12 1:09 ` Lin Ming
2010-01-12 2:33 ` Mike Galbraith
2010-01-12 3:13 ` Lin Ming
2010-01-12 4:14 ` Mike Galbraith
2010-01-12 8:54 ` Peter Zijlstra
2010-01-12 9:20 ` Lin Ming
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=1261908662.15854.4.camel@laptop \
--to=peterz@infradead.org \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=yanmin_zhang@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox