All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] updates for oprofile
@ 2010-04-23 15:40 Robert Richter
  2010-04-27  9:20 ` Ingo Molnar
  0 siblings, 1 reply; 11+ messages in thread
From: Robert Richter @ 2010-04-23 15:40 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML, oprofile-list

Ingo,

please pull oprofile updates from:

  git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git core

You might want to pull from 'for-next' instead that includes an
additional merge with tip/tracing/core to resolve conflicts with that
branch.

Thanks.

-Robert

--

commit b971f06187d83b5c03d2b597cccdfef421c0ca91
Merge: cb6e943 c1ab9ca
Author: Robert Richter <robert.richter@amd.com>
Date:   Fri Apr 23 16:47:51 2010 +0200

    Merge commit 'tip/tracing/core' into oprofile/core
    
    Conflicts:
        drivers/oprofile/cpu_buffer.c
    
    Signed-off-by: Robert Richter <robert.richter@amd.com>

commit cb6e943ccf19ab6d3189147e9d625a992e016084
Author: Andi Kleen <andi@firstfloor.org>
Date:   Thu Apr 1 03:17:25 2010 +0200

    oprofile: remove double ring buffering
    
    oprofile used a double buffer scheme for its cpu event buffer
    to avoid races on reading with the old locked ring buffer.
    
    But that is obsolete now with the new ring buffer, so simply
    use a single buffer. This greatly simplifies the code and avoids
    a lot of sample drops on large runs, especially with call graph.
    
    Based on suggestions from Steven Rostedt
    
    For stable kernels from v2.6.32, but not earlier.
    
    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: stable <stable@kernel.org>
    Signed-off-by: Robert Richter <robert.richter@amd.com>

commit a36bf32e9e8a86f291f746b7f8292e042ee04a46
Merge: bc078e4 01bf0b6
Author: Robert Richter <robert.richter@amd.com>
Date:   Fri Apr 23 14:30:22 2010 +0200

    Merge commit 'v2.6.34-rc5' into oprofile/core

commit bc078e4eab65f11bbaeed380593ab8151b30d703
Author: Martin Schwidefsky <schwidefsky@de.ibm.com>
Date:   Tue Mar 2 16:01:10 2010 +0100

    oprofile: convert oprofile from timer_hook to hrtimer
    
    Oprofile is currently broken on systems running with NOHZ enabled.
    A maximum of 1 tick is accounted via the timer_hook if a cpu sleeps
    for a longer period of time. This does bad things to the percentages
    in the profiler output. To solve this problem convert oprofile to
    use a restarting hrtimer instead of the timer_hook.
    
    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Signed-off-by: Robert Richter <robert.richter@amd.com>

-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [GIT PULL] updates for oprofile
@ 2010-04-27 15:25 Phil Carmody
  2010-04-27 17:40 ` Robert Richter
  0 siblings, 1 reply; 11+ messages in thread
From: Phil Carmody @ 2010-04-27 15:25 UTC (permalink / raw)
  To: robert.richter, schwidefsky, mingo; +Cc: linux-kernel

Ingo, et al., 

Regarding today's pulled request, containing:

commit bc078e4eab65f11bbaeed380593ab8151b30d703
Author: Martin Schwidefsky <schwidef...@de.ibm.com>
Date:   Tue Mar 2 16:01:10 2010 +0100

    oprofile: convert oprofile from timer_hook to hrtimer
    

Information is a touch scant, as I'm doing the investigation as I
write, but I believe that that patch can cause ooops regressions
via a null-pointer dereference in oprofile_add_sample().

That function declares:
"""
/**
 * Add a sample. This may be called from any context.
 */
void oprofile_add_sample(struct pt_regs * const regs, unsigned long event);
"""

And begins:
"""
void oprofile_add_sample(struct pt_regs * const regs, unsigned long event)
{
        int is_kernel = !user_mode(regs);
"""

Where on at least two major architectures (Arm, x86), user_mode()
unconditionally dereferences its parameter.

Now oprofile_add_sample() is called from this context:
"""
static enum hrtimer_restart oprofile_hrtimer_notify(struct hrtimer *hrtimer)
{
         oprofile_add_sample(get_irq_regs(), 0);
"""

And get_irq_regs() is NULL when not in an IRQ context.

Bang.

An example of this kind of thing kicking in has already been encountered 
last year:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg14069.html
(That thread got a little side-tracked onto OMAP specifics, but the 
original report is topical.)

Now would be a very good time for the "many eyes" principle to kick in.

I'm now looking into workarounds, but nothing that I'd necessarily
want to submit as a real fix.

Phil
cc:'d replies appreciated

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 0/7] updates for oprofile
@ 2010-05-04 10:44 Robert Richter
  2010-05-06 13:03 ` [GIT PULL] " Robert Richter
  0 siblings, 1 reply; 11+ messages in thread
From: Robert Richter @ 2010-05-04 10:44 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML, oprofile-list

This patch set contains updates for oprofile, mainly with some reworks
of x86 code that improves the error handling.

-Robert



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-05-06 14:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-23 15:40 [GIT PULL] updates for oprofile Robert Richter
2010-04-27  9:20 ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2010-04-27 15:25 Phil Carmody
2010-04-27 17:40 ` Robert Richter
2010-04-27 17:47   ` Siarhei Siamashka
2010-04-28 16:59     ` Robert Richter
2010-04-28 17:09       ` Phil Carmody
2010-04-28 21:14         ` Robert Richter
2010-05-03 21:18         ` Robert Richter
2010-05-04 10:44 [PATCH 0/7] " Robert Richter
2010-05-06 13:03 ` [GIT PULL] " Robert Richter
2010-05-06 14:21   ` Ingo Molnar

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.