Sunday, April 4, 2010

linux.kernel - 25 new messages in 14 topics - digest

linux.kernel
http://groups.google.com/group/linux.kernel?hl=en

linux.kernel@googlegroups.com

Today's topics:

* perf updates - 4 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/deea53ae2d2367f5?hl=en
* Swap including order of util.h and string.h of util/string.c - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/76501963ae9fd183?hl=en
* powerpc: use asm-generic/scatterlist.h - 2 messages, 1 author
http://groups.google.com/group/linux.kernel/t/712c7c534d59a9f2?hl=en
* use asm-generic/scatterlist.h on every architecture - 4 messages, 1 author
http://groups.google.com/group/linux.kernel/t/de976874dc076e1a?hl=en
* [PATCH 4/4] Staging: batman-adv: fix whitespace style issues - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/41449291894d0470?hl=en
* mISDN hfcpci.c _and_ several others: module reference count underflow - 1
messages, 1 author
http://groups.google.com/group/linux.kernel/t/2b34ff4e00b41419?hl=en
* lockdep: Make lockstats counting per cpu - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/1693ea93b841fb4e?hl=en
* RFC: Ideal Adaptive Spinning Conditions - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/d38451ead223bfcc?hl=en
* A few questions and issues with dynticks, NOHZ and powertop - 2 messages, 2
authors
http://groups.google.com/group/linux.kernel/t/f6780cc16baed414?hl=en
* Ugly rmap NULL ptr deref oopsie on hibernate (was Linux 2.6.34-rc3) - 2
messages, 2 authors
http://groups.google.com/group/linux.kernel/t/eec470a501781823?hl=en
* fsck more often when powerfail is detected (was Re: wishful thinking about
atomic, multi-sector or full MD stripe width, writes in storage) - 3 messages,
3 authors
http://groups.google.com/group/linux.kernel/t/19b39db58365d3b1?hl=en
* Congratulations... - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/55665ff524e372dc?hl=en
* webcam problem after suspend/hibernate - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/b741125ede6ad072?hl=en
* perf newt: Zoom operations - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/7a915be3e3ab39fb?hl=en

==============================================================================
TOPIC: perf updates
http://groups.google.com/group/linux.kernel/t/deea53ae2d2367f5?hl=en
==============================================================================

== 1 of 4 ==
Date: Sun, Apr 4 2010 7:40 am
From: Frederic Weisbecker


Ingo,

Please pull the perf/core branch that can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
perf/core

Thanks,
Frederic
---

Frederic Weisbecker (2):
perf: Drop the frame reliablity check
perf: Fetch hot regs from the template caller

Arnd Bergmann (1):
perf_event: Make perf fd non seekable

Hitoshi Mitake (1):
Swap inclusion order of util.h and string.h in util/string.c


arch/x86/kernel/cpu/perf_event.c | 3 +--
include/trace/ftrace.h | 23 ++++++++++++-----------
kernel/perf_event.c | 1 +
tools/perf/util/string.c | 2 +-
4 files changed, 15 insertions(+), 14 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


== 2 of 4 ==
Date: Sun, Apr 4 2010 7:40 am
From: Frederic Weisbecker


Trace events can be defined from a template using
DECLARE_EVENT_CLASS/DEFINE_EVENT or directly with TRACE_EVENT.

In both cases we have a template tracepoint handler, used to
record the trace, to which we pass our ftrace event instance.

In the function level, if the class is named "foo" and the event
is named "blah", we have the following chain of calls:

perf_trace_blah() -> perf_trace_templ_foo()

In the case we have several events sharing the class "blah",
we'll have multiple users of perf_trace_templ_foo(), and it
won't be inlined by the compiler. This is usually what happens
with the DECLARE_EVENT_CLASS/DEFINE_EVENT based definition.

But if perf_trace_blah() is the only caller of perf_trace_templ_foo()
there are fair chances that it will be inlined.

