1. 16 Nov, 2022 13 commits
  2. 15 Nov, 2022 8 commits
    • Ian Rogers's avatar
      perf pmu: Restructure print_pmu_events() to avoid memory allocations · eb2d4514
      Ian Rogers authored
      Previously print_pmu_events() would compute the values to be printed,
      place them in struct sevent, sort them and then print them.
      
      Modify the code so that struct sevent holds just the PMU and event, sort
      these and then in the main print loop calculate aliases for names, etc.
      
      This avoids memory allocations for copied values as they are computed
      then printed.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xin Gao <gaoxin@cdjrlc.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: http://lore.kernel.org/lkml/20221114210723.2749751-9-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      eb2d4514
    • Ian Rogers's avatar
      perf list: Simplify symbol event printing · de3752a7
      Ian Rogers authored
      The current code computes an array of symbol names then sorts and prints
      them. Use a strlist to create a list of names that is sorted and then
      print it.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xin Gao <gaoxin@cdjrlc.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: http://lore.kernel.org/lkml/20221114210723.2749751-8-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      de3752a7
    • Ian Rogers's avatar
      perf list: Simplify cache event printing · 3301b3fe
      Ian Rogers authored
      The current code computes an array of cache names then sorts and prints
      them. Use a strlist to create a list of names that is sorted. Keep the
      hybrid names, it is unclear how to generalize it, but drop the
      computation of evt_pmus that is never used.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kang Minchul <tegongkang@gmail.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xin Gao <gaoxin@cdjrlc.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: http://lore.kernel.org/lkml/20221114210723.2749751-7-irogers@google.com
      [ Fixed up clash with cf9f67b3 ("perf print-events: Remove redundant comparison with zero")]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3301b3fe
    • Ian Rogers's avatar
      perf list: Generalize limiting to a PMU name · ca0fe624
      Ian Rogers authored
      Deprecate the --cputype option and add a --unit option where '--unit
      cpu_atom' behaves like '--cputype atom'. The --unit option can be used
      with arbitrary PMUs, for example:
      
      ```
      $ perf list --unit msr pmu
      
      List of pre-defined events (to be used in -e or -M):
      
        msr/aperf/                                         [Kernel PMU event]
        msr/cpu_thermal_margin/                            [Kernel PMU event]
        msr/mperf/                                         [Kernel PMU event]
        msr/pperf/                                         [Kernel PMU event]
        msr/smi/                                           [Kernel PMU event]
        msr/tsc/                                           [Kernel PMU event]
      ```
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xin Gao <gaoxin@cdjrlc.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: http://lore.kernel.org/lkml/20221114210723.2749751-6-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ca0fe624
    • Ian Rogers's avatar
      perf tracepoint: Sort events in iterator · d74060c0
      Ian Rogers authored
      In print_tracepoint_events() use tracing_events__scandir_alphasort() and
      scandir alphasort so that the subsystem and events are sorted and don't
      need a secondary qsort. Locally this results in the following change:
      
      ...
         ext4:ext4_zero_range                               [Tracepoint event]
      -  fib6:fib6_table_lookup                             [Tracepoint event]
         fib:fib_table_lookup                               [Tracepoint event]
      +  fib6:fib6_table_lookup                             [Tracepoint event]
         filelock:break_lease_block                         [Tracepoint event]
      ...
      
      ie fib6 now is after fib and not before it. This is more consistent
      with how numbers are more generally sorted, such as:
      
      ...
        syscalls:sys_enter_renameat                        [Tracepoint event]
        syscalls:sys_enter_renameat2                       [Tracepoint event]
      ...
      
      and so an improvement over the qsort approach.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xin Gao <gaoxin@cdjrlc.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: http://lore.kernel.org/lkml/20221114210723.2749751-5-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d74060c0
    • Ian Rogers's avatar
      tools lib api fs tracing_path: Add scandir alphasort · 1504b6f9
      Ian Rogers authored
      tracing_events__opendir() allows iteration over files in
      <debugfs>/tracing/events but with an arbitrary sort order.
      
      Add a scandir alternative where the results are alphabetically sorted.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xin Gao <gaoxin@cdjrlc.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: http://lore.kernel.org/lkml/20221114210723.2749751-4-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1504b6f9
    • Ian Rogers's avatar
      perf pmu: Add data structure documentation · fe13d43d
      Ian Rogers authored
      Add documentation to 'struct perf_pmu' and the associated structs of
      'perf_pmu_alias' and 'perf_pmu_format'.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xin Gao <gaoxin@cdjrlc.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: http://lore.kernel.org/lkml/20221114210723.2749751-3-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fe13d43d
    • Ian Rogers's avatar
      perf pmu: Remove mostly unused 'struct perf_pmu' 'is_hybrid' member · e5f4afbe
      Ian Rogers authored
      Replace usage with perf_pmu__is_hybrid().
      Suggested-by: default avatarKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@amd.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Weilin Wang <weilin.wang@intel.com>
      Cc: Xin Gao <gaoxin@cdjrlc.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: http://lore.kernel.org/lkml/20221114210723.2749751-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e5f4afbe
  3. 14 Nov, 2022 11 commits
  4. 13 Nov, 2022 3 commits
  5. 12 Nov, 2022 5 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · fef7fd48
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Three small fixes, all in drivers.
      
        The sas one is in an unlikely error leg, the debug one is to make it
        more standards conformant and the ibmvfc one is to fix a user visible
        bug where a failover could lose all paths to the device"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: scsi_debug: Make the READ CAPACITY response compliant with ZBC
        scsi: scsi_transport_sas: Fix error handling in sas_phy_add()
        scsi: ibmvfc: Avoid path failures during live migration
      fef7fd48
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · f95077ac
      Linus Torvalds authored
      Pull additional sound fix from Takashi Iwai:
       "A regression fix for the latest memalloc helper change"
      
      * tag 'sound-fix-6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: memalloc: Try dma_alloc_noncontiguous() at first
      f95077ac
    • Takashi Iwai's avatar
      ALSA: memalloc: Try dma_alloc_noncontiguous() at first · 9d8e536d
      Takashi Iwai authored
      The latest fix for the non-contiguous memalloc helper changed the
      allocation method for a non-IOMMU system to use only the fallback
      allocator.  This should have worked, but it caused a problem sometimes
      when too many non-contiguous pages are allocated that can't be treated
      by HD-audio controller.
      
      As a quirk workaround, go back to the original strategy: use
      dma_alloc_noncontiguous() at first, and apply the fallback only when
      it fails, but only for non-IOMMU case.
      
      We'll need a better fix in the fallback code as well, but this
      workaround should paper over most cases.
      
      Fixes: 9736a325 ("ALSA: memalloc: Don't fall back for SG-buffer with IOMMU")
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Link: https://lore.kernel.org/r/CAHk-=wgSH5ubdvt76gNwa004ooZAEJL_1Q-Fyw5M2FDdqL==dg@mail.gmail.com
      Link: https://lore.kernel.org/r/20221112084718.3305-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9d8e536d
    • Linus Torvalds's avatar
      Merge tag 'ata-6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata · 8f2975c2
      Linus Torvalds authored
      Pull ata fixes from Damien Le Moal:
       "Several libata generic code fixes for rc5:
      
         - Add missing translation of the SYNCHRONIZE CACHE 16 scsi command as
           this command is mandatory for host-managed ZBC drives.
      
           The lack of support for it in libata-scsi was causing issues with
           some passthrough applications using ZBC drives (from Shin'ichiro).
      
         - Fix the error path of libata-transport host, port, link and device
           attributes initialization (from Yingliang).
      
         - Prevent issuing new commands to a drive that is in the NCQ error
           state and undergoing recovery (From Niklas).
      
           This bug went unnoticed for a long time as commands issued to a
           drive in error state are aborted immediately and retried by the
           scsi layer, hiding the useless abort-and-retry sequence"
      
      * tag 'ata-6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
        ata: libata-core: do not issue non-internal commands once EH is pending
        ata: libata-transport: fix error handling in ata_tdev_add()
        ata: libata-transport: fix error handling in ata_tlink_add()
        ata: libata-transport: fix error handling in ata_tport_add()
        ata: libata-transport: fix double ata_host_put() in ata_tport_add()
        ata: libata-scsi: fix SYNCHRONIZE CACHE (16) command failure
      8f2975c2
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2022-11-11' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm · d7c2b1f6
      Linus Torvalds authored
      Pull misc hotfixes from Andrew Morton:
       "22 hotfixes.
      
        Eight are cc:stable and the remainder address issues which were
        introduced post-6.0 or which aren't considered serious enough to
        justify a -stable backport"
      
      * tag 'mm-hotfixes-stable-2022-11-11' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (22 commits)
        docs: kmsan: fix formatting of "Example report"
        mm/damon/dbgfs: check if rm_contexts input is for a real context
        maple_tree: don't set a new maximum on the node when not reusing nodes
        maple_tree: fix depth tracking in maple_state
        arch/x86/mm/hugetlbpage.c: pud_huge() returns 0 when using 2-level paging
        fs: fix leaked psi pressure state
        nilfs2: fix use-after-free bug of ns_writer on remount
        x86/traps: avoid KMSAN bugs originating from handle_bug()
        kmsan: make sure PREEMPT_RT is off
        Kconfig.debug: ensure early check for KMSAN in CONFIG_KMSAN_WARN
        x86/uaccess: instrument copy_from_user_nmi()
        kmsan: core: kmsan_in_runtime() should return true in NMI context
        mm: hugetlb_vmemmap: include missing linux/moduleparam.h
        mm/shmem: use page_mapping() to detect page cache for uffd continue
        mm/memremap.c: map FS_DAX device memory as decrypted
        Partly revert "mm/thp: carry over dirty bit when thp splits on pmd"
        nilfs2: fix deadlock in nilfs_count_free_blocks()
        mm/mmap: fix memory leak in mmap_region()
        hugetlbfs: don't delete error page from pagecache
        maple_tree: reorganize testing to restore module testing
        ...
      d7c2b1f6