27 Sep, 2011

9 commits

  • That flag no longer makes sense, since we don't look up automount points
    as eagerly any more. Additionally, it turns out that the NO_AUTOMOUNT
    handling was buggy to begin with: it would avoid automounting even for
    cases where we really *needed* to do the automount handling, and could
    return ENOENT for autofs entries that hadn't been instantiated yet.

    With our new non-eager automount semantics, one discussion has been
    about adding a AT_AUTOMOUNT flag to vfs_fstatat (and thus the
    newfstatat() and fstatat64() system calls), but it's probably not worth
    it: you can always force at least directory automounting by simply
    adding the final '/' to the filename, which works for *all* of the stat
    family system calls, old and new.

    So AT_NO_AUTOMOUNT (and thus LOOKUP_NO_AUTOMOUNT) really were just a
    result of our bad default behavior.

    Acked-by: Ian Kent
    Acked-by: Trond Myklebust
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • The concensus seems to be that system calls such as stat() etc should
    not trigger an automount. Neither should the l* versions.

    This patch therefore adds a LOOKUP_AUTOMOUNT flag to tag those lookups
    that _should_ trigger an automount on the last path element.

    Signed-off-by: Trond Myklebust
    [ Edited to leave out the cases that are already covered by LOOKUP_OPEN,
    LOOKUP_DIRECTORY and LOOKUP_CREATE - all of which also fundamentally
    force automounting for their own reasons - Linus ]
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • Since we've now turned around and made LOOKUP_FOLLOW *not* force an
    automount, we want to add the ability to force an automount event on
    lookup even if we don't happen to have one of the other flags that force
    it implicitly (LOOKUP_OPEN, LOOKUP_DIRECTORY, LOOKUP_PARENT..)

    Most cases will never want to use this, since you'd normally want to
    delay automounting as long as possible, which usually implies
    LOOKUP_OPEN (when we open a file or directory, we really cannot avoid
    the automount any more).

    But Trond argued sufficiently forcefully that at a minimum bind mounting
    a file and quotactl will want to force the automount lookup. Some other
    cases (like nfs_follow_remote_path()) could use it too, although
    LOOKUP_DIRECTORY would work there as well.

    This commit just adds the flag and logic, no users yet, though. It also
    doesn't actually touch the LOOKUP_NO_AUTOMOUNT flag that is related, and
    was made irrelevant by the same change that made us not follow on
    LOOKUP_FOLLOW.

    Cc: Trond Myklebust
    Cc: Ian Kent
    Cc: Jeff Layton
    Cc: Miklos Szeredi
    Cc: David Howells
    Cc: Al Viro
    Cc: Greg KH
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'samsung-fixes-3' of git://github.com/kgene/linux-samsung:
    ARM: EXYNOS4: Rename sclk_cam clocks for FIMC driver
    ARM: S5PV210: Rename sclk_cam clocks for FIMC media driver
    ARM: S5P: fix incorrect loop iterator usage on gpio-interrupt
    ARM: S3C2443: Fix bit-reset in setrate of clk_armdiv

    Linus Torvalds
     
  • The sclk_cam clocks are now controlled by the top level FIMC media
    device driver bound to "s5p-fimc-md" platform device.
    Rename sclk_cam clocks so they accessible by the corresponding
    driver.

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Kukjin Kim

    Sylwester Nawrocki
     
  • The sclk_cam clocks are now controlled by the top level FIMC media
    device driver bound to "s5p-fimc-md" platform device.
    Rename sclk_cam clocks so they accessible by the corresponding
    driver.

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Kyungmin Park
    Signed-off-by: Kukjin Kim

    Sylwester Nawrocki
     
  • * 'hwmon-for-linus' of git://github.com/groeck/linux:
    hwmon: (coretemp) remove struct platform_data * parameter from create_core_data()
    hwmon: (coretemp) constify static data
    hwmon: (coretemp) don't use kernel assigned CPU number as platform device ID
    hwmon: (ds620) Fix handling of negative temperatures
    hwmon: (w83791d) rename prototype parameter from 'register' to 'reg'
    hwmon: (coretemp) Don't use threshold registers for tempX_max
    hwmon: (coretemp) Let the user force TjMax
    hwmon: (coretemp) Drop duplicate function get_pkg_tjmax

    Linus Torvalds
     
  • * 'kvm-updates/3.1' of git://github.com/avikivity/kvm:
    KVM: x86 emulator: fix Src2CL decode
    KVM: MMU: fix incorrect return of spte

    Linus Torvalds
     
  • * 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
    ARM: 7099/1: futex: preserve oldval in SMP __futex_atomic_op
    ARM: dma-mapping: free allocated page if unable to map
    ARM: fix vmlinux.lds.S discarding sections
    ARM: nommu: fix warning with checksyscalls.sh
    ARM: 7091/1: errata: D-cache line maintenance operation by MVA may not succeed

    Linus Torvalds
     