The problem is that we fetch the regs from perf_trace_templ_foo()
after we rewinded the frame pointer to the second caller, we want
to reach the caller of perf_trace_blah() to get the right source
of the event. And we do this by always assuming that
perf_trace_templ_foo() is not inlined. But as shown above this
is not always true. And if it is inlined we miss the first caller,
losing the most important level of precision.

We get:
61.31% ls [kernel.kallsyms] [k] do_softirq
|
--- do_softirq
irq_exit
do_IRQ
common_interrupt
|
|--25.00%-- tty_buffer_request_room

Instead of:
61.31% ls [kernel.kallsyms] [k] __do_softirq
|
--- __do_softirq
do_softirq
irq_exit
do_IRQ
common_interrupt
|
|--25.00%-- tty_buffer_request_room

To fix this, we fetch the regs from perf_trace_blah() rather than
perf_trace_templ_foo() so that we don't have to deal with inlining
surprises.

That also bring us the advantage of having the true source of the
event even if we don't have frame pointers.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
---
include/trace/ftrace.h | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index ea6f9d4..882c648 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -758,13 +758,12 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
static notrace void \
perf_trace_templ_##call(struct ftrace_event_call *event_call, \
- proto) \
+ struct pt_regs *__regs, proto) \
{ \
struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
struct ftrace_raw_##call *entry; \
u64 __addr = 0, __count = 1; \
unsigned long irq_flags; \
- struct pt_regs *__regs; \
int __entry_size; \
int __data_size; \
int rctx; \
@@ -785,20 +784,22 @@ perf_trace_templ_##call(struct ftrace_event_call *event_call, \
\
{ assign; } \
\
- __regs = &__get_cpu_var(perf_trace_regs); \
- perf_fetch_caller_regs(__regs, 2); \
- \
perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \
__count, irq_flags, __regs); \
}

