1. 15 Oct, 2022 5 commits
  2. 14 Oct, 2022 10 commits
    • Rob Herring's avatar
      perf: Skip and warn on unknown format 'configN' attrs · e552b7be
      Rob Herring authored
      If the kernel exposes a new perf_event_attr field in a format attr, perf
      will return an error stating the specified PMU can't be found. For
      example, a format attr with 'config3:0-63' causes an error as config3 is
      unknown to perf. This causes a compatibility issue between a newer
      kernel with older perf tool.
      
      Before this change with a kernel adding 'config3' I get:
      
        $ perf record -e arm_spe// -- true
        event syntax error: 'arm_spe//'
                             \___ Cannot find PMU `arm_spe'. Missing kernel support?
        Run 'perf list' for a list of valid events
      
         Usage: perf record [<options>] [<command>]
            or: perf record [<options>] -- <command> [<options>]
      
            -e, --event <event>   event selector. use 'perf list' to list
        available events
      
      After this change, I get:
      
        $ perf record -e arm_spe// -- true
        WARNING: 'arm_spe_0' format 'inv_event_filter' requires 'perf_event_attr::config3' which is not supported by this version of perf!
        [ perf record: Woken up 2 times to write data ]
        [ perf record: Captured and wrote 0.091 MB perf.data ]
      
      To support unknown configN formats, rework the YACC implementation to
      pass any config[0-9]+ format to perf_pmu__new_format() to handle with a
      warning.
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Tested-by: default avatarLeo Yan <leo.yan@linaro.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20220914-arm-perf-tool-spe1-2-v2-v4-1-83c098e6212e@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e552b7be
    • Andi Kleen's avatar
      perf list: Fix metricgroups title message · 0cef141e
      Andi Kleen authored
        $ perf list metricgroups
      
      gives
      
        List of pre-defined events (to be used in -e):
      
        Metric Groups:
      
        Backend
        Bad
        BadSpec
      
      But that's incorrect of course because metric groups or metrics can only
      be specified with -M. So fix the message to say -e or -M
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Link: https://lore.kernel.org/r/20221004192634.998984-1-ak@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0cef141e
    • Namhyung Kim's avatar
      perf mem: Fix -C option behavior for perf mem record · 7d60fa2c
      Namhyung Kim authored
      The -C/--cpu option was maily for report but it also affected record as
      it ate the option.  So users needed to use "--" after perf mem record to
      pass the info to the perf record properly.
      
      Check if this option is set for record, and pass it to the actual perf
      record.
      
      Before)
        $ sudo perf --debug perf-event-open mem record -C 0 2>&1 | grep -a sys_perf_event_open
        ...
        sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 4
        sys_perf_event_open: pid -1  cpu 1  group_fd -1  flags 0x8 = 5
        sys_perf_event_open: pid -1  cpu 2  group_fd -1  flags 0x8 = 6
        sys_perf_event_open: pid -1  cpu 3  group_fd -1  flags 0x8 = 7
        sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 8
        sys_perf_event_open: pid -1  cpu 1  group_fd -1  flags 0x8 = 9
        sys_perf_event_open: pid -1  cpu 2  group_fd -1  flags 0x8 = 10
        sys_perf_event_open: pid -1  cpu 3  group_fd -1  flags 0x8 = 11
        ...
      
      After)
        $ sudo perf --debug perf-event-open mem record -C 0 2>&1 | grep -a sys_perf_event_open
        ...
        sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 4
        sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 5
        sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 6
        sys_perf_event_open: pid -1  cpu 0  group_fd -1  flags 0x8 = 7
      Reported-by: default avatarRavi Bangoria <ravi.bangoria@amd.com>
      Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarLeo Yan <leo.yan@linaro.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20221004200211.1444521-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7d60fa2c
    • Namhyung Kim's avatar
      perf annotate: Add missing condition flags for arm64 · 531778b1
      Namhyung Kim authored
      According to the document [1], it can also have 'hs', 'lo', 'vc', 'vs' as a
      condition code.  Let's add them too.
      
      [1] https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/condition-codes-1-condition-flags-and-codesReported-by: default avatarKevin Nomura <nomurak@google.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/r/20221006222232.266416-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      531778b1
    • Arnaldo Carvalho de Melo's avatar
      libperf: Do not include non-UAPI linux/compiler.h header · d5e57375
      Arnaldo Carvalho de Melo authored
      Its just for that __packed define, so use it expanded as __attribute__((packed)),
      like the other files in /usr/include do.
      
      This was problem was preventing building the libperf examples on ALT
      Linux and Fedora 35, fix it.
      Reported-by: default avatarVitaly Chikunov <vt@altlinux.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Dmitry Levin <ldv@altlinux.org
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lore.kernel.org/lkml/Y0lnpl2Ix7VljVDc@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d5e57375
    • James Clark's avatar
      perf test: Fix test_arm_coresight.sh failures on Juno · fe180a52
      James Clark authored
      This test commonly fails on Arm Juno because the instruction interval
      is large enough to miss generating any samples for Perf in system-wide
      mode.
      
      Fix this by lowering the interval until a comfortable number of Perf
      instructions are generated. The test is still quick to run because only
      a small amount of trace is gathered.
      
      Before:
      
        sudo ./perf test coresight -vvv
        ...
        Recording trace with system wide mode
        Looking at perf.data file for dumping branch samples:
        Looking at perf.data file for reporting branch samples:
        Looking at perf.data file for instruction samples:
        CoreSight system wide testing: FAIL
        ...
      
      After:
      
        sudo ./perf test coresight -vvv
        ...
        Recording trace with system wide mode
        Looking at perf.data file for dumping branch samples:
        Looking at perf.data file for reporting branch samples:
        Looking at perf.data file for instruction samples:
        CoreSight system wide testing: PASS
        ...
      Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: coresight@lists.linaro.org
      Link: https://lore.kernel.org/r/20221005140508.1537277-1-james.clark@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fe180a52
    • Namhyung Kim's avatar
      perf stat: Support old kernels for bperf cgroup counting · f21cb520
      Namhyung Kim authored
      The recent change in the cgroup will break the backward compatiblity in
      the BPF program.  It should support both old and new kernels using BPF
      CO-RE technique.
      
      Like the task_struct->__state handling in the offcpu analysis, we can
      check the field name in the cgroup struct.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: bpf@vger.kernel.org
      Cc: cgroups@vger.kernel.org
      Cc: zefan li <lizefan.x@bytedance.com>
      Link: http://lore.kernel.org/lkml/20221011052808.282394-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f21cb520
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2022-10-14' of git://anongit.freedesktop.org/drm/drm · 9c9155a3
      Linus Torvalds authored
      Pull more drm updates from Dave Airlie:
       "Round of fixes for the merge window stuff, bunch of amdgpu and i915
        changes, this should have the gcc11 warning fix, amongst other
        changes.
      
        amdgpu:
         - DC mutex fix
         - DC SubVP fixes
         - DCN 3.2.x fixes
         - DCN 3.1.x fixes
         - SDMA 6.x fixes
         - Enable DPIA for 3.1.4
         - VRR fixes
         - VRAM BO swapping fix
         - Revert dirty fb helper change
         - SR-IOV suspend/resume fixes
         - Work around GCC array bounds check fail warning
         - UMC 8.10 fixes
         - Misc fixes and cleanups
      
        i915:
         - Round to closest in g4x+ HDMI clock readout
         - Update MOCS table for EHL
         - Fix PSR_IMR/IIR field handling
         - Fix watermark calculations for gen12+/DG2 modifiers
         - Reject excessive dotclocks early
         - Fix revocation of non-persistent contexts
         - Handle migration for dpt
         - Fix display problems after resume
         - Allow control over the flags when migrating
         - Consider DG2_RC_CCS_CC when migrating buffers"
      
      * tag 'drm-next-2022-10-14' of git://anongit.freedesktop.org/drm/drm: (110 commits)
        drm/amd/display: Add HUBP surface flip interrupt handler
        drm/i915/display: consider DG2_RC_CCS_CC when migrating buffers
        drm/i915: allow control over the flags when migrating
        drm/amd/display: Simplify bool conversion
        drm/amd/display: fix transfer function passed to build_coefficients()
        drm/amd/display: add a license to cursor_reg_cache.h
        drm/amd/display: make virtual_disable_link_output static
        drm/amd/display: fix indentation in dc.c
        drm/amd/display: make dcn32_split_stream_for_mpc_or_odm static
        drm/amd/display: fix build error on arm64
        drm/amd/display: 3.2.207
        drm/amd/display: Clean some DCN32 macros
        drm/amdgpu: Add poison mode query for umc v8_10_0
        drm/amdgpu: Update umc v8_10_0 headers
        drm/amdgpu: fix coding style issue for mca notifier
        drm/amdgpu: define convert_error_address for umc v8.7
        drm/amdgpu: define RAS convert_error_address API
        drm/amdgpu: remove check for CE in RAS error address query
        drm/i915: Fix display problems after resume
        drm/amd/display: fix array-bounds error in dc_stream_remove_writeback() [take 2]
        ...
      9c9155a3
    • Linus Torvalds's avatar
      Merge tag 'block-6.1-2022-10-13' of git://git.kernel.dk/linux · a521fc3c
      Linus Torvalds authored
      Pull more block updates from Jens Axboe:
       "Fixes that ended up landing later than the initial block pull request.
        Nothing really major in here:
      
         - NVMe pull request via Christoph:
              - add NVME_QUIRK_BOGUS_NID for Lexar NM760 (Abhijit)
              - add NVME_QUIRK_NO_DEEPEST_PS to avoid the deepest sleep state
                on ZHITAI TiPro5000 SSDs (Xi Ruoyao)
              - fix possible hang caused during ctrl deletion (Sagi Grimberg)
              - fix possible hang in live ns resize with ANA access (Sagi
                Grimberg)
      
         - Proactively avoid a sign extension issue with the queue flags
           (Brian)
      
         - Regression fix for hidden disks (Christoph)
      
         - Update OPAL maintainers entry (Jonathan)
      
         - blk-wbt regression initialization fix (Yu)"
      
      * tag 'block-6.1-2022-10-13' of git://git.kernel.dk/linux:
        nvme-multipath: fix possible hang in live ns resize with ANA access
        nvme-pci: avoid the deepest sleep state on ZHITAI TiPro5000 SSDs
        nvme-pci: add NVME_QUIRK_BOGUS_NID for Lexar NM760
        nvme-tcp: fix possible hang caused during ctrl deletion
        nvme-rdma: fix possible hang caused during ctrl deletion
        block: fix leaking minors of hidden disks
        block: avoid sign extend problem with default queue flags mask
        blk-wbt: fix that 'rwb->wc' is always set to 1 in wbt_init()
        block: Remove the repeat word 'can'
        MAINTAINERS: Update SED-Opal Maintainers
      a521fc3c
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.1-2022-10-13' of git://git.kernel.dk/linux · c98c70ed
      Linus Torvalds authored
      Pull more io_uring updates from Jens Axboe:
       "A collection of fixes that ended up either being later than the
        initial pull, or dependent on multiple branches (6.0-late being one of
        them) and hence deferred purposely. This contains:
      
         - Cleanup fixes for the single submitter late 6.0 change, which we
           pushed to 6.1 to keep the 6.0 changes small (Dylan, Pavel)
      
         - Fix for IORING_OP_CONNECT not handling -EINPROGRESS correctly (me)
      
         - Ensure that the zc sendmsg variant gets audited correctly (me)
      
         - Regression fix from this merge window where kiocb_end_write()
           doesn't always gets called, which can cause issues with fs freezing
           (me)
      
         - Registered files SCM handling fix (Pavel)
      
         - Regression fix for big sqe dumping in fdinfo (Pavel)
      
         - Registered buffers accounting fix (Pavel)
      
         - Remove leftover notification structures, we killed them off late in
           6.0 (Pavel)
      
         - Minor optimizations (Pavel)
      
         - Cosmetic variable shadowing fix (Stefan)"
      
      * tag 'io_uring-6.1-2022-10-13' of git://git.kernel.dk/linux:
        io_uring/rw: ensure kiocb_end_write() is always called
        io_uring: fix fdinfo sqe offsets calculation
        io_uring: local variable rw shadows outer variable in io_write
        io_uring/opdef: remove 'audit_skip' from SENDMSG_ZC
        io_uring: optimise locking for local tw with submit_wait
        io_uring: remove redundant memory barrier in io_req_local_work_add
        io_uring/net: handle -EINPROGRESS correct for IORING_OP_CONNECT
        io_uring: remove notif leftovers
        io_uring: correct pinned_vm accounting
        io_uring/af_unix: defer registered files gc to io_uring release
        io_uring: limit registration w/ SINGLE_ISSUER
        io_uring: remove io_register_submitter
        io_uring: simplify __io_uring_add_tctx_node
      c98c70ed
  3. 13 Oct, 2022 25 commits