07 Jan, 2011

8 commits

  • They are a handful of places in the code that register a die_notifier
    as a catch all in case no claims the NMI. Unfortunately, they trigger
    on events like DIE_NMI and DIE_NMI_IPI, which depending on when they
    registered may collide with other handlers that have the ability to
    determine if the NMI is theirs or not.

    The function unknown_nmi_error() makes one last effort to walk the
    die_chain when no one else has claimed the NMI before spitting out
    messages that the NMI is unknown.

    This is a better spot for these devices to execute any code without
    colliding with the other handlers.

    The two drivers modified are only compiled on x86 arches I believe, so
    they shouldn't be affected by other arches that may not have
    DIE_NMIUNKNOWN defined.

    Signed-off-by: Don Zickus
    Cc: Russ Anderson
    Cc: Corey Minyard
    Cc: openipmi-developer@lists.sourceforge.net
    Cc: dann frazier
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Don Zickus
     
  • Replace the NMI related magic numbers with symbol constants.

    Memory parity error is only valid for IBM PC-AT, newer machine use
    bit 7 (0x80) of 0x61 port for PCI SERR. While memory error is usually
    reported via MCE. So corresponding function name and kernel log string
    is changed.

    But on some machines, PCI SERR line is still used to report memory
    errors. This is used by EDAC, so corresponding EDAC call is reserved.

    Signed-off-by: Huang Ying
    Signed-off-by: Don Zickus
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Huang Ying
     
  • Adds perf_event_time() to try and centralize access to event
    timing and in particular ctx->time. Prepares for cgroup support.

    Signed-off-by: Stephane Eranian
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • Replace all occurrences of:
    event->cpu != -1 && event->cpu == smp_processor_id()
    by a call to:
    event_filter_match(event)

    This makes the code more consistent and will make the cgroup
    patch smaller.

    Signed-off-by: Stephane Eranian
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • In particular this patch move perf_event_exit_task() before
    cgroup_exit() to allow for cgroup support. The cgroup_exit()
    function detaches the cgroups attached to a task.

    Other movements include hoisting some definitions and inlines
    at the top of perf_event.c

    Signed-off-by: Stephane Eranian
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • Since commit 69aad6f1(perf tools: Introduce event selectors), only
    perf_event_attr::type and ::config are passed to event selector, which
    makes perf tool not work correctly.

    For example, PEBS does not work because perf_event_attr::precise_ip is
    not passed to the syscall.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Lin Ming
    Signed-off-by: Arnaldo Carvalho de Melo

    Lin Ming
     
  • It seems that some gcc versions build by default with frame pointers
    and some others omit them.

    Just build the tools with frame pointers as the callchains can be an
    important part of the perf workflow.

    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Arnaldo Carvalho de Melo

    Frederic Weisbecker
     
  • I found when specifying all tracepoints with -e to one of subcommand,
    such as 'stat', the program will trigger a buffer overflow error, like
    this:

    *** buffer overflow detected ***: ./perf terminated
    ======= Backtrace: =========
    /lib64/libc.so.6(__fortify_fail+0x37)[0x382cefb2c7]
    ....

    The tracepoints are separated by comma, something like this:

    $ perf stat -a -e `perf list |grep Tracepoint|awk -F'[' '{gsub(/[[:space:]]+/,"",$1);array[FNR]=$1}END{outputs=array[1];for (i=2;i
    Signed-off-by: Han Pingtian
    Signed-off-by: Arnaldo Carvalho de Melo

    Han Pingtian
     

06 Jan, 2011

7 commits

  • Provides documentation for the following:
    - the new power trace API,
    - the old (legacy) power trace API,
    - the DEPRECATED Kconfig option usage.

    Signed-off-by: Jean Pihet
    Cc: Arjan van de Ven
    Cc: trenn@suse.de
    Cc: Len Brown
    Cc: Pavel Machek
    Cc: Rafael J. Wysocki
    Cc: Steven Rostedt
    Cc: Arnaldo Carvalho de Melo
    Cc: linux-pm@lists.linux-foundation.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Jean Pihet
     
  • Uses the machine_suspend trace point, called from the
    generic kernel suspend_devices_and_enter function.

    Signed-off-by: Jean Pihet
    Acked-by: Rafael J. Wysocki
    Cc: Arjan van de Ven
    CC: Thomas Renninger
    Cc: Len Brown
    Cc: Pavel Machek
    Cc: Steven Rostedt
    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: linux-pm@lists.linux-foundation.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Jean Pihet
     
  • Not accessed outside builtin-script, so make them static.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • That already does what was being done here. The warning is now unconditionally
    given by __perf_session__process_pipe_events, just like for non pipe processing.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Just like we do at __perf_session__process_events

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • This patch fixes the usage of the perf_event.h header file
    between command modules and the supporting code in util.

    It is necessary to ensure that ALL files use the SAME
    perf_event.h header from the kernel source tree.

    There were a couple of #include mixed
    with #include "../../perf_event.h".

    This caused issues on some distros because of mismatch
    in the layout of struct perf_event_attr. That eventually
    led perf stat to segfault.

    Cc: David S. Miller
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Stephane Eranian
    LKML-Reference:
    Signed-off-by: Stephane Eranian
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     
  • Rebooted my devel machine, first thing I ran was perf test, that expects
    debugfs to be mounted, test fails. Be more clear about it.

    Also add missing newlines and add more informative message when
    sys_perf_event_open fails.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

05 Jan, 2011

8 commits

  • Prevent the long delay in io_check_error making NMI watchdog
    timeout.

    Signed-off-by: Huang Ying
    Signed-off-by: Don Zickus
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Huang Ying
     
  • The spin_lock_debug/rcu_cpu_stall detector uses
    trigger_all_cpu_backtrace() to dump cpu backtrace.
    Therefore it is possible that trigger_all_cpu_backtrace()
    could be called at the same time on different CPUs, which
    triggers and 'unknown reason NMI' warning. The following case
    illustrates the problem:

    CPU1 CPU2 ... CPU N
    trigger_all_cpu_backtrace()
    set "backtrace_mask" to cpu mask
    |
    generate NMI interrupts generate NMI interrupts ...
    \ | /
    \ | /

    The "backtrace_mask" will be cleaned by the first NMI interrupt
    at nmi_watchdog_tick(), then the following NMI interrupts
    generated by other cpus's arch_trigger_all_cpu_backtrace() will
    be taken as unknown reason NMI interrupts.

    This patch uses a test_and_set to avoid the problem, and stop
    the arch_trigger_all_cpu_backtrace() from calling to avoid
    dumping a double cpu backtrace info when there is already a
    trigger_all_cpu_backtrace() in progress.

    Signed-off-by: Dongdong Deng
    Reviewed-by: Bruce Ashfield
    Cc: fweisbec@gmail.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar
    Signed-off-by: Don Zickus

    Dongdong Deng
     
  • There are some paths that walk the die_chain with preemption on.
    Make sure we are in an NMI call before we start doing anything.

    This was triggered by do_general_protection calling notify_die
    with DIE_GPF.

    Reported-by: Jan Kiszka
    Signed-off-by: Don Zickus
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Don Zickus
     
  • Merge reason: Add the final .37 tree.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    ipv4/route.c: respect prefsrc for local routes
    bridge: stp: ensure mac header is set
    bridge: fix br_multicast_ipv6_rcv for paged skbs
    atl1: fix oops when changing tx/rx ring params
    drivers/atm/atmtcp.c: add missing atm_dev_put
    starfire: Fix dma_addr_t size test for MIPS
    tg3: fix return value check in tg3_read_vpd()
    Broadcom CNIC core network driver: fix mem leak on allocation failures in cnic_alloc_uio_rings()
    ISDN, Gigaset: Fix memory leak in do_disconnect_req()
    CAN: Use inode instead of kernel address for /proc file
    skfp: testing the wrong variable in skfp_driver_init()
    ppp: allow disabling multilink protocol ID compression
    ehea: Avoid changing vlan flags
    ueagle-atm: fix PHY signal initialization race

    Linus Torvalds
     
  • The preferred source address is currently ignored for local routes,
    which results in all local connections having a src address that is the
    same as the local dst address. Fix this by respecting the preferred source
    address when it is provided for local routes.

    This bug can be demonstrated as follows:

    # ifconfig dummy0 192.168.0.1
    # ip route show table local | grep local.*dummy0
    local 192.168.0.1 dev dummy0 proto kernel scope host src 192.168.0.1
    # ip route change table local local 192.168.0.1 dev dummy0 \
    proto kernel scope host src 127.0.0.1
    # ip route show table local | grep local.*dummy0
    local 192.168.0.1 dev dummy0 proto kernel scope host src 127.0.0.1

    We now establish a local connection and verify the source IP
    address selection:

    # nc -l 192.168.0.1 3128 &
    # nc 192.168.0.1 3128 &
    # netstat -ant | grep 192.168.0.1:3128.*EST
    tcp 0 0 192.168.0.1:3128 192.168.0.1:33228 ESTABLISHED
    tcp 0 0 192.168.0.1:33228 192.168.0.1:3128 ESTABLISHED

    Signed-off-by: Joel Sing
    Signed-off-by: David S. Miller

    Joel Sing
     
  • The ->trim_fs has been removed meanwhile, so remove it from the documentation
    as well.

    Signed-off-by: Christoph Hellwig
    Reported-by: Ryusuke Konishi
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

04 Jan, 2011

17 commits

  • builtin-timechart must only pass -e power:xy events if they are supported by
    the running kernel, otherwise try to fetch the old power:power{start,end}
    events.

    For this I added the tiny helper function:

    int is_valid_tracepoint(const char *event_string)

    to parse-events.[hc], which could be more generic as an interface and support
    hardware/software/... events, not only tracepoints, but someone else could
    extend that if needed...

    Signed-off-by: Thomas Renninger
    Acked-by: Arjan van de Ven
    Acked-by: Jean Pihet
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Thomas Renninger
     
  • Add these new power trace events:

    power:cpu_idle
    power:cpu_frequency
    power:machine_suspend

    The old C-state/idle accounting events:
    power:power_start
    power:power_end

    Have now a replacement (but we are still keeping the old
    tracepoints for compatibility):

    power:cpu_idle

    and
    power:power_frequency

    is replaced with:
    power:cpu_frequency

    power:machine_suspend is newly introduced.

    Jean Pihet has a patch integrated into the generic layer
    (kernel/power/suspend.c) which will make use of it.

    the type= field got removed from both, it was never
    used and the type is differed by the event type itself.

    perf timechart userspace tool gets adjusted in a separate patch.

    Signed-off-by: Thomas Renninger
    Signed-off-by: Ingo Molnar
    Acked-by: Arjan van de Ven
    Acked-by: Jean Pihet
    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: rjw@sisk.pl
    LKML-Reference:
    Signed-off-by: Ingo Molnar
    LKML-Reference:

    Thomas Renninger
     
  • power_frequency moved to drivers/cpufreq/cpufreq.c which has
    to be compiled in, no need to export it.

    intel_idle can a be module though...

    Signed-off-by: Thomas Renninger
    Signed-off-by: Ingo Molnar
    Acked-by: Jean Pihet
    Cc: Jean Pihet
    Cc: Arjan van de Ven
    Cc: rjw@sisk.pl
    LKML-Reference:
    Signed-off-by: Ingo Molnar
    LKML-Reference:

    Thomas Renninger
     
  • …inux-2.6 into perf/core

    Ingo Molnar
     
  • Merge reason: pick up latest -rc.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • To test the use of the perf_evsel class on something other than
    the tools from where we refactored code to create it.

    It calls open() N times and then checks if the event created to
    monitor it returns N events.

    [acme@felicio linux]$ perf test
    1: vmlinux symtab matches kallsyms: Ok
    2: detect open syscall event: Ok
    [acme@felicio linux]$

    It does.

    Cc: Frederic Weisbecker
    Cc: Han Pingtian
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • While writing the first user of the routines created from the ad-hoc
    routines in the existing builtins I noticed that the resulting set of
    calls was too long, reduce it by doing some best effort allocations.

    Tools that need to operate on multiple threads and cpus should pre-allocate
    enough resources by explicitely calling the perf_evsel__alloc_{fd,counters}
    methods.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • So that later, we can pass the thread_map instance instead of
    (thread_num, thread_map) for things like perf_evsel__open and friends,
    just like was done with cpu_map.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • So that later, we can pass the cpu_map instance instead of (nr_cpus, cpu_map)
    for things like perf_evsel__open and friends.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Abstracting away the loops needed to create the various event fd handlers.

    The users have to pass a confiruged perf->evsel.attr field, which is already
    usable after perf_evsel__new (constructor) time, using defaults.

    Comes out of the ad-hoc routines in builtin-stat, that now uses it.

    Fixed a small silly bug where we were die()ing before killing our
    children, dysfunctional family this one 8-)

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Making them hopefully generic enough to be used in 'perf test',
    well see.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    ARM: pxa: fix page table corruption on resume
    ARM: it8152: add IT8152_LAST_IRQ definition to fix build error
    ARM: pxa: PXA_ESERIES depends on FB_W100.
    ARM: 6605/1: Add missing include "asm/memory.h"
    ARM: 6540/1: Stop irqsoff trace on return to user
    ARM: 6537/1: update Nomadik, U300 and Ux500 maintainers
    ARM: 6536/1: Add missing SZ_{32,64,128}
    ARM: fix cache-feroceon-l2 after stack based kmap_atomic()
    ARM: fix cache-xsc3l2 after stack based kmap_atomic()
    ARM: get rid of kmap_high_l1_vipt()
    ARM: smp: avoid incrementing mm_users on CPU startup
    ARM: pxa: PXA_ESERIES depends on FB_W100.

    Linus Torvalds
     
  • Addresses https://bugzilla.kernel.org/show_bug.cgi?id=25702

    Reported-by: Martin Ettl
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • If security_filter_rule_init() doesn't return a rule, then not everything
    is as fine as the return code implies.

    This bug only occurs when the LSM (eg. SELinux) is disabled at runtime.

    Adding an empty LSM rule causes ima_match_rules() to always succeed,
    ignoring any remaining rules.

    default IMA TCB policy:
    # PROC_SUPER_MAGIC
    dont_measure fsmagic=0x9fa0
    # SYSFS_MAGIC
    dont_measure fsmagic=0x62656572
    # DEBUGFS_MAGIC
    dont_measure fsmagic=0x64626720
    # TMPFS_MAGIC
    dont_measure fsmagic=0x01021994
    # SECURITYFS_MAGIC
    dont_measure fsmagic=0x73636673

    < LSM specific rule >
    dont_measure obj_type=var_log_t

    measure func=BPRM_CHECK
    measure func=FILE_MMAP mask=MAY_EXEC
    measure func=FILE_CHECK mask=MAY_READ uid=0

    Thus without the patch, with the boot parameters 'tcb selinux=0', adding
    the above 'dont_measure obj_type=var_log_t' rule to the default IMA TCB
    measurement policy, would result in nothing being measured. The patch
    prevents the default TCB policy from being replaced.

    Signed-off-by: Mimi Zohar
    Cc: James Morris
    Acked-by: Serge Hallyn
    Cc: David Safford
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mimi Zohar
     
  • Russell King
     
  • commit bf9ae5386bca8836c16e69ab8fdbe46767d7452a
    (llc: use dev_hard_header) removed the
    skb_reset_mac_header call from llc_mac_hdr_init.

    This seems fine itself, but br_send_bpdu() invokes ebtables LOCAL_OUT.

    We oops in ebt_basic_match() because it assumes eth_hdr(skb) returns
    a meaningful result.

    Cc: acme@ghostprotocols.net
    References: https://bugzilla.kernel.org/show_bug.cgi?id=24532
    Signed-off-by: Florian Westphal
    Signed-off-by: David S. Miller

    Florian Westphal