#undef DEFINE_EVENT
-#define DEFINE_EVENT(template, call, proto, args) \
-static notrace void perf_trace_##call(proto) \
-{ \
- struct ftrace_event_call *event_call = &event_##call; \
- \
- perf_trace_templ_##template(event_call, args); \
+#define DEFINE_EVENT(template, call, proto, args) \
+static notrace void perf_trace_##call(proto) \
+{ \
+ struct ftrace_event_call *event_call = &event_##call; \
+ struct pt_regs *__regs = &get_cpu_var(perf_trace_regs); \
+ \
+ perf_fetch_caller_regs(__regs, 1); \
+ \
+ perf_trace_templ_##template(event_call, __regs, args); \
+ \
+ put_cpu_var(perf_trace_regs); \
}

#undef DEFINE_EVENT_PRINT
--
1.6.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


== 3 of 4 ==
Date: Sun, Apr 4 2010 7:50 am
From: Frederic Weisbecker


On Sun, Apr 04, 2010 at 04:36:40PM +0200, Frederic Weisbecker wrote:
> Ingo,
>
> Please pull the perf/core branch that can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
> perf/core
>
> Thanks,
> Frederic
> ---
>
> Frederic Weisbecker (2):
> perf: Drop the frame reliablity check
> perf: Fetch hot regs from the template caller
>
> Arnd Bergmann (1):
> perf_event: Make perf fd non seekable
>
> Hitoshi Mitake (1):
> Swap inclusion order of util.h and string.h in util/string.c


I just did a last minute rebase, just to prepend the title of this
one with "perf: "


>
>
> arch/x86/kernel/cpu/perf_event.c | 3 +--
> include/trace/ftrace.h | 23 ++++++++++++-----------
> kernel/perf_event.c | 1 +
> tools/perf/util/string.c | 2 +-
> 4 files changed, 15 insertions(+), 14 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


== 4 of 4 ==
Date: Sun, Apr 4 2010 12:10 pm
From: Ingo Molnar

* Frederic Weisbecker <fweisbec@gmail.com> wrote:

> On Sun, Apr 04, 2010 at 04:36:40PM +0200, Frederic Weisbecker wrote:
> > Ingo,
> >
> > Please pull the perf/core branch that can be found at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
> > perf/core
> >
> > Thanks,
> > Frederic
> > ---
> >
> > Frederic Weisbecker (2):
> > perf: Drop the frame reliablity check
> > perf: Fetch hot regs from the template caller
> >
> > Arnd Bergmann (1):
> > perf_event: Make perf fd non seekable
> >
> > Hitoshi Mitake (1):
> > Swap inclusion order of util.h and string.h in util/string.c
>
>
> I just did a last minute rebase, just to prepend the title of this
> one with "perf: "
>
>
> >
> >
> > arch/x86/kernel/cpu/perf_event.c | 3 +--
> > include/trace/ftrace.h | 23 ++++++++++++-----------
> > kernel/perf_event.c | 1 +
> > tools/perf/util/string.c | 2 +-
> > 4 files changed, 15 insertions(+), 14 deletions(-)

Pulled, thanks a lot Frederic!

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

==============================================================================
TOPIC: Swap including order of util.h and string.h of util/string.c
http://groups.google.com/group/linux.kernel/t/76501963ae9fd183?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Apr 4 2010 7:40 am
From: Frederic Weisbecker


On Sun, Apr 04, 2010 at 05:13:18PM +0900, Hitoshi Mitake wrote:
> Current util/string.c includes headers in this order: string.h, util.h
> But this causes build error because __USE_GNU definition
> is needed for strndup() definition like this,
> % make -j
> touch .perf.dev.null
> CC util/string.o
> cc1: warnings being treated as errors
> util/string.c: In function 'argv_split':
> util/string.c:171: error: implicit declaration of function 'strndup'
> util/string.c:171: error: incompatible implicit declaration of built-in function 'strndup'


Thanks, I've queued it as I have the same problem and I'm
about to send a perf/core queue.

>
> So this patch swaps order of including headers.
> util.h defines _GNU_SOURCE, and /usr/include/features.h defines __USE_GNU as 1
> if _GNU_SOURCE is defined.
>
> Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
> tools/perf/util/string.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c
> index d438924..0409fc7 100644
> --- a/tools/perf/util/string.c
> +++ b/tools/perf/util/string.c
> @@ -1,5 +1,5 @@
> -#include "string.h"
> #include "util.h"
> +#include "string.h"
>
> #define K 1024LL
> /*
> --
> 1.6.5.2
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

==============================================================================
TOPIC: powerpc: use asm-generic/scatterlist.h
http://groups.google.com/group/linux.kernel/t/712c7c534d59a9f2?hl=en
==============================================================================

== 1 of 2 ==
Date: Sun, Apr 4 2010 7:50 am
From: FUJITA Tomonori


Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
---
arch/powerpc/Kconfig | 3 +++
arch/powerpc/include/asm/scatterlist.h | 29 +----------------------------
2 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 669a1b1..0133cf9 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -659,6 +659,9 @@ config ZONE_DMA
config NEED_DMA_MAP_STATE
def_bool (PPC64 || NOT_COHERENT_CACHE)

+config NEED_SG_DMA_LENGTH
+ def_bool y
+
config GENERIC_ISA_DMA
bool
depends on PPC64 || POWER4 || 6xx && !CPM2
diff --git a/arch/powerpc/include/asm/scatterlist.h b/arch/powerpc/include/asm/scatterlist.h
index 912bf59..4ae35da 100644
--- a/arch/powerpc/include/asm/scatterlist.h
+++ b/arch/powerpc/include/asm/scatterlist.h
@@ -9,38 +9,11 @@
* 2 of the License, or (at your option) any later version.
*/

-#ifdef __KERNEL__
-#include <linux/types.h>
#include <asm/dma.h>
-
-struct scatterlist {
-#ifdef CONFIG_DEBUG_SG
- unsigned long sg_magic;
-

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate