17 Feb, 2011

1 commit


16 Feb, 2011

36 commits

  • There is no need to re-initialize the hrtimer every time we start it,
    so don't do that (shaves a few cycles). Also, since we know hrtimers
    run at a fixed rate (nanoseconds) we can pre-compute the desired
    frequency at which they tick. This avoids us having to go through the
    whole adaptive frequency feedback logic (shaves another few cycles).

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

    Peter Zijlstra
     
  • By pre-computing the maximum number of samples per tick we can avoid a
    multiplication and a conditional since MAX_INTERRUPTS >
    max_samples_per_tick.

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

    Peter Zijlstra
     
  • This patch adds support for AMD family 15h core counters. There are
    major changes compared to family 10h. First, there is a new perfctr
    msr range for up to 6 counters. Northbridge counters are separate
    now. This patch only adds support for core counters. Second, certain
    events may only be scheduled on certain counters. For this we need to
    extend the event scheduling and constraints.

    We use cpu feature flags to calculate family 15h msr address offsets.
    This way we later can implement a faster ALTERNATIVE() version for
    this.

    Signed-off-by: Robert Richter
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Robert Richter
     
  • Instead of storing the base addresses we can store the counter's msr
    addresses directly in config_base/event_base of struct hw_perf_event.
    This avoids recalculating the address with each msr access. The
    addresses are configured one time. We also need this change to later
    modify the address calculation.

    Signed-off-by: Robert Richter
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Robert Richter
     
  • This patch allows the reservation of perfctrs with new msr addresses
    introduced for AMD cpu family 15h (0xc0010200/0xc0010201, etc).

    Signed-off-by: Robert Richter
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Robert Richter
     
  • This patch adds helper functions to calculate perfctr msr addresses.
    We need this to later add support for AMD family 15h cpus. For this we
    have to change the algorithms to generate the perfctr's msr addresses.

    Signed-off-by: Robert Richter
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Robert Richter
     
  • Use helper function in x86_pmu_enable_all() to minimize access to
    x86_pmu.eventsel in the fast path. The counter's msr address is now
    calculated using struct hw_perf_event. Later we add code that
    calculates the msr addresses with a table lookup which shouldn't be
    done in the fast path.

    Signed-off-by: Robert Richter
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Robert Richter
     
  • This patch adds the ability to filter monitoring based on container groups
    (cgroups) for both perf stat and perf record. It is possible to monitor
    multiple cgroup in parallel. There is one cgroup per event. The cgroups to
    monitor are passed via a new -G option followed by a comma separated list of
    cgroup names.

    The cgroup filesystem has to be mounted. Given a cgroup name, the perf tool
    finds the corresponding directory in the cgroup filesystem and opens it. It
    then passes that file descriptor to the kernel.

    Example:

    $ perf stat -B -a -e cycles:u,cycles:u,cycles:u -G test1,,test2 -- sleep 1
    Performance counter stats for 'sleep 1':

    2,368,667,414 cycles test1
    2,369,661,459 cycles
    cycles test2

    1.001856890 seconds time elapsed

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

    Stephane Eranian
     
  • This kernel patch adds the ability to filter monitoring based on
    container groups (cgroups). This is for use in per-cpu mode only.

    The cgroup to monitor is passed as a file descriptor in the pid
    argument to the syscall. The file descriptor must be opened to
    the cgroup name in the cgroup filesystem. For instance, if the
    cgroup name is foo and cgroupfs is mounted in /cgroup, then the
    file descriptor is opened to /cgroup/foo. Cgroup mode is
    activated by passing PERF_FLAG_PID_CGROUP in the flags argument
    to the syscall.

    For instance to measure in cgroup foo on CPU1 assuming
    cgroupfs is mounted under /cgroup:

    struct perf_event_attr attr;
    int cgroup_fd, fd;

    cgroup_fd = open("/cgroup/foo", O_RDONLY);
    fd = perf_event_open(&attr, cgroup_fd, 1, -1, PERF_FLAG_PID_CGROUP);
    close(cgroup_fd);

    Signed-off-by: Stephane Eranian
    [ added perf_cgroup_{exit,attach} ]
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • Make the ::exit method act like ::attach, it is after all very nearly
    the same thing.

    The bug had no effect on correctness - fixing it is an optimization for
    the scheduler. Also, later perf-cgroups patches rely on it.

    Signed-off-by: Peter Zijlstra
    Acked-by: Paul Menage
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Merge reason: we need to queue up dependent patch

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • It was possible to call pmu::start() on an already running event. In
    particular this lead so some wreckage as the hrtimer events would
    re-initialize active timers.

    This was due to throttled events being activated again by scheduling.
    Scheduling in a context would add and force start events, resulting in
    running events with a possible throttle status. The next tick to hit
    that task will then try to unthrottle the event and call ->start() on
    an already running event.

    Reported-by: Jeff Moyer
    Cc:
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Several people have reported spurious unknown NMI
    messages on some P4 CPUs.

    This patch fixes it by checking for an overflow (negative
    counter values) directly, instead of relying on the
    P4_CCCR_OVF bit.

    Reported-by: George Spelvin
    Reported-by: Meelis Roos
    Reported-by: Don Zickus
    Reported-by: Dave Airlie
    Signed-off-by: Cyrill Gorcunov
    Cc: Lin Ming
    Cc: Don Zickus
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Cyrill Gorcunov
     
  • Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
    m68knommu: set flow handler for secondary interrupt controller of 5249
    m68knommu: remove use of IRQ_FLG_LOCK from 68360 platform support
    m68knommu: fix dereference of port.tty
    m68knommu: add missing linker __modver section
    m68knommu: fix mis-named variable int set_irq_chip loop
    m68knommu: add optimize memmove() function
    m68k: remove arch specific non-optimized memcmp()
    m68knommu: fix use of un-defined _TIF_WORK_MASK
    m68knommu: Rename m548x_wdt.c to m54xx_wdt.c
    m68knommu: fix m548x_wdt.c compilation after headers renaming
    m68knommu: Remove dependencies on nonexistent M68KNOMMU

    Linus Torvalds
     
  • The secondary interrupt controller of the ColdFire 5249 code is not
    setting the edge triggered flow handler. Set it.

    Signed-off-by: Greg Ungerer

    Greg Ungerer
     
  • The m68knommu arch does not define or use IRQ_FLG_LOCK in its irq
    subsystem. Remove obsolete use of it.

    Signed-off-by: Greg Ungerer

    Greg Ungerer
     
  • The struct_tty associated with a port is now a direct pointer
    from within the local private driver info struct. So fix all uses
    of it.

    Signed-off-by: Greg Ungerer

    Greg Ungerer
     
  • Add missing linker section __modver to fix:

    LD vmlinux
    /usr/local/bin/../m68k-uclinux/bin/ld.real: error: no memory region specified for loadable section `__modver'

    Signed-off-by: Greg Ungerer

    Greg Ungerer
     
  • Compiling for 68360 targets gives:

    CC arch/m68knommu/platform/68360/ints.o
    arch/m68knommu/platform/68360/ints.c: In function ‘init_IRQ’:
    arch/m68knommu/platform/68360/ints.c:135:16: error: ‘irq’ undeclared (first use in this function)
    arch/m68knommu/platform/68360/ints.c:135:16: note: each undeclared identifier is reported only once for each function it appears in

    Fix variable name used.

    Signed-off-by: Greg Ungerer

    Greg Ungerer
     
  • Add an m68k/coldfire optimized memmove() function for the m68knommu arch.
    This is the same function as used by m68k. Simple speed tests show this
    is faster once buffers are larger than 4 bytes, and significantly faster
    on much larger buffers (4 times faster above about 100 bytes).

    This also goes part of the way to fixing a regression caused by commit
    ea61bc461d09e8d331a307916530aaae808c72a2 ("m68k/m68knommu: merge MMU and
    non-MMU string.h"), which breaks non-coldfire non-mmu builds (which is
    the 68x328 and 68360 families). They currently have no memmove() fucntion
    defined, since there was none in the m68knommu/lib functions.

    Signed-off-by: Greg Ungerer

    Greg Ungerer
     
  • The m68k arch implements its own memcmp() function. It is not optimized
    in any way (it is the most strait forward coding of memcmp you can get).
    Remove it and use the kernels standard memcmp() implementation.

    This also goes part of the way to fixing a regression caused by commit
    ea61bc461d09e8d331a307916530aaae808c72a2 ("m68k/m68knommu: merge MMU and
    non-MMU string.h"), which breaks non-coldfire non-mmu builds (which is
    the 68x328 and 68360 families). They currently have no memcmp() function
    defined, since there is none in the m68knommu/lib functions.

    Signed-off-by: Greg Ungerer
    Acked-by: Geert Uytterhoeven

    Greg Ungerer
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (27 commits)
    drm/radeon/kms: hopefully fix pll issues for real (v3)
    drm/radeon/kms: add bounds checking to avivo pll algo
    drm: fix wrong usages of drm_device in DRM Developer's Guide
    drm/radeon/kms: fix a few more atombios endian issues
    drm/radeon/kms: improve 6xx/7xx CS error output
    drm/radeon/kms: check AA resolve registers on r300
    drm/radeon/kms: fix tracking of BLENDCNTL, COLOR_CHANNEL_MASK, and GB_Z on r300
    drm/radeon/kms: use linear aligned for evergreen/ni bo blits
    drm/radeon/kms: use linear aligned for 6xx/7xx bo blits
    drm/radeon: fix race between GPU reset and TTM delayed delete thread.
    drm/radeon/kms: evergreen/ni big endian fixes (v2)
    drm/radeon/kms: 6xx/7xx big endian fixes
    drm/radeon/kms: atombios big endian fixes
    drm/radeon: 6xx/7xx non-kms endian fixes
    drm/radeon/kms: optimize CS state checking for r100->r500
    drm: do not leak kernel addresses via /proc/dri/*/vma
    drm/radeon/kms: add connector table for mac g5 9600
    radeon mkregtable: Add missing fclose() calls
    drm/radeon/kms: fix interlaced modes on dce4+
    drm/radeon: fix memory debugging since d961db75ce86a84f1f04e91ad1014653ed7d9f46
    ...

    Linus Torvalds
     
  • …s/security-testing-2.6

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
    pci: use security_capable() when checking capablities during config space read

    Linus Torvalds
     
  • Transparent hugepages can only be created if rmap is fully
    functional. So we must prevent hugepages to be created while
    is_vma_temporary_stack() is true.

    This also optmizes away some harmless but unnecessary setting of
    khugepaged_scan.address and it switches some BUG_ON to VM_BUG_ON.

    Signed-off-by: Andrea Arcangeli
    Acked-by: Rik van Riel
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPI / Video: Probe for output switch method when searching video devices.
    ACPI / Wakeup: Enable button GPEs unconditionally during initialization
    ACPI / ACPICA: Avoid crashing if _PRW is defined for the root object
    ACPI: Fix acpi_os_read_memory() and acpi_os_write_memory() (v2)

    Linus Torvalds
     
  • * 'tools-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
    tools: turbostat: style updates
    tools: turbostat: fix bitwise and operand

    Linus Torvalds
     
  • Len Brown
     
  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (21 commits)
    dmaengine: add slave-dma maintainer
    dma: ipu_idmac: do not lose valid received data in the irq handler
    dmaengine: imx-sdma: fix up param for the last BD in sdma_prep_slave_sg()
    dmaengine: imx-sdma: correct sdmac->status in sdma_handle_channel_loop()
    dmaengine: imx-sdma: return sdmac->status in sdma_tx_status()
    dmaengine: imx-sdma: set sdmac->status to DMA_ERROR in err_out of sdma_prep_slave_sg()
    dmaengine: imx-sdma: remove IMX_DMA_SG_LOOP handling in sdma_prep_slave_sg()
    dmaengine i.MX dma: initialize dma capabilities outside channel loop
    dmaengine i.MX DMA: do not initialize chan_id field
    dmaengine i.MX dma: check sg entries for valid addresses and lengths
    dmaengine i.MX dma: set maximum segment size for our device
    dmaengine i.MX SDMA: reserve channel 0 by not registering it
    dmaengine i.MX SDMA: initialize dma capabilities outside channel loop
    dmaengine i.MX SDMA: do not initialize chan_id field
    dmaengine i.MX sdma: check sg entries for valid addresses and lengths
    dmaengine i.MX sdma: set maximum segment size for our device
    DMA: PL08x: fix channel pausing to timeout rather than lockup
    DMA: PL08x: fix infinite wait when terminating transfers
    dmaengine: imx-sdma: fix inconsistent naming in sdma_assign_cookie()
    dmaengine: imx-sdma: propagate error in sdma_probe() instead of returning 0
    ...

    Linus Torvalds
     
  • * 'for-2.6.38' of git://linux-nfs.org/~bfields/linux:
    nfsd: break lease on unlink due to rename
    nfsd4: acquire only one lease per file
    nfsd4: modify fi_delegations under recall_lock
    nfsd4: remove unused deleg dprintk's.
    nfsd4: split lease setting into separate function
    nfsd4: fix leak on allocation error
    nfsd4: add helper function for lease setup
    nfsd4: split up nfsd_break_deleg_cb
    NFSD: memory corruption due to writing beyond the stat array
    NFSD: use nfserr for status after decode_cb_op_status
    nfsd: don't leak dentry count on mnt_want_write failure

    Linus Torvalds
     
  • …kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    Revert "lockdep, timer: Fix del_timer_sync() annotation"

    * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    timer debug: Hide kernel addresses via %pK in /proc/timer_list

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Fix text_poke_smp_batch() deadlock
    perf tools: Fix thread_map event synthesizing in top and record
    watchdog, nmi: Lower the severity of error messages
    ARM: oprofile: Fix backtraces in timer mode
    oprofile: Fix usage of CONFIG_HW_PERF_EVENTS for oprofile_perf_init and friends

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, dmi, debug: Log board name (when present) in dmesg/oops output
    x86, ioapic: Don't warn about non-existing IOAPICs if we have none
    x86: Fix mwait_usable section mismatch
    x86: Readd missing irq_to_desc() in fixup_irq()
    x86: Fix section mismatch in LAPIC initialization

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: matrix_keypad - increase the limit of rows and columns
    Input: wacom - fix error path in wacom_probe()
    Input: ads7846 - check proper condition when freeing gpio
    Revert "Input: do not pass injected events back to the originating handler"
    Input: sysrq - rework re-inject logic
    Input: serio - clear pending rescans after sysfs driver rebind
    Input: rotary_encoder - use proper irqflags
    Input: wacom_w8001 - report resolution to userland

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    get rid of nameidata_dentry_drop_rcu() calling nameidata_drop_rcu()
    drop out of RCU in return_reval
    split do_revalidate() into RCU and non-RCU cases
    in do_lookup() split RCU and non-RCU cases of need_revalidate
    nothing in do_follow_link() is going to see RCU

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
    Btrfs: check return value of alloc_extent_map()
    Btrfs - Fix memory leak in btrfs_init_new_device()
    btrfs: prevent heap corruption in btrfs_ioctl_space_info()
    Btrfs: Fix balance panic
    Btrfs: don't release pages when we can't clear the uptodate bits
    Btrfs: fix page->private races

    Linus Torvalds
     

15 Feb, 2011

3 commits

  • task_show_regs used to be a debugging aid in the early bringup days
    of Linux on s390. /proc//status is a world readable file, it
    is not a good idea to show the registers of a process. The only
    correct fix is to remove task_show_regs.

    Reported-by: Al Viro
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     
  • This reintroduces commit 47970b1b which was subsequently reverted
    as f00eaeea. The original change was broken and caused X startup
    failures and generally made privileged processes incapable of reading
    device dependent config space. The normal capable() interface returns
    true on success, but the LSM interface returns 0 on success. This thinko
    is now fixed in this patch, and has been confirmed to work properly.

    So, once again...Eric Paris noted that commit de139a3 ("pci: check caps
    from sysfs file open to read device dependent config space") caused the
    capability check to bypass security modules and potentially auditing.
    Rectify this by calling security_capable() when checking the open file's
    capabilities for config space reads.

    Reported-by: Eric Paris
    Tested-by: Dave Young
    Acked-by: James Morris
    Cc: Dave Airlie
    Cc: Alex Riesen
    Cc: Sedat Dilek
    Cc: Linus Torvalds
    Signed-off-by: Chris Wright
    Signed-off-by: James Morris

    Chris Wright
     
  • can't happen anymore and didn't work right anyway

    Signed-off-by: Al Viro

    Al Viro