13 Jan, 2012

3 commits

  • Move CMPXCHG_DOUBLE and rename it to HAVE_CMPXCHG_DOUBLE so architectures
    can simply select the option if it is supported.

    Signed-off-by: Heiko Carstens
    Acked-by: Christoph Lameter
    Cc: Pekka Enberg
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • Move CMPXCHG_LOCAL and rename it to HAVE_CMPXCHG_LOCAL so architectures
    can simply select the option if it is supported.

    Signed-off-by: Heiko Carstens
    Acked-by: Christoph Lameter
    Cc: Pekka Enberg
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • While implementing cmpxchg_double() on s390 I realized that we don't set
    CONFIG_CMPXCHG_LOCAL despite the fact that we have support for it.

    However setting that option will increase the size of struct page by
    eight bytes on 64 bit, which we certainly do not want. Also, it doesn't
    make sense that a present cpu feature should increase the size of struct
    page.

    Besides that it looks like the dependency to CMPXCHG_LOCAL is wrong and
    that it should depend on CMPXCHG_DOUBLE instead.

    This patch:

    If an architecture supports CMPXCHG_LOCAL this shouldn't result
    automatically in larger struct pages if the SLUB allocator is used.
    Instead introduce a new config option "HAVE_ALIGNED_STRUCT_PAGE" which
    can be selected if a double word aligned struct page is required. Also
    update x86 Kconfig so that it should work as before.

    Signed-off-by: Heiko Carstens
    Acked-by: Christoph Lameter
    Cc: Pekka Enberg
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     

04 Nov, 2011