26 Sep, 2011

7 commits


24 Sep, 2011

24 commits

  • * 'spi/merge' of git://git.secretlab.ca/git/linux-2.6:
    spi: Fix WARN when removing spi-fsl-spi module
    spi/imx: Fix spi-imx when the hardware SPI chipselects are used

    Linus Torvalds
     
  • If CPM mode is not used, the fsl_dummy_rx variable is never allocated. When
    the cleanup attempts to free it, the reference count is zero and a WARN is
    generated. The same CPM mode check used in the initialize is applied to the
    free as well.

    Tested on 2.6.33 with the previous spi_mpc8xxx driver. The renamed
    spi-fsl-spi driver looks to have the same problem.

    Signed-off-by: Jeff Harris
    Signed-off-by: Grant Likely

    Jeff Harris
     
  • sector_t can be different types, so cast it to its largest possible
    type.

    drivers/scsi/qla2xxx/qla_isr.c:1509:5: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'sector_t'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • SCSI_ISCI needs to select SCSI_SAS_HOST_SMP to ensure that all
    needed symbols are available to it.

    Fixes this build error:

    ERROR: "try_test_sas_gpio_gp_bit" [drivers/scsi/isci/isci.ko] undefined!

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • * 'perf-tools-for-linus' of git://github.com/acmel/linux:
    perf python: Add missing perf_event__parse_sample 'swapped' parm

    Linus Torvalds
     
  • * 'perf-tools-for-linus' of git://github.com/acmel/linux:
    perf tools: Add support for disabling -Werror via WERROR=0
    perf top: Fix userspace sample addr map offset
    perf symbols: Fix issue with binaries using 16-bytes buildids (v2)
    perf tool: Fix endianness handling of u32 data in samples
    perf sort: Fix symbol sort output by separating unresolved samples by type
    perf symbols: Synthesize anonymous mmap events
    perf record: Create events initially disabled and enable after init
    perf symbols: Add some heuristics for choosing the best duplicate symbol
    perf symbols: Preserve symbol scope when parsing /proc/kallsyms
    perf symbols: /proc/kallsyms does not sort module symbols
    perf symbols: Fix ppc64 SEGV in dso__load_sym with debuginfo files
    perf probe: Fix regression of variable finder

    Linus Torvalds
     
  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/radeon/kms: fix DDIA enable on some rs690 systems
    Revert "drm/radeon/kms: fix typo in r100_blit_copy"

    Linus Torvalds
     
  • * 'for-linus' of git://github.com/tiwai/sound:
    ALSA: usb-audio - clear chip->probing on error exit
    ALSA: fm801: Gracefully handle failure of tuner auto-detect
    ALSA: fm801: Fix double free in case of error in tuner detection
    ASoC: Ensure we generate a driver name
    ASoC: Remove bitrotted wm8962_resume()
    ASoC: bf5xx-ad73311: Fix prototype for bf5xx_probe

    Linus Torvalds
     
  • Problem introduced in 936be50, that missed one perf_event__parse_sample
    user, the python binding.

    Reported-by: Linus Torvalds
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-ja4phms9618ggi657plyuch2@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • The only caller of the function obtained the pointer solely for the
    purpose of passing it to this function, while it can be easily
    determined from the struct platform_device * parameter also passed.

    Signed-off-by: Jan Beulich
    Signed-off-by: Guenter Roeck

    Jan Beulich
     
  • These arrays won't ever be written to, so protect them from
    unintentional modification.

    Signed-off-by: Jan Beulich
    Signed-off-by: Guenter Roeck

    Jan Beulich
     
  • ... as that has the potential to conflict with (particularly soft) CPU
    hot removal and re-adding.

    Signed-off-by: Jan Beulich
    [guenter.roeck@ericsson.com: use platform device ID as physical CPU id]
    Signed-off-by: Guenter Roeck

    Jan Beulich
     
  • GCC often introduces new warnings with lots of false positives -
    breaking -Werror builds. WERROR=0 allows one to build perf without much
    fuss - while still encouraging people to send patches to avoid the fuss
    of having to type WERROR=0.

    Bisecting back to commits that produce a (mostly harmless) warning on
    some compilers is more difficult. With WERROR=0 one could bisect without
    worrying about harmless warnings.

    Cc: Ingo Molnar
    Link: http://lkml.kernel.org/r/eac06c7cc4920e5d4830417d466161fb26c7359c.1315514559.git.dvhart@linux.intel.com
    Signed-off-by: Darren Hart
    Signed-off-by: Arnaldo Carvalho de Melo

    Darren Hart
     
  • The 'perf top' tool came from the kernel where we had each DSO (vmlinux,
    modules) loaded just once at a time.

    But userspace may have DSOs loaded in multiple addresses (shared
    libraries), requiring that we use the just resolved map instead of the
    first one found.

    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-ag53wz0yllpgers0n2w7hchp@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Buildid can vary in size. According to the man page of ld, buildid can
    be 160 bits (sha1) or 128 bits (md5, uuid). Perf assumes buildid size of
    20 bytes (160 bits) regardless. When dealing with md5 buildids, it would
    thus read more than needed and that would cause mismatches and samples
    without symbols.

    This patch fixes this by taking into account the actual buildid size as
    encoded int he section header. The leftover bytes are also cleared.

    This second version fixes a minor issue with the memset() base position.

    Cc: David S. Miller
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/4cc1af3c.8ee7d80a.5a28.ffff868e@mx.google.com
    Signed-off-by: Stephane Eranian
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     
  • Currently, analyzing PPC data files on x86 the cpu field is always 0 and
    the tid and pid are backwards. For example, analyzing a PPC file on PPC
    the pid/tid fields show:

    rsyslogd 1210/1212

    and analyzing the same PPC file using an x86 perf binary shows:

    rsyslogd 1212/1210

    The problem is that the swap_op method for samples is
    perf_event__all64_swap which assumes all elements in the sample_data
    struct are u64s. cpu, tid and pid are u32s and need to be handled
    individually. Given that the swap is done before the sample is parsed,
    the simplest solution is to undo the 64-bit swap of those elements when
    the sample is parsed and do the proper swap.

    The RAW data field is generic and perf cannot have programmatic knowledge
    of how to treat that data. Instead a warning is given to the user.

    Thanks to Anton Blanchard for providing a data file for a mult-CPU
    PPC system so I could verify the fix for the CPU fields.

    v3 -> v4:
    - fixed use of WARN_ONCE

    v2 -> v3:
    - used WARN_ONCE for message regarding raw data
    - removed struct wrapper around union
    - fixed whitespace issues

    v1 -> v2:
    - added a union for undoing the byte-swap on u64 and redoing swap on
    u32's to address compiler errors (see git commit 65014ab3)

    Cc: Anton Blanchard
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1315321946-16993-1-git-send-email-dsahern@gmail.com
    Signed-off-by: David Ahern
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • I took a profile that suggested 60% of total CPU time was in the
    hypervisor:

    ...
    60.20% [H] 0x33d43c
    4.43% [k] ._spin_lock_irqsave
    1.07% [k] ._spin_lock

    Using perf stat to get the user/kernel/hypervisor breakdown contradicted
    this.

    The problem is we merge all unresolved samples into the one unknown
    bucket. If add a comparison by sample type to sort__sym_cmp we get the
    real picture:

    ...
    57.11% [.] 0x80fbf63c
    4.43% [k] ._spin_lock_irqsave
    1.07% [k] ._spin_lock
    0.65% [H] 0x33d43c

    So it was almost all userspace, not hypervisor as the initial profile
    suggested.

    I found another issue while adding this. Symbol sorting sometimes shows
    multiple entries for the unknown bucket:

    ...
    16.65% [.] 0x6cd3a8
    7.25% [.] 0x422460
    5.37% [.] yylex
    4.79% [.] malloc
    4.78% [.] _int_malloc
    4.03% [.] _int_free
    3.95% [.] hash_source_code_string
    2.82% [.] 0x532908
    2.64% [.] 0x36b538
    0.94% [H] 0x8000000000e132a4
    0.82% [H] 0x800000000000e8b0

    This happens because we aren't consistent with our sorting. On
    one hand we check to see if both symbols match and for two unresolved
    samples sym is NULL so we match:

    if (left->ms.sym == right->ms.sym)
    return 0;

    On the other hand we use sample IP for unresolved samples when
    comparing against a symbol:

    ip_l = left->ms.sym ? left->ms.sym->start : left->ip;
    ip_r = right->ms.sym ? right->ms.sym->start : right->ip;

    This means unresolved samples end up spread across the rbtree and we
    can't merge them all.

    If we use cmp_null all unresolved samples will end up in the one bucket
    and the output makes more sense:

    ...
    39.12% [.] 0x36b538
    5.37% [.] yylex
    4.79% [.] malloc
    4.78% [.] _int_malloc
    4.03% [.] _int_free
    3.95% [.] hash_source_code_string
    2.26% [H] 0x800000000000e8b0

    Acked-by: Eric B Munson
    Cc: Eric B Munson
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Ian Munsie
    Link: http://lkml.kernel.org/r/20110831115145.4f598ab2@kryten
    Signed-off-by: Anton Blanchard
    Signed-off-by: Arnaldo Carvalho de Melo

    Anton Blanchard
     
  • perf_event__synthesize_mmap_events does not create anonymous mmap events
    even though the kernel does. As a result an already running application
    with dynamically created code will not get profiled - all samples end up
    in the unknown bucket.

    This patch skips any entries with '[' in the name to avoid adding events
    for special regions (eg the vsyscall page). All other executable mmaps
    are assumed to be anonymous and an event is synthesized.

    Acked-by: Pekka Enberg
    Cc: Eric B Munson
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Pekka Enberg
    Link: http://lkml.kernel.org/r/20110830091506.60b51fe8@kryten
    Signed-off-by: Anton Blanchard
    Signed-off-by: Arnaldo Carvalho de Melo

    Anton Blanchard
     
  • perf-record currently creates events enabled. When doing a system wide
    collection (-a arg) this causes data collection for perf's
    initialization activities -- eg., perf_event__synthesize_threads().

    For some events (e.g., context switch S/W event or tracepoints like
    syscalls) perf's initialization causes a lot of events to be captured
    frequently generating "Check IO/CPU overload!" warnings on larger
    systems (e.g., 2 socket, quad core, hyperthreading).

    perf's initialization phase can be skipped by creating events
    disabled and then enabling them once the initialization is done.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1314289075-14706-1-git-send-email-dsahern@gmail.com
    Signed-off-by: David Ahern
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • Try and pick the best symbol based on a few heuristics:

    - Prefer a non weak symbol over a weak one
    - Prefer a global symbol over a non global one
    - Prefer a symbol with less underscores (idea taken from kallsyms.c)
    - If all else fails, choose the symbol with the longest name

    Cc: Eric B Munson
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110824065243.161953371@samba.org
    Signed-off-by: Anton Blanchard
    Signed-off-by: Arnaldo Carvalho de Melo

    Anton Blanchard
     
  • kallsyms__parse capitalises the symbol type, so every symbol is marked
    global. Remove this and fix symbol_type__is_a to handle both local and
    global symbols.

    Cc: Eric B Munson
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110824065243.077125989@samba.org
    Signed-off-by: Anton Blanchard
    Signed-off-by: Arnaldo Carvalho de Melo

    Anton Blanchard
     
  • kallsyms__parse assumes that /proc/kallsyms is sorted and sets the end
    of the previous symbol to the start of the current one.

    Unfortunately module symbols are not sorted, eg:

    ffffffffa0081f30 t e1000_clean_rx_irq [e1000e]
    ffffffffa00817a0 t e1000_alloc_rx_buffers [e1000e]

    Some symbols end up with a negative length and others have a length
    larger than they should. This results in confusing perf output.

    We already have a function to fixup the end of zero length symbols so
    use that instead.

    Cc: Eric B Munson
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110824065242.969681349@samba.org
    Signed-off-by: Anton Blanchard
    Signed-off-by: Arnaldo Carvalho de Melo

    Anton Blanchard
     
  • 64bit PowerPC debuginfo files have an empty function descriptor section.
    I hit a SEGV when perf tried to use this section for symbol resolution.

    To fix this we need to check the section is valid and we can do this by
    checking for type SHT_PROGBITS.

    Cc:
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Eric B Munson
    Link: http://lkml.kernel.org/r/20110824065242.895239970@samba.org
    Signed-off-by: Anton Blanchard
    Signed-off-by: Arnaldo Carvalho de Melo

    Anton Blanchard
     
  • Fix to call convert_variable() if previous call does not fail.

    To call convert_variable, it ensures "ret" is 0. However, since
    "ret" has the return value of synthesize_perf_probe_arg() which
    always returns positive value if it succeeded, perf probe doesn't
    call convert_variable(). This will cause a SEGV when we add an
    event with arguments.

    This has to be fixed as it ensures "ret" is greater than 0
    (or not negative).

    This regression has been introduced by my previous patch, f182e3e1.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Pekka Enberg
    Cc: Peter Zijlstra
    Cc: yrl.pp-manager.tt@hitachi.com
    Link: http://lkml.kernel.org/r/20110820053922.3286.65805.stgit@fedora15
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Arnaldo Carvalho de Melo

    Masami Hiramatsu