20 Jul, 2014

1 commit

  • Pull locking fixes from Thomas Gleixner:
    "The locking department delivers:

    - A rather large and intrusive bundle of fixes to address serious
    performance regressions introduced by the new rwsem / mcs
    technology. Simpler solutions have been discussed, but they would
    have been ugly bandaids with more risk than doing the right thing.

    - Make the rwsem spin on owner technology opt-in for architectures
    and enable it only on the known to work ones.

    - A few fixes to the lockdep userspace library"

    * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    locking/rwsem: Add CONFIG_RWSEM_SPIN_ON_OWNER
    locking/mutex: Disable optimistic spinning on some architectures
    locking/rwsem: Reduce the size of struct rw_semaphore
    locking/rwsem: Rename 'activity' to 'count'
    locking/spinlocks/mcs: Micro-optimize osq_unlock()
    locking/spinlocks/mcs: Introduce and use init macro and function for osq locks
    locking/spinlocks/mcs: Convert osq lock to atomic_t to reduce overhead
    locking/spinlocks/mcs: Rename optimistic_spin_queue() to optimistic_spin_node()
    locking/rwsem: Allow conservative optimistic spinning when readers have lock
    tools/liblockdep: Account for bitfield changes in lockdeps lock_acquire
    tools/liblockdep: Remove debug print left over from development
    tools/liblockdep: Fix comparison of a boolean value with a value of 2

    Linus Torvalds
     

17 Jul, 2014

1 commit


16 Jul, 2014

1 commit


08 Jul, 2014

4 commits

  • Pull thermal fixes from Zhang Rui:
    "Specifics:

    - update Email address of Thermal subsystem maintainer Eduardo
    Valentin.

    - fix a problem that unloading thermal module results in kernel crash
    because a non-exist device file is removed on thermal unload.

    - fix a problem that critical trip point is set wrongly on latest
    i.MX6 SOC and results in system critical shutdown.

    - a couple of fixes to Tmon tool, of-thermal code and ti thermal
    driver"

    * 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
    tmon: set umask to a reasonable value
    tmon: Check log file for common secuirty issues
    tools/thermal: tmon: fix compilation errors when building statically
    thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up wrong address is checked
    Thermal: imx: correct critical trip temperature setting
    thermal: Bind cooling devices with the correct arguments
    thermal: Add braces around suspect code
    thermal: hwmon: Make the check for critical temp valid consistent
    MAINTAINERS: Update Eduardo Valentin's email address

    Linus Torvalds
     
  • Commit fb9edbe984 shortened held_lock->check from a 2-bit field
    to a 1-bit field.

    Make liblockdep compatible with the new definition by passing check=1
    to lock_acquire() calls, rather than the old value check=2 (which
    inadvertently disabled checks by overflowing to 0).

    Without this fix, several of the test cases in liblockdep run_tests.sh
    were failing.

    Signed-off-by: S. Lockwood-Childs
    Signed-off-by: Sasha Levin

    S. Lockwood-Childs
     
  • Remove a debug print in init_preload() which was left over from
    development and isn't usefull at all currently. It was also causing
    false positive test results.

    Reported-by: S. Lockwood-Childs
    Signed-off-by: Sasha Levin

    Sasha Levin
     
  • Comparison of a boolean value (!__init_state) with a value of 2 (done)
    as currently happens in the code is unlikely to succeed and causes
    repeated initialization of the pthread function pointers.

    Instead, remove boolean comparison so that we would initialize said
    function pointers only once.

    Ref: https://bugzilla.kernel.org/show_bug.cgi?id=76741
    Cc: Jean Delvare
    Reported-by: David Binderman
    Signed-off-by: Dianfang Zhang
    Signed-off-by: Sasha Levin

    zhangdianfang
     

04 Jul, 2014

