Skip to content
  1. Apr 12, 2017
  2. Apr 11, 2017
    • Taeung Song's avatar
      perf pmu: Refactor wordwrap() with ltrim() · aa4beb10
      Taeung Song authored
      
      
      Signed-off-by: default avatarTaeung Song <treeze.taeung@gmail.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1491575061-704-5-git-send-email-treeze.taeung@gmail.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      aa4beb10
    • Taeung Song's avatar
      perf ui browser: Refactor the code to parse color configs with ltrim() · e21600fd
      Taeung Song authored
      
      
      When parsing {fore, back} ground color configs, use ltrim() instead of
      just while loop and isspace().
      
      Signed-off-by: default avatarTaeung Song <treeze.taeung@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1491575061-704-4-git-send-email-treeze.taeung@gmail.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e21600fd
    • Taeung Song's avatar
      perf stat: Refactor the code to strip csv output with ltrim() · b07c40df
      Taeung Song authored
      
      
      To strip csv output, use ltrim() instead of just while loop and
      isspace() at print_metric_{only}_csv().
      
      Signed-off-by: default avatarTaeung Song <treeze.taeung@gmail.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/1491575061-704-3-git-send-email-treeze.taeung@gmail.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b07c40df
    • Jin Yao's avatar
      perf evsel: Return exact sub event which failed with EPERM for wildcards · 32ccb130
      Jin Yao authored
      
      
      The kernel has a special check for a specific irq_vectors trace event.
      
      TRACE_EVENT_PERF_PERM(irq_work_exit,
      	is_sampling_event(p_event) ? -EPERM : 0);
      
      The perf-record fails for this irq_vectors event when it is present,
      like when using a wildcard:
      
        root@skl:/tmp# perf record -a -e irq_vectors:* sleep 2
        Error:
        You may not have permission to collect system-wide stats.
      
        Consider tweaking /proc/sys/kernel/perf_event_paranoid,
        which controls use of the performance events system by
        unprivileged users (without CAP_SYS_ADMIN).
      
        The current value is 2:
      
          -1: Allow use of (almost) all events by all users
        >= 0: Disallow raw tracepoint access by users without CAP_IOC_LOCK
        >= 1: Disallow CPU event access by users without CAP_SYS_ADMIN
        >= 2: Disallow kernel profiling by users without CAP_SYS_ADMIN
      
        To make this setting permanent, edit /etc/sysctl.conf too, e.g.:
      
              kernel.perf_event_paranoid = -1
      
      This patch prints out the exact sub event that failed with EPERM for
      wildcards to help in understanding what went wrong when this event is
      present:
      
      After the patch:
      
        root@skl:/tmp# perf record -a -e irq_vectors:* sleep 2
        Error:
        No permission to enable irq_vectors:irq_work_exit event.
      
        You may not have permission to collect system-wide stats.
        ......
      
      Committer notes:
      
      So we have a lot of irq_vectors events:
      
        [root@jouet ~]# perf list irq_vectors:*
      
        List of pre-defined events (to be used in -e):
      
          irq_vectors:call_function_entry                    [Tracepoint event]
          irq_vectors:call_function_exit                     [Tracepoint event]
          irq_vectors:call_function_single_entry             [Tracepoint event]
          irq_vectors:call_function_single_exit              [Tracepoint event]
          irq_vectors:deferred_error_apic_entry              [Tracepoint event]
          irq_vectors:deferred_error_apic_exit               [Tracepoint event]
          irq_vectors:error_apic_entry                       [Tracepoint event]
          irq_vectors:error_apic_exit                        [Tracepoint event]
          irq_vectors:irq_work_entry                         [Tracepoint event]
          irq_vectors:irq_work_exit                          [Tracepoint event]
          irq_vectors:local_timer_entry                      [Tracepoint event]
          irq_vectors:local_timer_exit                       [Tracepoint event]
          irq_vectors:reschedule_entry                       [Tracepoint event]
          irq_vectors:reschedule_exit                        [Tracepoint event]
          irq_vectors:spurious_apic_entry                    [Tracepoint event]
          irq_vectors:spurious_apic_exit                     [Tracepoint event]
          irq_vectors:thermal_apic_entry                     [Tracepoint event]
          irq_vectors:thermal_apic_exit                      [Tracepoint event]
          irq_vectors:threshold_apic_entry                   [Tracepoint event]
          irq_vectors:threshold_apic_exit                    [Tracepoint event]
          irq_vectors:x86_platform_ipi_entry                 [Tracepoint event]
          irq_vectors:x86_platform_ipi_exit                  [Tracepoint event]
        #
      
      And some may be sampled:
      
        [root@jouet ~]# perf record -e irq_vectors:local* sleep 20s
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.020 MB perf.data (2 samples) ]
        [root@jouet ~]# perf report -D | egrep 'stats:|events:'
        Aggregated stats:
                   TOTAL events:        155
                    MMAP events:        144
                    COMM events:          2
                    EXIT events:          1
                  SAMPLE events:          2
                   MMAP2 events:          4
          FINISHED_ROUND events:          1
               TIME_CONV events:          1
        irq_vectors:local_timer_entry stats:
                   TOTAL events:          1
                  SAMPLE events:          1
        irq_vectors:local_timer_exit stats:
                   TOTAL events:          1
                  SAMPLE events:          1
        [root@jouet ~]#
      
      But, as shown in the tracepoint definition at the start of this message,
      some, like "irq_vectors:irq_work_exit", may not be sampled, just counted,
      i.e. if we try to sample, as when using 'perf record', we get an error:
      
        [root@jouet ~]# perf record -e irq_vectors:irq_work_exit
        Error:
        You may not have permission to collect system-wide stats.
      
        Consider tweaking /proc/sys/kernel/perf_event_paranoid,
      <SNIP>
      
      The error message is misleading, this patch will help in pointing out
      what is the event causing such an error, but the error message needs
      improvement, i.e. we need to figure out a way to check if a tracepoint
      is counting only, like this one, when all we can do is to count it with
      'perf stat', at most printing the delta using interval printing, as in:
      
         [root@jouet ~]# perf stat -I 5000 -e irq_vectors:irq_work_*
        #           time             counts unit events
             5.000168871                  0      irq_vectors:irq_work_entry
             5.000168871                  0      irq_vectors:irq_work_exit
            10.000676730                  0      irq_vectors:irq_work_entry
            10.000676730                  0      irq_vectors:irq_work_exit
            15.001122415                  0      irq_vectors:irq_work_entry
            15.001122415                  0      irq_vectors:irq_work_exit
            20.001298051                  0      irq_vectors:irq_work_entry
            20.001298051                  0      irq_vectors:irq_work_exit
            25.001485020                  1      irq_vectors:irq_work_entry
            25.001485020                  1      irq_vectors:irq_work_exit
            30.001658706                  0      irq_vectors:irq_work_entry
            30.001658706                  0      irq_vectors:irq_work_exit
        ^C    32.045711878                  0      irq_vectors:irq_work_entry
            32.045711878                  0      irq_vectors:irq_work_exit
      
        [root@jouet ~]#
      
      But at least, when we use a wildcard, this patch helps a bit.
      
      Signed-off-by: default avatarYao Jin <yao.jin@linux.intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1491566932-503-1-git-send-email-yao.jin@linux.intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      32ccb130
    • Arnaldo Carvalho de Melo's avatar
      perf script: Use strtok_r() when parsing output field list · 49346e85
      Arnaldo Carvalho de Melo authored
      Just avoiding non-reentrant functions.
      
      Cc: David Ahern <dsahern@gmail.com>
      Link: http://lkml.kernel.org/n/tip-eqytykipd74epzl9aexvppcg@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      49346e85
    • Arnaldo Carvalho de Melo's avatar
      perf callchains: Switch from strtok() to strtok_r() when parsing options · dadafc31
      Arnaldo Carvalho de Melo authored
      Trying to keep everything reentrant.
      
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/n/tip-rdce0p2k9e1b4qnrb8ki9mtf@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dadafc31
    • Borislav Petkov's avatar
      perf/amd/uncore: Fix pr_fmt() prefix · 9df9078e
      Borislav Petkov authored
      
      
      Make it "perf/amd/uncore: ", i.e., something more specific than "perf: ".
      
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Link: http://lkml.kernel.org/r/20170410122047.3026-4-bp@alien8.de
      
      
      [ Changed it to perf/amd/uncore/ ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      9df9078e
    • Borislav Petkov's avatar
      perf/amd/uncore: Clean up per-family setup · 68e80380
      Borislav Petkov authored
      
      
      Fam16h is the same as the default one, remove it. Turn the switch-case
      into a simple if-else.
      
      No functionality change.
      
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Link: http://lkml.kernel.org/r/20170410122047.3026-3-bp@alien8.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      68e80380
    • Borislav Petkov's avatar
      perf/amd/uncore: Do feature check first, before assignments · c2628f90
      Borislav Petkov authored
      
      
      ... and save some unnecessary work. Remove now unused label while at it.
      
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Link: http://lkml.kernel.org/r/20170410122047.3026-2-bp@alien8.de
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c2628f90
    • Ingo Molnar's avatar
      84b1e36a
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · c08e611b
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "This fixes a number of bugs in the caam driver:
      
         - device creation fails after release
      
         - error-path NULL-pointer dereference
      
         - spurious hardware error in RNG deinstantiation"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: caam - fix RNG deinstantiation error checking
        crypto: caam - fix invalid dereference in caam_rsa_init_tfm()
        crypto: caam - fix JR platform device subsequent (re)creations
      c08e611b
  3. Apr 10, 2017
    • Linus Torvalds's avatar
      Linux 4.11-rc6 · 39da7c50
      Linus Torvalds authored
      v4.11-rc6
      39da7c50
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · 84ced7fd
      Linus Torvalds authored
      Pull CIFS fixes from Steve French:
       "This is a set of CIFS/SMB3 fixes for stable.
      
        There is another set of four SMB3 reconnect fixes for stable in
        progress but they are still being reviewed/tested, so didn't want to
        wait any longer to send these five below"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
        Reset TreeId to zero on SMB2 TREE_CONNECT
        CIFS: Fix build failure with smb2
        Introduce cifs_copy_file_range()
        SMB3: Rename clone_range to copychunk_range
        Handle mismatched open calls
      84ced7fd
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm · 462e9a35
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A number of ARM fixes:
      
         - prevent oopses caused by dma_get_sgtable() and declared DMA
           coherent memory
      
         - fix boot failure on nommu caused by ID_PFR1 access
      
         - a number of kprobes fixes from Jon Medhurst and Masami Hiramatsu"
      
      * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 8665/1: nommu: access ID_PFR1 only if CPUID scheme
        ARM: dma-mapping: disallow dma_get_sgtable() for non-kernel managed memory
        arm: kprobes: Align stack to 8-bytes in test code
        arm: kprobes: Fix the return address of multiple kretprobes
        arm: kprobes: Skip single-stepping in recursing path if possible
        arm: kprobes: Allow to handle reentered kprobe on single-stepping
      462e9a35
    • Linus Torvalds's avatar
      Merge tag 'driver-core-4.11-rc6' of... · 5b50be74
      Linus Torvalds authored
      Merge tag 'driver-core-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fixes from Greg KH:
       "Here are 3 small fixes for 4.11-rc6.
      
        One resolves a reported issue with sysfs files that NeilBrown found,
        one is a documenatation fix for the stable kernel rules, and the last
        is a small MAINTAINERS file update for kernfs"
      
      * tag 'driver-core-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        MAINTAINERS: separate out kernfs maintainership
        sysfs: be careful of error returns from ops->show()
        Documentation: stable-kernel-rules: fix stable-tag format
      5b50be74
    • Linus Torvalds's avatar
      Merge tag 'staging-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 62e1fd08
      Linus Torvalds authored
      Pull staging/IIO driver rfixes from Greg KH:
       "Here are a number of small IIO and staging driver fixes for 4.11-rc6.
        Nothing big here, just iio fixes for reported issues, and an ashmem
        fix for a very old bug that has been reported by a number of Android
        vendors"
      
      * tag 'staging-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: android: ashmem: lseek failed due to no FMODE_LSEEK.
        iio: hid-sensor-attributes: Fix sensor property setting failure.
        iio: accel: hid-sensor-accel-3d: Fix duplicate scan index error
        iio: core: Fix IIO_VAL_FRACTIONAL_LOG2 for negative values
        iio: st_pressure: initialize lps22hb bootime
        iio: bmg160: reset chip when probing
        iio: cros_ec_sensors: Fix return value to get raw and calibbias data.
      62e1fd08
  4. Apr 09, 2017
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 2a610b8a
      Linus Torvalds authored
      Pull VFS fixes from Al Viro:
       "statx followup fixes and a fix for stack-smashing on alpha"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        alpha: fix stack smashing in old_adjtimex(2)
        statx: Include a mask for stx_attributes in struct statx
        statx: Reserve the top bit of the mask for future struct expansion
        xfs: report crtime and attribute flags to statx
        ext4: Add statx support
        statx: optimize copy of struct statx to userspace
        statx: remove incorrect part of vfs_statx() comment
        statx: reject unknown flags when using NULL path
        Documentation/filesystems: fix documentation for ->getattr()
      2a610b8a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 78d91a75
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Here's a pull request for 4.11-rc, fixing a set of issues mostly
        centered around the new scheduling framework. These have been brewing
        for a while, but split up into what we absolutely need in 4.11, and
        what we can defer until 4.12. These are well tested, on both single
        queue and multiqueue setups, and with and without shared tags. They
        fix several hangs that have happened in testing.
      
        This is obviously larger than I would have preferred at this point in
        time, but I don't think we can shave much off this and still get the
        desired results.
      
        In detail, this pull request contains:
      
         - a set of five fixes for NVMe, mostly from Christoph and one from
           Roland.
      
         - a series from Bart, fixing issues with dm-mq and SCSI shared tags
           and scheduling. Note that one of those patches commit messages may
           read like an optimization, but it is in fact an important fix for
           queue restarts in particular.
      
         - a series from Omar, most importantly fixing a hang with multiple
           hardware queues when we fail to get a driver tag. Another important
           fix in there is for resizing hardware queues, which nbd does when
           handling multiple sockets for one connection.
      
         - fixing an imbalance in putting the ctx for hctx request allocations
           from Minchan"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        blk-mq: Restart a single queue if tag sets are shared
        dm rq: Avoid that request processing stalls sporadically
        scsi: Avoid that SCSI queues get stuck
        blk-mq: Introduce blk_mq_delay_run_hw_queue()
        blk-mq: remap queues when adding/removing hardware queues
        blk-mq-sched: fix crash in switch error path
        blk-mq-sched: set up scheduler tags when bringing up new queues
        blk-mq-sched: refactor scheduler initialization
        blk-mq: use the right hctx when getting a driver tag fails
        nvmet: fix byte swap in nvmet_parse_io_cmd
        nvmet: fix byte swap in nvmet_execute_write_zeroes
        nvmet: add missing byte swap in nvmet_get_smart_log
        nvme: add missing byte swap in nvme_setup_discard
        nvme: Correct NVMF enum values to match NVMe-oF rev 1.0
        block: do not put mq context in blk_mq_alloc_request_hctx
      78d91a75
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v4.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · c3df1c7c
      Linus Torvalds authored
      Pull pin control fix from Linus Walleij:
       "This late fix for pin control is hopefully the last I send this cycle.
      
        The problem was detected early in the v4.11 release cycle and there
        has been some back and forth on how to solve it. Sadly the proper fix
        arrives late, but at least not too late.
      
        An issue was detected with pin control on the Freescale i.MX after the
        refactorings for more general group and function handling.
      
        We now have the proper fix for this"
      
      * tag 'pinctrl-v4.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()
      c3df1c7c