1 commit

  • The legacy x86 nmi watchdog code was removed with the implementation
    of the perf based nmi watchdog. This broke Oprofile's nmi timer
    mode. To run nmi timer mode we relied on a continuous ticking nmi
    source which the nmi watchdog provided. The nmi tick was no longer
    available and current watchdog can not be used anymore since it runs
    with very long periods in the range of seconds. This patch
    reimplements the nmi timer mode using a perf counter nmi source.

    V2:
    * removing pr_info()
    * fix undefined reference to `__udivdi3' for 32 bit build
    * fix section mismatch of .cpuinit.data:nmi_timer_cpu_nb
    * removed nmi timer setup in arch/x86
    * implemented function stubs for op_nmi_init/exit()
    * made code more readable in oprofile_init()

    V3:
    * fix architectural initialization in oprofile_init()
    * fix CONFIG_OPROFILE_NMI_TIMER dependencies

    Acked-by: Peter Zijlstra
    Signed-off-by: Robert Richter

    Robert Richter
     

03 Aug, 2011

1 commit

  • cmpxchg() is widely used by lockless code, including NMI-safe lockless
    code. But on some architectures, the cmpxchg() implementation is not
    NMI-safe, on these architectures the lockless code may need a
    spin_trylock_irqsave() based implementation.

    This patch adds a Kconfig option: ARCH_HAVE_NMI_SAFE_CMPXCHG, so that
    NMI-safe lockless code can depend on it or provide different
    implementation according to it.

    On many architectures, cmpxchg is only NMI-safe for several specific
    operand sizes. So, ARCH_HAVE_NMI_SAFE_CMPXCHG define in this patch
    only guarantees cmpxchg is NMI-safe for sizeof(unsigned long).

    Signed-off-by: Huang Ying
    Acked-by: Mike Frysinger
    Acked-by: Paul Mundt
    Acked-by: Hans-Christian Egtvedt
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Chris Metcalf
    Acked-by: Richard Henderson
    CC: Mikael Starvik
    Acked-by: David Howells
    CC: Yoshinori Sato
    CC: Tony Luck
    CC: Hirokazu Takata
    CC: Geert Uytterhoeven
    CC: Michal Simek
    Acked-by: Ralf Baechle
    CC: Kyle McMartin
    CC: Martin Schwidefsky
    CC: Chen Liqin
    CC: "David S. Miller"
    CC: Ingo Molnar
    CC: Chris Zankel
    Signed-off-by: Len Brown

    Huang Ying
     

25 May, 2011

1 commit

  • In case other architectures require RCU freed page-tables to implement
    gup_fast() and software filled hashes and similar things, provide the
    means to do so by moving the logic into generic code.

    Signed-off-by: Peter Zijlstra
    Requested-by: David Miller
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Russell King
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Tony Luck
    Cc: KAMEZAWA Hiroyuki
    Cc: Hugh Dickins
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Nick Piggin
    Cc: Namhyung Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

10 Apr, 2011

1 commit


26 Nov, 2010

1 commit

  • The spinning mutex implementation uses cpu_relax() in busy loops as a
    compiler barrier. Depending on the architecture, cpu_relax() may do more
    than needed in this specific mutex spin loops. On System z we also give
    up the time slice of the virtual cpu in cpu_relax(), which prevents
    effective spinning on the mutex.

    This patch replaces cpu_relax() in the spinning mutex code with
    arch_mutex_cpu_relax(), which can be defined by each architecture that
    selects HAVE_ARCH_MUTEX_CPU_RELAX. The default is still cpu_relax(), so
    this patch should not affect other architectures than System z for now.

    Signed-off-by: Gerald Schaefer
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Gerald Schaefer
     

30 Oct, 2010

1 commit

  • On i386 (not x86_64) early implementations of gcc would have a bug
    with asm goto causing it to produce code like the following:

    (This was noticed by Peter Zijlstra)

    56 pushl 0
    67 nopl jmp 0x6f
    popl
    jmp 0x8c

    6f mov
    test
    je 0x8c

    8c mov
    call *(%esp)

    The jump added in the asm goto skipped over the popl that matched
    the pushl 0, which lead up to a quick crash of the system when
    the jump was enabled. The nopl is defined in the asm goto () statement
    and when tracepoints are enabled, the nop changes to a jump to the label
    that was specified by the asm goto. asm goto is suppose to tell gcc that
    the code in the asm might jump to an external label. Here gcc obviously
    fails to make that work.

    The bug report for gcc is here:

    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46226

    The bug only appears on x86 when not compiled with
    -maccumulate-outgoing-args. This option is always set on x86_64 and it
    is also the work around for a function graph tracer i386 bug.
    (See commit: 746357d6a526d6da9d89a2ec645b28406e959c2e)
    This explains why the bug only showed up on i386 when function graph
    tracer was not enabled.

    This patch now adds a CONFIG_JUMP_LABEL option that is default
    off instead of using jump labels by default. When jump labels are
    enabled, the -maccumulate-outgoing-args will be used (causing a
    slightly larger kernel image on i386). This option will exist
    until we have a way to detect if the gcc compiler in use is safe
    to use on all configurations without the work around.

    Note, there exists such a test, but for now we will keep the enabling
    of jump label as a manual option.

    Archs that know the compiler is safe with asm goto, may choose to
    select JUMP_LABEL and enable it by default.

    Reported-by: Ingo Molnar
    Cause-discovered-by: Peter Zijlstra
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Jason Baron
    Cc: H. Peter Anvin
    Cc: David Daney
    Cc: Mathieu Desnoyers
    Cc: Masami Hiramatsu
    Cc: David Miller
    Cc: Richard Henderson
    LKML-Reference:
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

24 Sep, 2010

1 commit


23 Sep, 2010

1 commit

  • base patch to implement 'jump labeling'. Based on a new 'asm goto' inline
    assembly gcc mechanism, we can now branch to labels from an 'asm goto'
    statment. This allows us to create a 'no-op' fastpath, which can subsequently
    be patched with a jump to the slowpath code. This is useful for code which
    might be rarely used, but which we'd like to be able to call, if needed.
    Tracepoints are the current usecase that these are being implemented for.

    Acked-by: David S. Miller
    Signed-off-by: Jason Baron
    LKML-Reference:

    [ cleaned up some formating ]

    Signed-off-by: Steven Rostedt

    Jason Baron
     

14 Sep, 2010

1 commit

  • Fix Kconfig dependency among Kprobes, optprobe and kallsyms.

    Kprobes uses kallsyms_lookup for finding target function and
    checking instruction boundary, thus CONFIG_KPROBES should select
    CONFIG_KALLSYMS.

    Optprobe is an optional feature which is supported on x86 arch,
    and it also uses kallsyms_lookup for checking instructions in
    the target function. Since KALLSYMS_ALL just adds symbols of
    kernel variables, it doesn't need to select KALLSYMS_ALL.

    Signed-off-by: Masami Hiramatsu
    Acked-by: Randy Dunlap ,
    Cc: Ananth N Mavinakayanahalli
    Cc: Felipe Contreras
    Cc: Randy Dunlap
    Cc: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Cc: David S. Miller
    Cc: akpm
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     

05 Aug, 2010

1 commit


16 May, 2010

2 commits

  • This new config is deemed to simplify even more the lockup detector
    dependencies and can make it easier to bring a smooth sorting
    between archs that support the new generic lockup detector and those
    that still have their own, especially for those that are in the
    middle of this migration.

    Instead of checking whether we have CONFIG_LOCKUP_DETECTOR +
    CONFIG_PERF_EVENTS_NMI each time an arch wants to know if it needs
    to build its own lockup detector, take a shortcut with this new
    config. It is enabled only if the hardlockup detection part of
    the whole lockup detector is on.

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Don Zickus
    Cc: Cyrill Gorcunov

    Frederic Weisbecker
     
  • CONFIG_PERF_EVENT_NMI is something that need to be enabled from the
    arch. This is fine on x86 as PERF_EVENTS is builtin but if other
    archs select it, they will need to handle the PERF_EVENTS dependency.

    Instead, handle the dependency in the generic layer:

    - archs need to tell what they support through HAVE_PERF_EVENTS_NMI
    - Enable magically PERF_EVENTS_NMI if we have PERF_EVENTS and
    HAVE_PERF_EVENTS_NMI.

    Signed-off-by: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Don Zickus
    Cc: Cyrill Gorcunov

    Frederic Weisbecker
     

01 May, 2010

1 commit

  • There are two outstanding fashions for archs to implement hardware
    breakpoints.

    The first is to separate breakpoint address pattern definition
    space between data and instruction breakpoints. We then have
    typically distinct instruction address breakpoint registers
    and data address breakpoint registers, delivered with
    separate control registers for data and instruction breakpoints
    as well. This is the case of PowerPc and ARM for example.

    The second consists in having merged breakpoint address space
    definition between data and instruction breakpoint. Address
    registers can host either instruction or data address and
    the access mode for the breakpoint is defined in a control
    register. This is the case of x86 and Super H.

    This patch adds a new CONFIG_HAVE_MIXED_BREAKPOINTS_REGS config
    that archs can select if they belong to the second case. Those
    will have their slot allocation merged for instructions and
    data breakpoints.

    The others will have a separate slot tracking between data and
    instruction breakpoints.

    Signed-off-by: Frederic Weisbecker
    Acked-by: Paul Mundt
    Cc: Will Deacon
    Cc: Mahesh Salgaonkar
    Cc: K. Prasad
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Ingo Molnar

    Frederic Weisbecker
     

16 Mar, 2010

1 commit

  • Hide CONFIG_OPTPROBES and set if the arch supports optimized
    kprobes (IOW, HAVE_OPTPROBES=y), since this option doesn't
    change the major behavior of kprobes, and workarounds for minor
    changes are documented.

    Signed-off-by: Masami Hiramatsu
    Cc: systemtap
    Cc: DLE
    Cc: Dieter Ries
    Cc: Ananth N Mavinakayanahalli
    Cc: OGAWA Hirofumi
    Cc: Peter Zijlstra
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     

06 Mar, 2010

1 commit

  • …nel/git/tip/linux-2.6-tip

    * 'perf-probes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Issue at least one memory barrier in stop_machine_text_poke()
    perf probe: Correct probe syntax on command line help
    perf probe: Add lazy line matching support
    perf probe: Show more lines after last line
    perf probe: Check function address range strictly in line finder
    perf probe: Use libdw callback routines
    perf probe: Use elfutils-libdw for analyzing debuginfo
    perf probe: Rename probe finder functions
    perf probe: Fix bugs in line range finder
    perf probe: Update perf probe document
    perf probe: Do not show --line option without dwarf support
    kprobes: Add documents of jump optimization
    kprobes/x86: Support kprobes jump optimization on x86
    x86: Add text_poke_smp for SMP cross modifying code
    kprobes/x86: Cleanup save/restore registers
    kprobes/x86: Boost probes when reentering
    kprobes: Jump optimization sysctl interface
    kprobes: Introduce kprobes jump optimization
    kprobes: Introduce generic insn_slot framework
    kprobes/x86: Cleanup RELATIVEJUMP_INSTRUCTION to RELATIVEJUMP_OPCODE

    Linus Torvalds
     

01 Mar, 2010

1 commit

  • …el/git/tip/linux-2.6-tip

    * 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (28 commits)
    ftrace: Add function names to dangling } in function graph tracer
    tracing: Simplify memory recycle of trace_define_field
    tracing: Remove unnecessary variable in print_graph_return
    tracing: Fix typo of info text in trace_kprobe.c
    tracing: Fix typo in prof_sysexit_enable()
    tracing: Remove CONFIG_TRACE_POWER from kernel config
    tracing: Fix ftrace_event_call alignment for use with gcc 4.5
    ftrace: Remove memory barriers from NMI code when not needed
    tracing/kprobes: Add short documentation for HAVE_REGS_AND_STACK_ACCESS_API
    s390: Add pt_regs register and stack access API
    tracing/kprobes: Make Kconfig dependencies generic
    tracing: Unify arch_syscall_addr() implementations
    tracing: Add notrace to TRACE_EVENT implementation functions
    ftrace: Allow to remove a single function from function graph filter
    tracing: Add correct/incorrect to sort keys for branch annotation output
    tracing: Simplify test for function_graph tracing start point
    tracing: Drop the tr check from the graph tracing path
    tracing: Add stack dump to trace_printk if stacktrace option is set
    tracing: Use appropriate perl constructs in recordmcount.pl
    tracing: optimize recordmcount.pl for offsets-handling
    ...

    Linus Torvalds
     

26 Feb, 2010

4 commits

  • OProfile support for IBS is now for several versions in the
    kernel. The feature is stable now and the code can be activated
    permanently.

    As a side effect IBS now works also on nosmp configs.

    Signed-off-by: Robert Richter

    Robert Richter
     
  • OProfile is already used for a long time and no longer experimental.

    Signed-off-by: Robert Richter

    Robert Richter
     
  • The commit

    1155de4 ring-buffer: Make it generally available

    already made ring-buffer available without the TRACING option
    enabled. This patch removes the TRACING dependency from oprofile.

    Fixes also oprofile configuration on ia64.

    The patch also applies to the 2.6.32-stable kernel.

    Reported-by: Tony Jones
    Cc: stable@kernel.org
    Signed-off-by: Robert Richter

    Robert Richter
     
  • Introduce kprobes jump optimization arch-independent parts.
    Kprobes uses breakpoint instruction for interrupting execution
    flow, on some architectures, it can be replaced by a jump
    instruction and interruption emulation code. This gains kprobs'
    performance drastically.

    To enable this feature, set CONFIG_OPTPROBES=y (default y if the
    arch supports OPTPROBE).

    Changes in v9:
    - Fix a bug to optimize probe when enabling.
    - Check nearby probes can be optimize/unoptimize when disarming/arming
    kprobes, instead of registering/unregistering. This will help
    kprobe-tracer because most of probes on it are usually disabled.

    Changes in v6:
    - Cleanup coding style for readability.
    - Add comments around get/put_online_cpus().

    Changes in v5:
    - Use get_online_cpus()/put_online_cpus() for avoiding text_mutex
    deadlock.

    Signed-off-by: Masami Hiramatsu
    Cc: systemtap
    Cc: DLE
    Cc: Ananth N Mavinakayanahalli
    Cc: Jim Keniston
    Cc: Srikar Dronamraju
    Cc: Christoph Hellwig
    Cc: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Anders Kaseorg
    Cc: Tim Abbott
    Cc: Andi Kleen
    Cc: Jason Baron
    Cc: Mathieu Desnoyers
    Cc: Frederic Weisbecker
    Cc: Ananth N Mavinakayanahalli
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     

23 Feb, 2010

1 commit


17 Feb, 2010

1 commit

  • KPROBES_EVENT actually depends on the regs and stack access API
    (b1cf540f) and not on x86.
    So introduce a new config option which architectures can select if
    they have the API implemented and switch x86.

    Signed-off-by: Heiko Carstens
    Acked-by: Masami Hiramatsu
    Cc: Ingo Molnar
    Cc: Martin Schwidefsky
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker

    Heiko Carstens
     

18 Dec, 2009

1 commit

  • 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
    Reported-by: Michal Marek
    Reported-by: Andrew Randrianasulu
    Signed-off-by: Frederic Weisbecker
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Paul Mackerras
    Cc: Randy Dunlap
    Cc: K.Prasad
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

09 Dec, 2009

1 commit

  • * 'kvm-updates/2.6.33' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (84 commits)
    KVM: VMX: Fix comparison of guest efer with stale host value
    KVM: s390: Fix prefix register checking in arch/s390/kvm/sigp.c
    KVM: Drop user return notifier when disabling virtualization on a cpu
    KVM: VMX: Disable unrestricted guest when EPT disabled
    KVM: x86 emulator: limit instructions to 15 bytes
    KVM: s390: Make psw available on all exits, not just a subset
    KVM: x86: Add KVM_GET/SET_VCPU_EVENTS
    KVM: VMX: Report unexpected simultaneous exceptions as internal errors
    KVM: Allow internal errors reported to userspace to carry extra data
    KVM: Reorder IOCTLs in main kvm.h
    KVM: x86: Polish exception injection via KVM_SET_GUEST_DEBUG
    KVM: only clear irq_source_id if irqchip is present
    KVM: x86: disallow KVM_{SET,GET}_LAPIC without allocated in-kernel lapic
    KVM: x86: disallow multiple KVM_CREATE_IRQCHIP
    KVM: VMX: Remove vmx->msr_offset_efer
    KVM: MMU: update invlpg handler comment
    KVM: VMX: move CR3/PDPTR update to vmx_set_cr3
    KVM: remove duplicated task_switch check
    KVM: powerpc: Fix BUILD_BUG_ON condition
    KVM: VMX: Use shared msr infrastructure
    ...

    Trivial conflicts due to new Kconfig options in arch/Kconfig and kernel/Makefile

    Linus Torvalds
     

08 Nov, 2009

1 commit

  • This patch rebase the implementation of the breakpoints API on top of
    perf events instances.

    Each breakpoints are now perf events that handle the
    register scheduling, thread/cpu attachment, etc..

    The new layering is now made as follows:

    ptrace kgdb ftrace perf syscall
    \ | / /
    \ | / /
    /
    Core breakpoint API /
    /
    | /
    | /

    Breakpoints perf events

    |
    |

    Breakpoints PMU ---- Debug Register constraints handling
    (Part of core breakpoint API)
    |
    |

    Hardware debug registers

    Reasons of this rewrite:

    - Use the centralized/optimized pmu registers scheduling,
    implying an easier arch integration
    - More powerful register handling: perf attributes (pinned/flexible
    events, exclusive/non-exclusive, tunable period, etc...)

    Impact:

    - New perf ABI: the hardware breakpoints counters
    - Ptrace breakpoints setting remains tricky and still needs some per
    thread breakpoints references.

    Todo (in the order):

    - Support breakpoints perf counter events for perf tools (ie: implement
    perf_bpcounter_event())
    - Support from perf tools

    Changes in v2:

    - Follow the perf "event " rename
    - The ptrace regression have been fixed (ptrace breakpoint perf events
    weren't released when a task ended)
    - Drop the struct hw_breakpoint and store generic fields in
    perf_event_attr.
    - Separate core and arch specific headers, drop
    asm-generic/hw_breakpoint.h and create linux/hw_breakpoint.h
    - Use new generic len/type for breakpoint
    - Handle off case: when breakpoints api is not supported by an arch

    Changes in v3:

    - Fix broken CONFIG_KVM, we need to propagate the breakpoint api
    changes to kvm when we exit the guest and restore the bp registers
    to the host.

    Changes in v4:

    - Drop the hw_breakpoint_restore() stub as it is only used by KVM
    - EXPORT_SYMBOL_GPL hw_breakpoint_restore() as KVM can be built as a
    module
    - Restore the breakpoints unconditionally on kvm guest exit:
    TIF_DEBUG_THREAD doesn't anymore cover every cases of running
    breakpoints and vcpu->arch.switch_db_regs might not always be
    set when the guest used debug registers.
    (Waiting for a reliable optimization)

    Changes in v5:

    - Split-up the asm-generic/hw-breakpoint.h moving to
    linux/hw_breakpoint.h into a separate patch
    - Optimize the breakpoints restoring while switching from kvm guest
    to host. We only want to restore the state if we have active
    breakpoints to the host, otherwise we don't care about messed-up
    address registers.
    - Add asm/hw_breakpoint.h to Kbuild
    - Fix bad breakpoint type in trace_selftest.c

    Changes in v6:

    - Fix wrong header inclusion in trace.h (triggered a build
    error with CONFIG_FTRACE_SELFTEST

    Signed-off-by: Frederic Weisbecker
    Cc: Prasad
    Cc: Alan Stern
    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Cc: Steven Rostedt
    Cc: Ingo Molnar
    Cc: Jan Kiszka
    Cc: Jiri Slaby
    Cc: Li Zefan
    Cc: Avi Kivity
    Cc: Paul Mackerras
    Cc: Mike Galbraith
    Cc: Masami Hiramatsu
    Cc: Paul Mundt

    Frederic Weisbecker
     

18 Oct, 2009

1 commit


02 Oct, 2009

1 commit

  • Add a general per-cpu notifier that is called whenever the kernel is
    about to return to userspace. The notifier uses a thread_info flag
    and existing checks, so there is no impact on user return or context
    switch fast paths.

    This will be used initially to speed up KVM task switching by lazily
    updating MSRs.

    Signed-off-by: Avi Kivity
    LKML-Reference:
    Signed-off-by: H. Peter Anvin

    Avi Kivity
     

18 Sep, 2009

1 commit

  • commit 85bac32c4a52c592b857f2c360cc5ec93a097d70
    ring-buffer: only enable ring_buffer_swap_cpu when needed
    broke oprofile (at least on s390, but likely on all platforms).

    this patch lets oprofile select RING_BUFER_ALLOW_SWAP to make
    ring_buffer_swap_cpu usable for oprofile.

    Signed-off-by: Christian Borntraeger
    LKML-Reference:
    Cc: Ingo Molnar
    Cc: Robert Richter
    Signed-off-by: Steven Rostedt

    Christian Borntraeger
     

15 Sep, 2009

1 commit


07 Sep, 2009

1 commit


20 Jul, 2009

1 commit

  • The number of hardware counters is limited. The multiplexing feature
    enables OProfile to gather more events than counters are provided by
    the hardware. This is realized by switching between events at an user
    specified time interval.

    A new file (/dev/oprofile/time_slice) is added for the user to specify
    the timer interval in ms. If the number of events to profile is higher
    than the number of hardware counters available, the patch will
    schedule a work queue that switches the event counter and re-writes
    the different sets of values into it. The switching mechanism needs to
    be implemented for each architecture to support multiplexing. This
    patch only implements AMD CPU support, but multiplexing can be easily
    extended for other models and architectures.

    There are follow-on patches that rework parts of this patch.

    Signed-off-by: Jason Yeh
    Signed-off-by: Robert Richter

    Jason Yeh
     

19 Jun, 2009

1 commit

  • Enable the use of GCC's coverage testing tool gcov [1] with the Linux
    kernel. gcov may be useful for:

    * debugging (has this code been reached at all?)
    * test improvement (how do I change my test to cover these lines?)
    * minimizing kernel configurations (do I need this option if the
    associated code is never run?)

    The profiling patch incorporates the following changes:

    * change kbuild to include profiling flags
    * provide functions needed by profiling code
    * present profiling data as files in debugfs

    Note that on some architectures, enabling gcc's profiling option
    "-fprofile-arcs" for the entire kernel may trigger compile/link/
    run-time problems, some of which are caused by toolchain bugs and
    others which require adjustment of architecture code.

    For this reason profiling the entire kernel is initially restricted
    to those architectures for which it is known to work without changes.
    This restriction can be lifted once an architecture has been tested
    and found compatible with gcc's profiling. Profiling of single files
    or directories is still available on all platforms (see config help
    text).

    [1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.html

    Signed-off-by: Peter Oberparleiter
    Cc: Andi Kleen
    Cc: Huang Ying
    Cc: Li Wei
    Cc: Michael Ellerman
    Cc: Ingo Molnar
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Rusty Russell
    Cc: WANG Cong
    Cc: Sam Ravnborg
    Cc: Jeff Dike
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Oberparleiter
     

03 Jun, 2009

1 commit

  • This patch introduces the generic Hardware Breakpoint interfaces for both user
    and kernel space requests.
    This core Api handles the hardware breakpoints through new helpers. It
    handles the user-space breakpoints and kernel breakpoints in front of
    arch implementation.

    One can choose kernel wide breakpoints using the following helpers
    and passing them a generic struct hw_breakpoint:

    - register_kernel_hw_breakpoint()
    - unregister_kernel_hw_breakpoint()
    - modify_kernel_hw_breakpoint()

    On the other side, you can choose per task breakpoints.

    - register_user_hw_breakpoint()
    - unregister_user_hw_breakpoint()
    - modify_user_hw_breakpoint()

    [ fweisbec@gmail.com: fix conflict against perfcounter ]

    Original-patch-by: Alan Stern
    Signed-off-by: K.Prasad
    Reviewed-by: Alan Stern
    Signed-off-by: Frederic Weisbecker

    K.Prasad
     

10 Apr, 2009

1 commit

  • Impact: performance regression fix for s390

    The adaptive spinning mutexes will not always do what one would expect on
    virtualized architectures like s390. Especially the cpu_relax() loop in
    mutex_spin_on_owner might hurt if the mutex holding cpu has been scheduled
    away by the hypervisor.

    We would end up in a cpu_relax() loop when there is no chance that the
    state of the mutex changes until the target cpu has been scheduled again by
    the hypervisor.

    For that reason we should change the default behaviour to no-spin on s390.

    We do have an instruction which allows to yield the current cpu in favour of
    a different target cpu. Also we have an instruction which allows us to figure
    out if the target cpu is physically backed.

    However we need to do some performance tests until we can come up with
    a solution that will do the right thing on s390.

    Signed-off-by: Heiko Carstens
    Acked-by: Peter Zijlstra
    Cc: Martin Schwidefsky
    Cc: Christian Borntraeger
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Heiko Carstens
     

02 Apr, 2009

1 commit


06 Mar, 2009

1 commit


05 Mar, 2009

1 commit