4 commits

  • Pull USB bugfixes from Greg KH:
    "Here's a round of USB bugfixes, quirk additions, and new device ids
    for 3.16-rc4. Nothing major in here at all, just a bunch of tiny
    changes. All have been in linux-next with no reported issues"

    * tag 'usb-3.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits)
    usb: chipidea: udc: delete td from req's td list at ep_dequeue
    usb: Kconfig: make EHCI_MSM selectable for QCOM SOCs
    usb-storage/SCSI: Add broken_fua blacklist flag
    usb: musb: dsps: fix the base address for accessing the mode register
    tools: ffs-test: fix header values endianess
    usb: phy: msm: Do not do runtime pm if the phy is not idle
    usb: musb: Ensure that cppi41 timer gets armed on premature DMA TX irq
    usb: gadget: gr_udc: Fix check for invalid number of microframes
    usb: musb: Fix panic upon musb_am335x module removal
    usb: gadget: f_fs: resurect usb_functionfs_descs_head structure
    Revert "tools: ffs-test: convert to new descriptor format fixing compilation error"
    xhci: Fix runtime suspended xhci from blocking system suspend.
    xhci: clear root port wake on bits if controller isn't wake-up capable
    xhci: correct burst count field for isoc transfers on 1.0 xhci hosts
    xhci: Use correct SLOT ID when handling a reset device command
    MAINTAINERS: update e-mail address
    usb: option: add/modify Olivetti Olicard modems
    USB: ftdi_sio: fix null deref at port probe
    MAINTAINERS: drop two usb-serial subdriver entries
    USB: option: add device ID for SpeedUp SU9800 usb 3g modem
    ...

    Linus Torvalds
     
  • The test fails in the middle when it is not run as root while accessing
    /proc/sys/kernel/msg_next_id. Changed it to check for root at the
    beginning of the test and exit if not root.

    Signed-off-by: Shuah Khan
    Cc: Greg Kroah-Hartman
    Cc: Davidlohr Bueso
    Cc: Colin Ian King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shuah Khan
     
  • on-off-test uses "$UID != 0" to test for root, but $UID is a construct
    specific to bash. Using /bin/sh that isn't bash results in the
    following error (due to the "$UID" part expanding to nothing):

    ./on-off-test.sh: 9: [: !=: unexpected operator

    Change Makefile to use bash instead.

    Signed-off-by: Shuah Khan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shuah Khan
     
  • on-off-test uses "$UID != 0" to test for root, but $UID is a construct
    specific to bash. Using /bin/sh that isn't bash results in the
    following error (due to the "$UID" part expanding to nothing):

    ./on-off-test.sh: 9: [: !=: unexpected operator

    Change Makefile to use bash instead.

    Signed-off-by: Shuah Khan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shuah Khan
     

01 Jul, 2014

5 commits

  • Currently, the tmon umask value is set to 0, which means whatever the permission
    mask in the shell are when starting tmon in daemon mode are what the permissions
    of any created files will be. We should likely set something more explicit, so
    lets go with the usual 022

    Signed-off-by: Neil Horman
    Acked-by: Jacob Pan
    Signed-off-by: Zhang Rui

    Neil Horman
     
  • The tmon logging system blindly opens its log file on a static path, making it
    very easy for someone to redirect that log information to inappropriate places
    or overwrite other users data. Do some easy checking to make sure we're not
    logging to a symlink or a file owned by another user.

    Signed-off-by: Neil Horman
    Acked-by: Jacob Pan
    Signed-off-by: Zhang Rui

    Neil Horman
     
  • …/balbi/usb into usb-linus

    Felipe writes:

    usb: fixes for v3.16-rc4

    A few more fixes for this RC cycle. There's a revert of a previous patch
    which ended up being the wrong version, so we reverted that commit and
    applied a better fix.

    CPPI41 got a race condition fix which was found by Thomas Gleixner.

    The MSM PHY driver got a runtime pm usage fix so that it wouldn't
    kill the PHY while it was still being used.

    We also have a fix for a panic caused when removing musb_am335x driver.

    Other than that, a few other minor fixes.

    Signed-of-by: Felipe Balbi <balbi@ti.com>

    Greg Kroah-Hartman
     
  • tmon fails to build statically with the following error:

    $ make LDFLAGS=-static
    gcc -O1 -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int -fstack-protector -D VERSION=\"1.0\" -static tmon.o tui.o sysfs.o pid.o -o tmon -lm -lpanel -lncursesw -lpthread
    tmon.o: In function `tmon_sig_handler':
    tmon.c:(.text+0x21): undefined reference to `stdscr'
    tmon.o: In function `tmon_cleanup':
    tmon.c:(.text+0xb9): undefined reference to `stdscr'
    tmon.c:(.text+0x11e): undefined reference to `stdscr'
    tmon.c:(.text+0x123): undefined reference to `keypad'
    tmon.c:(.text+0x12d): undefined reference to `nocbreak'
    tmon.o: In function `main':
    tmon.c:(.text+0x785): undefined reference to `stdscr'
    tmon.c:(.text+0x78a): undefined reference to `nodelay'
    tui.o: In function `setup_windows':
    tui.c:(.text+0x131): undefined reference to `stdscr'
    tui.c:(.text+0x176): undefined reference to `stdscr'
    tui.c:(.text+0x19f): undefined reference to `stdscr'
    tui.c:(.text+0x1cc): undefined reference to `stdscr'
    tui.c:(.text+0x1ff): undefined reference to `stdscr'
    tui.o:tui.c:(.text+0x229): more undefined references to `stdscr' follow
    tui.o: In function `show_cooling_device':
    [...]

    stdscr() and friends are in libtinfo (part of ncurses) so add it to
    the libraries that are linked in when compiling tmon to fix it.

    Cc: Jacob Pan
    Cc: Zhang Rui
    Signed-off-by: Javi Merino
    Acked-by: Jacob Pan

    Javi Merino
     
  • It appears that no one ever run ffs-test on a big-endian machine,
    since it used cpu-endianess for fs_count and hs_count fields which
    should be in little-endian format. Fix by wrapping the numbers in
    cpu_to_le32.

    Cc: stable@vger.kernel.org
    Signed-off-by: Michal Nazarewicz
    Signed-off-by: Felipe Balbi

    Michal Nazarewicz
     

27 Jun, 2014

1 commit


25 Jun, 2014

1 commit

  • Pull powerpc fixes and cleanups from Ben Herrenschmidt:
    "Here are a handful or two of powerpc fixes and simple/trivial
    cleanups. A bunch of them fix ftrace with the new ABI v2 in Little
    Endian, the rest is a scattering of fairly simple things"

    * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc: Don't skip ePAPR spin-table CPUs
    powerpc/module: Fix TOC symbol CRC
    powerpc/powernv: Remove OPAL v1 takeover
    powerpc/kmemleak: Do not scan the DART table
    selftests/powerpc: Use the test harness for the TM DSCR test
    powerpc/cell: cbe_thermal.c: Cleaning up a variable is of the wrong type
    powerpc/kprobes: Fix jprobes on ABI v2 (LE)
    powerpc/ftrace: Use pr_fmt() to namespace error messages
    powerpc/ftrace: Fix nop of modules on 64bit LE (ABIv2)
    powerpc/ftrace: Fix inverted check of create_branch()
    powerpc/ftrace: Fix typo in mask of opcode
    powerpc: Add ppc_global_function_entry()
    powerpc/macintosh/smu.c: Fix closing brace followed by if
    powerpc: Remove __arch_swab*
    powerpc: Remove ancient DEBUG_SIG code
    powerpc/kerenl: Enable EEH for IO accessors

    Linus Torvalds
     

24 Jun, 2014

2 commits


20 Jun, 2014

2 commits

  • The function machine__get_kernel_start_addr() was taking the first symbol
    of kallsyms as the start address. This is incorrect in certain cases
    where the first symbol is something at 0, while the actual kernel
    functions begin at a later point (e.g. 0x80200000).

    This patch fixes machine__get_kernel_start_addr() to search for the
    symbol "_text" or "_stext", which marks the beginning of kernel mapping.
    This was already being done in machine__create_kernel_maps(). Thus, this
    patch is just a refactor, to move that code into
    machine__get_kernel_start_addr().

    Signed-off-by: Simon Que
    Link: http://lkml.kernel.org/r/1402943529-13244-1-git-send-email-sque@chromium.org
    Signed-off-by: Jiri Olsa

    Simon Que
     
  • When cumulative callchain mode is on, we could get samples with
    with no actual hits. This breaks the assumption of the annotation
    code, that each sample has annotation counts allocated and leads
    to segfault.

    Fixing this by additional checks for annotation stats.

    Acked-by: Namhyung Kim
    Acked-by: Arnaldo Carvalho de Melo
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1402821332-12419-1-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     

19 Jun, 2014

1 commit

  • Commit [ac8dde11: “usb: gadget: f_fs: Add flags to descriptors block”]
    which introduced a new descriptor format for FunctionFS removed the
    usb_functionfs_descs_head structure, which is still used by ffs-test.
    tool.

    Convert ffs-test by converting it to use the new header format. For
    testing kernels prior to 3.14 (when the new format was introduced) and
    parsing of the legacy headers in the new kernels, provide a compilation
    flag to make the tool use the old format.

    Finally, include information as to when the legacy FunctionFS headers
    format has been deprecated (which is also when the new one has been
    introduced).

    Reported-by: Lad, Prabhakar
    Signed-off-by: Michal Nazarewicz
    Signed-off-by: Felipe Balbi

    Michal Nazarewicz
     

14 Jun, 2014

1 commit


13 Jun, 2014

3 commits

  • Pull more powerpc updates from Ben Herrenschmidt:
    "Here are the remaining bits I was mentioning earlier. Mostly bug
    fixes and new selftests from Michael (yay !). He also removed the WSP
    platform and A2 core support which were dead before release, so less
    clutter.

    One little "feature" I snuck in is the doorbell IPI support for
    non-virtualized P8 which speeds up IPIs significantly between threads
    of a core"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (34 commits)
    powerpc/book3s: Fix some ABIv2 issues in machine check code
    powerpc/book3s: Fix guest MC delivery mechanism to avoid soft lockups in guest.
    powerpc/book3s: Increment the mce counter during machine_check_early call.
    powerpc/book3s: Add stack overflow check in machine check handler.
    powerpc/book3s: Fix machine check handling for unhandled errors
    powerpc/eeh: Dump PE location code
    powerpc/powernv: Enable POWER8 doorbell IPIs
    powerpc/cpuidle: Only clear LPCR decrementer wakeup bit on fast sleep entry
    powerpc/powernv: Fix killed EEH event
    powerpc: fix typo 'CONFIG_PMAC'
    powerpc: fix typo 'CONFIG_PPC_CPU'
    powerpc/powernv: Don't escalate non-existing frozen PE
    powerpc/eeh: Report frozen parent PE prior to child PE
    powerpc/eeh: Clear frozen state for child PE
    powerpc/powernv: Reduce panic timeout from 180s to 10s
    powerpc/xmon: avoid format string leaking to printk
    selftests/powerpc: Add tests of PMU EBBs
    selftests/powerpc: Add support for skipping tests
    selftests/powerpc: Put the test in a separate process group
    selftests/powerpc: Fix instruction loop for ABIv2 (LE)
    ...

    Linus Torvalds
     
  • Pull more perf updates from Ingo Molnar:
    "A second round of perf updates:

    - wide reaching kprobes sanitization and robustization, with the hope
    of fixing all 'probe this function crashes the kernel' bugs, by
    Masami Hiramatsu.

    - uprobes updates from Oleg Nesterov: tmpfs support, corner case
    fixes and robustization work.

    - perf tooling updates and fixes from Jiri Olsa, Namhyung Ki, Arnaldo
    et al:
    * Add support to accumulate hist periods (Namhyung Kim)
    * various fixes, refactorings and enhancements"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (101 commits)
    perf: Differentiate exec() and non-exec() comm events
    perf: Fix perf_event_comm() vs. exec() assumption
    uprobes/x86: Rename arch_uprobe->def to ->defparam, minor comment updates
    perf/documentation: Add description for conditional branch filter
    perf/x86: Add conditional branch filtering support
    perf/tool: Add conditional branch filter 'cond' to perf record
    perf: Add new conditional branch filter 'PERF_SAMPLE_BRANCH_COND'
    uprobes: Teach copy_insn() to support tmpfs
    uprobes: Shift ->readpage check from __copy_insn() to uprobe_register()
    perf/x86: Use common PMU interrupt disabled code
    perf/ARM: Use common PMU interrupt disabled code
    perf: Disable sampled events if no PMU interrupt
    perf: Fix use after free in perf_remove_from_context()
    perf tools: Fix 'make help' message error
    perf record: Fix poll return value propagation
    perf tools: Move elide bool into perf_hpp_fmt struct
    perf tools: Remove elide setup for SORT_MODE__MEMORY mode
    perf tools: Fix "==" into "=" in ui_browser__warning assignment
    perf tools: Allow overriding sysfs and proc finding with env var
    perf tools: Consider header files outside perf directory in tags target
    ...

    Linus Torvalds
     
  • Pull networking updates from David Miller:

    1) Seccomp BPF filters can now be JIT'd, from Alexei Starovoitov.

    2) Multiqueue support in xen-netback and xen-netfront, from Andrew J
    Benniston.

    3) Allow tweaking of aggregation settings in cdc_ncm driver, from Bjørn
    Mork.

    4) BPF now has a "random" opcode, from Chema Gonzalez.

    5) Add more BPF documentation and improve test framework, from Daniel
    Borkmann.

    6) Support TCP fastopen over ipv6, from Daniel Lee.

    7) Add software TSO helper functions and use them to support software
    TSO in mvneta and mv643xx_eth drivers. From Ezequiel Garcia.

    8) Support software TSO in fec driver too, from Nimrod Andy.

    9) Add Broadcom SYSTEMPORT driver, from Florian Fainelli.

    10) Handle broadcasts more gracefully over macvlan when there are large
    numbers of interfaces configured, from Herbert Xu.

    11) Allow more control over fwmark used for non-socket based responses,
    from Lorenzo Colitti.

    12) Do TCP congestion window limiting based upon measurements, from Neal
    Cardwell.

    13) Support busy polling in SCTP, from Neal Horman.

    14) Allow RSS key to be configured via ethtool, from Venkata Duvvuru.

    15) Bridge promisc mode handling improvements from Vlad Yasevich.

    16) Don't use inetpeer entries to implement ID generation any more, it
    performs poorly, from Eric Dumazet.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits)
    rtnetlink: fix userspace API breakage for iproute2 < v3.9.0
    tcp: fixing TLP's FIN recovery
    net: fec: Add software TSO support
    net: fec: Add Scatter/gather support
    net: fec: Increase buffer descriptor entry number
    net: fec: Factorize feature setting
    net: fec: Enable IP header hardware checksum
    net: fec: Factorize the .xmit transmit function
    bridge: fix compile error when compiling without IPv6 support
    bridge: fix smatch warning / potential null pointer dereference
    via-rhine: fix full-duplex with autoneg disable
    bnx2x: Enlarge the dorq threshold for VFs
    bnx2x: Check for UNDI in uncommon branch
    bnx2x: Fix 1G-baseT link
    bnx2x: Fix link for KR with swapped polarity lane
    sctp: Fix sk_ack_backlog wrap-around problem
    net/core: Add VF link state control policy
    net/fsl: xgmac_mdio is dependent on OF_MDIO
    net/fsl: Make xgmac_mdio read error message useful
    net_sched: drr: warn when qdisc is not work conserving
    ...

    Linus Torvalds
     

12 Jun, 2014

13 commits

  • Testing that perf properly closes opened dso objects
    and tries to reopen in case we run out of allowed file
    descriptors for dso data.

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Reviewed by: David Ahern
    Link: http://lkml.kernel.org/r/1401892622-30848-14-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Adding test that setup test_dso_data__fd_limit and test
    dso data file descriptors are cached appropriately.

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1401892622-30848-13-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Making the test_file function to be reusable for
    new tests coming in following patches.

    Also changing the template name of temp files to
    "/tmp/perf-test-XXXXXX" to easily identify & blame.

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1401892622-30848-12-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • In upcoming tests we will setup process limits, which
    might affect other tests. Spawning child for each test
    to prevent this.

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Reviewed-by: David Ahern
    Link: http://lkml.kernel.org/r/1401892622-30848-11-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Adding descriptions/explanations for dso__data_* interface
    functions.

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1401892622-30848-10-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Adding do_open function that tries to close opened
    dso objects in case we fail to open the dso due to
    to crossing the allowed RLIMIT_NOFILE limit.

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1401892622-30848-9-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Adding file size check, because the lseek will succeed for
    any offset behind file size and thus succeed when it was
    expected to fail.

    Factoring the code to check the offset against file size
    earlier in the flow.

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1401892622-30848-8-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Caching dso data file descriptors to avoid expensive re-opens
    especially during DWARF unwind.

    We keep dsos data file descriptors open until their count reaches
    the half of the current fd open limit (RLIMIT_NOFILE). In this case
    we close file descriptor of the first opened dso object.

    We've got overall speedup (~27% for my workload) of report:
    'perf report --stdio -i perf-test.data' (3 runs)
    (perf-test.data size was around 12GB)

    current code:
    545,640,944,228 cycles ( +- 0.53% )
    785,255,798,320 instructions ( +- 0.03% )

    366.340910010 seconds time elapsed ( +- 3.65% )

    after change:
    435,895,036,114 cycles ( +- 0.26% )
    636,790,271,176 instructions ( +- 0.04% )

    266.481463387 seconds time elapsed ( +- 0.13% )

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1401892622-30848-7-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Adding global count of opened dso objects so we could
    properly limit the number of opened dso data file
    descriptors.

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1401892622-30848-6-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Adding global list of opened dso objects, so we can
    track them and use the list for caching dso data file
    descriptors.

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1401892622-30848-5-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Adding data_fd into dso object so we could handle caching
    of opened dso file data descriptors coming int next patches.

    Adding dso__data_close interface to keep the data_fd updated
    when the descriptor is closed.

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1401892622-30848-4-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Add separated structure/namespace for data related
    variables. We are going to add mode of them, so this
    way they will be clearly separated.

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1401892622-30848-3-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa
     
  • Caching registers value into an array. Got about 4% speed up
    of perf_reg_value function for report command processing
    dwarf unwind stacks.

    Output from report over 1.5 GB data with DWARF unwind stacks:
    (TODO fix perf diff)

    current code:
    5.84% perf perf [.] perf_reg_value
    change:
    1.94% perf perf [.] perf_reg_value

    And little bit of overall speed up:
    (perf stat -r 5 -e '{cycles,instructions}:u' ...)

    current code:
    310,298,611,754 cycles ( +- 0.33% )
    439,669,689,341 instructions ( +- 0.03% )

    188.656753166 seconds time elapsed ( +- 0.82% )

    change:
    291,315,329,878 cycles ( +- 0.22% )
    391,763,485,304 instructions ( +- 0.03% )

    180.742249687 seconds time elapsed ( +- 0.64% )

    Acked-by: Namhyung Kim
    Cc: Arnaldo Carvalho de Melo
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1401892622-30848-2-git-send-email-jolsa@kernel.org
    Signed-off-by: Jiri Olsa

    Jiri Olsa