1. 26 May, 2022 30 commits
    • Namhyung Kim's avatar
      perf record: Implement basic filtering for off-cpu · 10742d0c
      Namhyung Kim authored
      It should honor cpu and task filtering with -a, -C or -p, -t options.
      
      Committer testing:
      
        # perf record --off-cpu --cpu 1 perf bench sched messaging -l 1000
        # Running 'sched/messaging' benchmark:
        # 20 sender and receiver processes per group
        # 10 groups == 400 processes run
      
             Total time: 1.722 [sec]
        [ perf record: Woken up 2 times to write data ]
        [ perf record: Captured and wrote 1.446 MB perf.data (7248 samples) ]
        #
        # perf script | head -20
                    perf 97164 [001] 38287.696761:          1      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97164 [001] 38287.696764:          1      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97164 [001] 38287.696765:          9      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97164 [001] 38287.696767:        212      cycles:  ffffffffb6070176 native_write_msr+0x6 (vmlinux)
                    perf 97164 [001] 38287.696768:       5130      cycles:  ffffffffb6070176 native_write_msr+0x6 (vmlinux)
                    perf 97164 [001] 38287.696770:     123063      cycles:  ffffffffb6e0011e syscall_return_via_sysret+0x38 (vmlinux)
                    perf 97164 [001] 38287.696803:    2292748      cycles:  ffffffffb636c82d __fput+0xad (vmlinux)
                 swapper     0 [001] 38287.702852:    1927474      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                  :97513 97513 [001] 38287.767207:    1172536      cycles:  ffffffffb612ff65 newidle_balance+0x5 (vmlinux)
                 swapper     0 [001] 38287.769567:    1073081      cycles:  ffffffffb618216d ktime_get_mono_fast_ns+0xd (vmlinux)
                  :97533 97533 [001] 38287.770962:     984460      cycles:  ffffffffb65b2900 selinux_socket_sendmsg+0x0 (vmlinux)
                  :97540 97540 [001] 38287.772242:     883462      cycles:  ffffffffb6d0bf59 irqentry_exit_to_user_mode+0x9 (vmlinux)
                 swapper     0 [001] 38287.773633:     741963      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                  :97552 97552 [001] 38287.774539:     606680      cycles:  ffffffffb62eda0a page_add_file_rmap+0x7a (vmlinux)
                  :97556 97556 [001] 38287.775333:     502254      cycles:  ffffffffb634f964 get_obj_cgroup_from_current+0xc4 (vmlinux)
                  :97561 97561 [001] 38287.776163:     427891      cycles:  ffffffffb61b1522 cgroup_rstat_updated+0x22 (vmlinux)
                 swapper     0 [001] 38287.776854:     359030      cycles:  ffffffffb612fc5e load_balance+0x9ce (vmlinux)
                  :97567 97567 [001] 38287.777312:     330371      cycles:  ffffffffb6a8d8d0 skb_set_owner_w+0x0 (vmlinux)
                  :97566 97566 [001] 38287.777589:     311622      cycles:  ffffffffb614a7a8 native_queued_spin_lock_slowpath+0x148 (vmlinux)
                  :97512 97512 [001] 38287.777671:     307851      cycles:  ffffffffb62e0f35 find_vma+0x55 (vmlinux)
        #
        # perf record --off-cpu --cpu 4 perf bench sched messaging -l 1000
        # Running 'sched/messaging' benchmark:
        # 20 sender and receiver processes per group
        # 10 groups == 400 processes run
      
             Total time: 1.613 [sec]
        [ perf record: Woken up 2 times to write data ]
        [ perf record: Captured and wrote 1.415 MB perf.data (6729 samples) ]
        # perf script | head -20
                    perf 97650 [004] 38323.728036:          1      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97650 [004] 38323.728040:          1      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97650 [004] 38323.728041:          9      cycles:  ffffffffb6070174 native_write_msr+0x4 (vmlinux)
                    perf 97650 [004] 38323.728042:        208      cycles:  ffffffffb6070176 native_write_msr+0x6 (vmlinux)
                    perf 97650 [004] 38323.728044:       5026      cycles:  ffffffffb6070176 native_write_msr+0x6 (vmlinux)
                    perf 97650 [004] 38323.728046:     119970      cycles:  ffffffffb6d0bebc syscall_exit_to_user_mode+0x1c (vmlinux)
                    perf 97650 [004] 38323.728078:    2190103      cycles:            54b756 perf_tool__process_synth_event+0x16 (/home/acme/bin/perf)
                 swapper     0 [004] 38323.783357:    1593139      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                 swapper     0 [004] 38323.785352:    1593139      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                 swapper     0 [004] 38323.797330:    1418936      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                 swapper     0 [004] 38323.802350:    1418936      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                 swapper     0 [004] 38323.806333:    1418936      cycles:  ffffffffb6761378 mwait_idle_with_hints.constprop.0+0x48 (vmlinux)
                  :97996 97996 [004] 38323.807145:    1418936      cycles:      7f5db9be6917 [unknown] ([unknown])
                  :97959 97959 [004] 38323.807730:    1445074      cycles:  ffffffffb6329d36 memcg_slab_post_alloc_hook+0x146 (vmlinux)
                  :97959 97959 [004] 38323.808103:    1341584      cycles:  ffffffffb62fd90f get_page_from_freelist+0x112f (vmlinux)
                  :97959 97959 [004] 38323.808451:    1227537      cycles:  ffffffffb65b2905 selinux_socket_sendmsg+0x5 (vmlinux)
                  :97959 97959 [004] 38323.808768:    1184321      cycles:  ffffffffb6d1ba35 _raw_spin_lock_irqsave+0x15 (vmlinux)
                  :97959 97959 [004] 38323.809073:    1153017      cycles:  ffffffffb6a8d92d skb_set_owner_w+0x5d (vmlinux)
                  :97959 97959 [004] 38323.809402:    1126875      cycles:  ffffffffb6329c64 memcg_slab_post_alloc_hook+0x74 (vmlinux)
                  :97959 97959 [004] 38323.809695:    1073248      cycles:  ffffffffb6e0001d entry_SYSCALL_64+0x1d (vmlinux)
        #
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220518224725.742882-4-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      10742d0c
    • Namhyung Kim's avatar
      perf record: Enable off-cpu analysis with BPF · edc41a10
      Namhyung Kim authored
      Add --off-cpu option to enable the off-cpu profiling with BPF.  It'd
      use a bpf_output event and rename it to "offcpu-time".  Samples will
      be synthesized at the end of the record session using data from a BPF
      map which contains the aggregated off-cpu time at context switches.
      So it needs root privilege to get the off-cpu profiling.
      
      Each sample will have a separate user stacktrace so it will skip
      kernel threads.  The sample ip will be set from the stacktrace and
      other sample data will be updated accordingly.  Currently it only
      handles some basic sample types.
      
      The sample timestamp is set to a dummy value just not to bother with
      other events during the sorting.  So it has a very big initial value
      and increase it on processing each samples.
      
      Good thing is that it can be used together with regular profiling like
      cpu cycles.  If you don't want to that, you can use a dummy event to
      enable off-cpu profiling only.
      
      Example output:
        $ sudo perf record --off-cpu perf bench sched messaging -l 1000
      
        $ sudo perf report --stdio --call-graph=no
        # Total Lost Samples: 0
        #
        # Samples: 41K of event 'cycles'
        # Event count (approx.): 42137343851
        ...
      
        # Samples: 1K of event 'offcpu-time'
        # Event count (approx.): 587990831640
        #
        # Children      Self  Command          Shared Object       Symbol
        # ........  ........  ...............  ..................  .........................
        #
            81.66%     0.00%  sched-messaging  libc-2.33.so        [.] __libc_start_main
            81.66%     0.00%  sched-messaging  perf                [.] cmd_bench
            81.66%     0.00%  sched-messaging  perf                [.] main
            81.66%     0.00%  sched-messaging  perf                [.] run_builtin
            81.43%     0.00%  sched-messaging  perf                [.] bench_sched_messaging
            40.86%    40.86%  sched-messaging  libpthread-2.33.so  [.] __read
            37.66%    37.66%  sched-messaging  libpthread-2.33.so  [.] __write
             2.91%     2.91%  sched-messaging  libc-2.33.so        [.] __poll
        ...
      
      As you can see it spent most of off-cpu time in read and write in
      bench_sched_messaging().  The --call-graph=no was added just to make
      the output concise here.
      
      It uses perf hooks facility to control BPF program during the record
      session rather than adding new BPF/off-cpu specific calls.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220518224725.742882-3-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      edc41a10
    • Namhyung Kim's avatar
      perf report: Do not extend sample type of bpf-output event · 303ead45
      Namhyung Kim authored
      Currently evsel__new_idx() sets more sample_type bits when it finds a
      BPF-output event.  But it should honor what's recorded in the perf
      data file rather than blindly sets the bits.  Otherwise it could lead
      to a parse error when it recorded with a modified sample_type.
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Blake Jones <blakejones@google.com>
      Cc: Hao Luo <haoluo@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: bpf@vger.kernel.org
      Link: https://lore.kernel.org/r/20220518224725.742882-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      303ead45
    • Claire Jensen's avatar
      perf test: Add checking for perf stat CSV output. · 7473ee56
      Claire Jensen authored
      Counts expected fields for various commands. No testing added for
      summary mode since it is broken.
      
      An example of the summary output is:
      
               summary,263831,,instructions:u,1435072,100.0,0.46,insn per cycle
      ,,,,,1.37,stalled cycles per insn
      
      This should be:
      
               summary,263831,,instructions:u,1435072,100.0,0.46,insn per cycle
               summary,,,,,,1.37,stalled cycles per insn
      
      The output has 7 fields when it should have 8. Additionally, the newline
      spacing is wrong, so it was excluded from testing until a fix is made.
      
      Committer testing:
      
        $ perf test "perf stat CSV output"
         88: perf stat CSV output linter                                     : Ok
        $
      
        $ perf test -v "perf stat CSV output"
        Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc
         88: perf stat CSV output linter                                     :
        --- start ---
        test child forked, pid 2622839
        Checking CSV output: no args [Success]
        Checking CSV output: system wide [Skip] paranoid and not root
        Checking CSV output: system wide [Skip] paranoid and not root
        Checking CSV output: interval [Success]
        Checking CSV output: event [Success]
        Checking CSV output: per core [Skip] paranoid and not root
        Checking CSV output: per thread [Skip] paranoid and not root
        Checking CSV output: per die [Skip] paranoid and not root
        Checking CSV output: per node [Skip] paranoid and not root
        Checking CSV output: per socket [Skip] paranoid and not root
        test child finished with 0
        ---- end ----
        perf stat CSV output linter: Ok
        $
      
      I did a s/parnoia/paranoid/g on the [Skip] lines.
      Signed-off-by: default avatarClaire Jensen <cjense@google.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alyssa Ross <hi@alyssa.is>
      Cc: Claire Jensen <clairej735@gmail.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Like Xu <likexu@tencent.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220525053814.3265216-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7473ee56
    • Adrian Hunter's avatar
      perf tools: Allow system-wide events to keep their own threads · a41e24f6
      Adrian Hunter authored
      System-wide events do not have threads, so do not propagate threads to
      them.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-16-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a41e24f6
    • Adrian Hunter's avatar
      perf tools: Allow system-wide events to keep their own CPUs · 298613b8
      Adrian Hunter authored
      Currently, user_requested_cpus supplants system-wide CPUs when the evlist
      has_user_cpus. Change that so that system-wide events retain their own
      CPUs and they are added to all_cpus.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-15-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      298613b8
    • Adrian Hunter's avatar
      libperf evsel: Add comments for booleans · f5fb6d4e
      Adrian Hunter authored
      Add comments for 'system_wide' and 'requires_cpu' booleans
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-14-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f5fb6d4e
    • Adrian Hunter's avatar
      perf stat: Add requires_cpu flag for uncore · d3345fec
      Adrian Hunter authored
      Uncore events require a CPU i.e. it cannot be -1.
      
      The evsel system_wide flag is intended for events that should be on every
      CPU, which does not make sense for uncore events because uncore events do
      not map one-to-one with CPUs.
      
      These 2 requirements are not exactly the same, so introduce a new flag
      'requires_cpu' for the uncore case.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-13-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d3345fec
    • Adrian Hunter's avatar
      libperf evlist: Check nr_mmaps is correct · 4ce47d84
      Adrian Hunter authored
      Print an error message if the predetermined number of mmaps is
      incorrect.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-12-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4ce47d84
    • Adrian Hunter's avatar
      libperf evlist: Allow mixing per-thread and per-cpu mmaps · ae4f8ae1
      Adrian Hunter authored
      mmap_per_evsel() will skip events that do not match the CPU, so all CPUs
      can be iterated in any case.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-11-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ae4f8ae1
    • Adrian Hunter's avatar
      perf tools: Allow all_cpus to be a superset of user_requested_cpus · 7be1fedd
      Adrian Hunter authored
      To support collection of system-wide events with user requested CPUs,
      all_cpus must be a superset of user_requested_cpus.
      
      In order to support all_cpus to be a superset of user_requested_cpus,
      all_cpus must be used instead of user_requested_cpus when dealing with CPUs
      of all events instead of CPUs of requested events.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-10-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7be1fedd
    • Adrian Hunter's avatar
      perf intel-pt: Track sideband system-wide when needed · 7d189cad
      Adrian Hunter authored
      User space tasks can migrate between CPUs, so when tracing selected CPUs,
      sideband for all CPUs is still needed. This is in preparation for allowing
      system-wide events on all CPUs while the user requested events are on only
      user requested CPUs.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-9-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7d189cad
    • Adrian Hunter's avatar
      perf intel-pt: Use evlist__add_dummy_on_all_cpus() for switch tracking · e665c82a
      Adrian Hunter authored
      Use evlist__add_dummy_on_all_cpus() for switch tracking in preparation for
      allowing system-wide events on all CPUs while the user requested events are
      on only user requested CPUs.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-8-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e665c82a
    • Adrian Hunter's avatar
      perf record: Use evlist__add_dummy_on_all_cpus() in record__config_text_poke() · 921e3be5
      Adrian Hunter authored
      Use evlist__add_dummy_on_all_cpus() in record__config_text_poke() in
      preparation for allowing system-wide events on all CPUs while the user
      requested events are on only user requested CPUs.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-7-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      921e3be5
    • Adrian Hunter's avatar
      perf evlist: Add evlist__add_dummy_on_all_cpus() · 126d68fd
      Adrian Hunter authored
      Add evlist__add_dummy_on_all_cpus() to enable creating a system-wide dummy
      event that sets up the system-wide maps before map propagation.
      
      For convenience, add evlist__add_aux_dummy() so that the logic can be used
      whether or not the event needs to be system-wide.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-6-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      126d68fd
    • Adrian Hunter's avatar
      perf evlist: Factor out evlist__dummy_event() · 82944899
      Adrian Hunter authored
      Factor out evlist__dummy_event() so it can be reused.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-5-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      82944899
    • Adrian Hunter's avatar
      perf auxtrace: Remove auxtrace_mmap_params__set_idx() per_cpu parameter · 84bd5aba
      Adrian Hunter authored
      Remove auxtrace_mmap_params__set_idx() per_cpu parameter because it isn't
      needed.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-4-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      84bd5aba
    • Adrian Hunter's avatar
      perf auxtrace: Add mmap_needed to auxtrace_mmap_params · d01508f2
      Adrian Hunter authored
      Add mmap_needed to auxtrace_mmap_params.
      
      Currently an auxtrace mmap is always attempted even if the event is not an
      auxtrace event. That works because, when AUX area tracing, there is always
      an auxtrace event first for every mmap. Prepare for that not being the
      case, which it won't be when sideband tracking events are allowed on
      all CPUs even when auxtrace is limited to selected CPUs.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-3-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d01508f2
    • Adrian Hunter's avatar
      perf intel-pt: Add a test for system-wide side band · 1097b38f
      Adrian Hunter authored
      Add a test for system-wide side band even when tracing selected CPUs.
      
      The test fails before the patches up to "perf tools: Allow system-wide
      events to keep their own CPUs" are applied, passes afterwards.
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Tested-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: https://lore.kernel.org/r/20220524075436.29144-2-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1097b38f
    • Arnaldo Carvalho de Melo's avatar
      perf build: Stop using __weak bpf_map_create() to handle older libbpf versions · df76e003
      Arnaldo Carvalho de Melo authored
      By adding a feature test for bpf_map_create() and providing a fallback if
      it isn't present in older versions of libbpf.
      
      This also fixes the build with torvalds/master at this point:
      
        $ git log --oneline -5 torvalds/master
        babf0bb9 (torvalds/master) Merge tag 'xfs-5.19-for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
        e375780b Merge tag 'fsnotify_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
        8b728edc Merge tag 'fs_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
        3f306ea2 Merge tag 'dma-mapping-5.19-2022-05-25' of git://git.infradead.org/users/hch/dma-mapping
        fbe86dac Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
        $
      
      Coping with:
      
        $ git log --oneline -2 d16495a9
        d16495a9 libbpf: remove bpf_create_map*() APIs
        e2371b16 libbpf: start 1.0 development cycle
        $
      
      As the __weak function fails to build as it calls the now removed
      bpf_create_map() API.
      
      Testing:
      
        $ rpm -q libbpf-devel
        libbpf-devel-0.4.0-2.fc35.x86_64
        $
        $ make -C tools/perf BUILD_BPF_SKEL=1 LIBBPF_DYNAMIC=1 O=/tmp/build/perf install-bin
        $ cat /tmp/build/perf/feature/test-libbpf-bpf_map_create.make.output
        test-libbpf-bpf_map_create.c: In function ‘main’:
        test-libbpf-bpf_map_create.c:6:16: error: implicit declaration of function ‘bpf_map_create’; did you mean ‘bpf_map_freeze’? [-Werror=implicit-function-declaration]
            6 |         return bpf_map_create(0 /* map_type */, NULL /* map_name */, 0, /* key_size */,
              |                ^~~~~~~~~~~~~~
              |                bpf_map_freeze
        test-libbpf-bpf_map_create.c:6:87: error: expected expression before ‘,’ token
            6 |         return bpf_map_create(0 /* map_type */, NULL /* map_name */, 0, /* key_size */,
              |                                                                                       ^
        cc1: all warnings being treated as errors
        $
        $ objdump -dS /tmp/build/perf/perf | grep '<bpf_map_create>:' -A20
        000000000058b290 <bpf_map_create>:
        {
          58b290:	55                   	push   %rbp
          58b291:	48 89 e5             	mov    %rsp,%rbp
          58b294:	48 83 ec 10          	sub    $0x10,%rsp
          58b298:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
          58b29f:	00 00
          58b2a1:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
          58b2a5:	31 c0                	xor    %eax,%eax
        	return bpf_create_map(map_type, key_size, value_size, max_entries, 0);
          58b2a7:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
          58b2ab:	64 48 2b 04 25 28 00 	sub    %fs:0x28,%rax
          58b2b2:	00 00
          58b2b4:	75 10                	jne    58b2c6 <bpf_map_create+0x36>
        }
          58b2b6:	c9                   	leave
          58b2b7:	89 d6                	mov    %edx,%esi
          58b2b9:	89 ca                	mov    %ecx,%edx
          58b2bb:	44 89 c1             	mov    %r8d,%ecx
        	return bpf_create_map(map_type, key_size, value_size, max_entries, 0);
          58b2be:	45 31 c0             	xor    %r8d,%r8d
        $
      
      Cc: Andrii Nakryiko <andrii@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/Yo+XvQNKL4K5khl2@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      df76e003
    • Jiri Olsa's avatar
      perf build: Stop using __weak btf__raw_data() to handle older libbpf versions · 982be477
      Jiri Olsa authored
      By adding a feature test for btf__raw_data() and providing a fallback if
      it isn't present in older versions of libbpf.
      
      Committer testing:
      
        $ rpm -q libbpf-devel
        libbpf-devel-0.4.0-2.fc35.x86_64
        $ make -C tools/perf LIBBPF_DYNAMIC=1 O=/tmp/build/perf install-bin
        $ cat /tmp/build/perf/feature/test-libbpf-btf__raw_data.make.output
        test-libbpf-btf__raw_data.c: In function ‘main’:
        test-libbpf-btf__raw_data.c:6:9: error: implicit declaration of function ‘btf__raw_data’; did you mean ‘btf__get_raw_data’? [-Werror=implicit-function-declaration]
            6 |         btf__raw_data(NULL /* btf_ro */, NULL /* size */);
              |         ^~~~~~~~~~~~~
              |         btf__get_raw_data
        cc1: all warnings being treated as errors
        $ objdump -dS /tmp/build/perf/perf | grep '<btf__raw_data>:' -A20
        00000000005b3050 <btf__raw_data>:
        {
          5b3050:	55                   	push   %rbp
          5b3051:	48 89 e5             	mov    %rsp,%rbp
          5b3054:	48 83 ec 10          	sub    $0x10,%rsp
          5b3058:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
          5b305f:	00 00
          5b3061:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
          5b3065:	31 c0                	xor    %eax,%eax
      	  return btf__get_raw_data(btf_ro, size);
          5b3067:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
          5b306b:	64 48 2b 04 25 28 00 	sub    %fs:0x28,%rax
          5b3072:	00 00
          5b3074:	75 06                	jne    5b307c <btf__raw_data+0x2c>
        }
          5b3076:	c9                   	leave
      	  return btf__get_raw_data(btf_ro, size);
          5b3077:	e9 14 99 e5 ff       	jmp    40c990 <btf__get_raw_data@plt>
          5b307c:	e8 af a7 e5 ff       	call   40d830 <__stack_chk_fail@plt>
          5b3081:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
          5b3088:	00 00 00 00
          $
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/YozLKby7ITEtchC9@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      982be477
    • Jiri Olsa's avatar
      perf build: Stop using __weak bpf_object__next_map() to handle older libbpf versions · 739c9180
      Jiri Olsa authored
      By adding a feature test for bpf_object__next_map() and providing a fallback if
      it isn't present in older versions of libbpf.
      
      Committer testing:
      
        $ rpm -q libbpf-devel
        libbpf-devel-0.4.0-2.fc35.x86_64
        $ make -C tools/perf LIBBPF_DYNAMIC=1 O=/tmp/build/perf install-bin
        $ cat /tmp/build/perf/feature/test-libbpf-bpf_object__next_map.make.output
        test-libbpf-bpf_object__next_map.c: In function ‘main’:
        test-libbpf-bpf_object__next_map.c:6:9: error: implicit declaration of function ‘bpf_object__next_map’; did you mean ‘bpf_object__next’? [-Werror=implicit-function-declaration]
            6 |         bpf_object__next_map(NULL /* obj */, NULL /* prev */);
              |         ^~~~~~~~~~~~~~~~~~~~
              |         bpf_object__next
          cc1: all warnings being treated as errors
        $
        $ objdump -dS /tmp/build/perf/perf | grep '<bpf_object__next_map>:' -A20
        00000000005b2e00 <bpf_object__next_map>:
        {
          5b2e00:	55                   	push   %rbp
          5b2e01:	48 89 e5             	mov    %rsp,%rbp
          5b2e04:	48 83 ec 10          	sub    $0x10,%rsp
          5b2e08:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
          5b2e0f:	00 00
          5b2e11:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
          5b2e15:	31 c0                	xor    %eax,%eax
      	  return bpf_map__next(prev, obj);
          5b2e17:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
          5b2e1b:	64 48 2b 04 25 28 00 	sub    %fs:0x28,%rax
          5b2e22:	00 00
          5b2e24:	75 0f                	jne    5b2e35 <bpf_object__next_map+0x35>
        }
          5b2e26:	c9                   	leave
          5b2e27:	49 89 f8             	mov    %rdi,%r8
          5b2e2a:	48 89 f7             	mov    %rsi,%rdi
      	  return bpf_map__next(prev, obj);
          5b2e2d:	4c 89 c6             	mov    %r8,%rsi
          5b2e30:	e9 cb b1 e5 ff       	jmp    40e000 <bpf_map__next@plt>
        $
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/YozLKby7ITEtchC9@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      739c9180
    • Jiri Olsa's avatar
      perf build: Stop using __weak bpf_object__next_program() to handle older libbpf versions · 8916d725
      Jiri Olsa authored
      By adding a feature test for bpf_object__next_program() and providing a fallback if
      it isn't present in older versions of libbpf.
      
      Committer testing:
      
        $ rpm -q libbpf-devel
        libbpf-devel-0.4.0-2.fc35.x86_64
        $ make -C tools/perf LIBBPF_DYNAMIC=1 O=/tmp/build/perf install-bin
        $ cat /tmp/build/perf/feature/test-libbpf-bpf_object__next_program.make.output
        test-libbpf-bpf_object__next_program.c: In function ‘main’:
        test-libbpf-bpf_object__next_program.c:6:9: error: implicit declaration of function ‘bpf_object__next_program’; did you mean ‘bpf_object__unpin_programs’? [-Werror=implicit-function-declaration]
            6 |         bpf_object__next_program(NULL /* obj */, NULL /* prev */);
              |         ^~~~~~~~~~~~~~~~~~~~~~~~
              |         bpf_object__unpin_programs
        cc1: all warnings being treated as errors
        $
        $ objdump -dS /tmp/build/perf/perf | grep '<bpf_object__next_program>:' -A20
        00000000005b2dc0 <bpf_object__next_program>:
        {
          5b2dc0:	55                   	push   %rbp
          5b2dc1:	48 89 e5             	mov    %rsp,%rbp
          5b2dc4:	48 83 ec 10          	sub    $0x10,%rsp
          5b2dc8:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
          5b2dcf:	00 00
          5b2dd1:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
          5b2dd5:	31 c0                	xor    %eax,%eax
      	  return bpf_program__next(prev, obj);
          5b2dd7:	48 8b 45 f8          	mov    -0x8(%rbp),%rax
          5b2ddb:	64 48 2b 04 25 28 00 	sub    %fs:0x28,%rax
          5b2de2:	00 00
          5b2de4:	75 0f                	jne    5b2df5 <bpf_object__next_program+0x35>
        }
          5b2de6:	c9                   	leave
          5b2de7:	49 89 f8             	mov    %rdi,%r8
          5b2dea:	48 89 f7             	mov    %rsi,%rdi
      	  return bpf_program__next(prev, obj);
          5b2ded:	4c 89 c6             	mov    %r8,%rsi
          5b2df0:	e9 3b b4 e5 ff       	jmp    40e230 <bpf_program__next@plt>
          $
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/YozLKby7ITEtchC9@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8916d725
    • Jiri Olsa's avatar
      perf build: Stop using __weak bpf_prog_load() to handle older libbpf versions · 5c83eff3
      Jiri Olsa authored
      By adding a feature test for bpf_prog_load() and providing a fallback if
      it isn't present in older versions of libbpf.
      
      Committer testing:
      
        $ rpm -q libbpf-devel
        libbpf-devel-0.4.0-2.fc35.x86_64
        $ make -C tools/perf LIBBPF_DYNAMIC=1 O=/tmp/build/perf install-bin
        $ cat /tmp/build/perf/feature/test-libbpf-bpf_prog_load.make.output
        test-libbpf-bpf_prog_load.c: In function ‘main’:
        test-libbpf-bpf_prog_load.c:6:16: error: implicit declaration of function ‘bpf_prog_load’ [-Werror=implicit-function-declaration]
            6 |         return bpf_prog_load(0 /* prog_type */, NULL /* prog_name */,
              |                ^~~~~~~~~~~~~
        cc1: all warnings being treated as errors
        $
      
        $ objdump -dS /tmp/build/perf/perf | grep '<bpf_prog_load>:' -A20
        00000000005b2d70 <bpf_prog_load>:
        {
          5b2d70:	55                   	push   %rbp
          5b2d71:	48 89 ce             	mov    %rcx,%rsi
          5b2d74:	4c 89 c8             	mov    %r9,%rax
          5b2d77:	49 89 d2             	mov    %rdx,%r10
          5b2d7a:	4c 89 c2             	mov    %r8,%rdx
          5b2d7d:	48 89 e5             	mov    %rsp,%rbp
          5b2d80:	48 83 ec 18          	sub    $0x18,%rsp
          5b2d84:	64 48 8b 0c 25 28 00 	mov    %fs:0x28,%rcx
          5b2d8b:	00 00
          5b2d8d:	48 89 4d f8          	mov    %rcx,-0x8(%rbp)
          5b2d91:	31 c9                	xor    %ecx,%ecx
        	return bpf_load_program(prog_type, insns, insn_cnt, license,
          5b2d93:	41 8b 49 5c          	mov    0x5c(%r9),%ecx
          5b2d97:	51                   	push   %rcx
          5b2d98:	4d 8b 49 60          	mov    0x60(%r9),%r9
          5b2d9c:	4c 89 d1             	mov    %r10,%rcx
          5b2d9f:	44 8b 40 1c          	mov    0x1c(%rax),%r8d
          5b2da3:	e8 f8 aa e5 ff       	call   40d8a0 <bpf_load_program@plt>
        }
        $
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/YozLKby7ITEtchC9@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5c83eff3
    • Jiri Olsa's avatar
      perf build: Fix btf__load_from_kernel_by_id() feature check · 73534617
      Jiri Olsa authored
      The btf__load_from_kernel_by_id() only takes one arg, not two.
      
      Committer notes:
      
      I tested it just with an older libbpf, one where
      btf__load_from_kernel_by_id() wasn't introduced yet.
      
      A test with a newer dynamic libbpf would fail because the
      btf__load_from_kernel_by_id() is there, but takes just one arg.
      
      Fixes: 0ae065a5 ("perf build: Fix check for btf__load_from_kernel_by_id() in libbpf")
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ilya Leoshkevich <iii@linux.ibm.com>
      Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
      Cc: Sven Schnelle <svens@linux.ibm.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Link: http://lore.kernel.org/linux-perf-users/YozLKby7ITEtchC9@kravaSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      73534617
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.19-for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · babf0bb9
      Linus Torvalds authored
      Pull xfs updates from Dave Chinner:
       "This is a big update with lots of new code. The summary below them
        all, so I'll just touch on teh higlights. The two main new features
        are Large Extent Counts and Logged Attribute Replay - these are two
        new foundational features that we are building more complex future
        features on top of.
      
        For upcoming functionality, we need to be able to store hundreds of
        millions of xattrs per inode. The Large Extent Count feature removes
        the limits that prevent this scale of xattr storage, and while we were
        modifying the on disk extent count format we also increased the number
        of data extents we support per inode from 2^32 to 2^47.
      
        We also need to be able to modify xattrs as part of larger atomic
        transactions rather than as standalone transactions. The Logged
        Attribute Replay feature introduces the infrastructure that allows us
        to use intents to record the attribute modifications in the journal
        before we start them, hence allowing other atomic transactions to log
        attribute modification intents and then defer the actual modification
        to later. If we then crash, log recovery then guarantees that the
        attribute is replayed in the context of the atomic transaction that
        logged the intent.
      
        A significant chunk of the commits in this merge are for the base
        attribute replay functionality along with fixes, improvements and
        cleanups related to this new functioanlity. Allison deserves a big
        round of thanks for her ongoing work to get this functionality into
        XFS.
      
        There are also many other smaller changes and improvements, so overall
        this is one of the bigger XFS merge requests in some time.
      
        I will be following up next week with another smaller pull request -
        we already have another round of fixes and improvements to the logged
        attribute replay functionality just about ready to go. They'll soak
        and test over the next week, and I'll send a pull request for them
        near the end of the merge window.
      
        Summary:
      
         - support for printk message indexing.
      
         - large extent counts to provide support for up to 2^47 data extents
           and 2^32 attribute extents, allowing us to scale beyond 4 billion
           data extents to billions of xattrs per inode.
      
         - conversion of various flags fields to be consistently declared as
           unsigned bit fields.
      
         - improvements to realtime extent accounting and converts them to
           per-cpu counters to match all the other block and inode accounting.
      
         - reworks core log formatting code to reduce iterations, have a
           shorter, cleaner fast path and generally be easier to understand
           and maintain.
      
         - improvements to rmap btree searches that reduce overhead by up to
           30% resulting in xfs_scrub runtime reductions of 15%.
      
         - improvements to reflink that remove the size limitations in
           remapping operations and greatly reduce the size of transaction
           reservations.
      
         - reworks the minimum log size calculations to allow us to change
           transaction reservations without changing the minimum supported log
           size.
      
         - removal of quota warning support as it has never been used on
           Linux.
      
         - intent whiteouts to allow us to cancel intents that are completed
           entirely in memory rather than having use CPU and disk bandwidth
           formatting and writing them into the journal when it is not
           necessary. This makes rmap, reflink and extent freeing slightly
           more efficient, but provides massive improvements for....
      
         - Logged Attribute Replay feature support. This is a fundamental
           change to the way we modify attributes, laying the foundation for
           future integration of attribute modifications as part of other
           atomic transactional operations the filesystem performs.
      
         - Lots of cleanups and fixes for the logged attribute replay
           functionality"
      
      * tag 'xfs-5.19-for-linus' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (124 commits)
        xfs: can't use kmem_zalloc() for attribute buffers
        xfs: detect empty attr leaf blocks in xfs_attr3_leaf_verify
        xfs: ATTR_REPLACE algorithm with LARP enabled needs rework
        xfs: use XFS_DA_OP flags in deferred attr ops
        xfs: remove xfs_attri_remove_iter
        xfs: switch attr remove to xfs_attri_set_iter
        xfs: introduce attr remove initial states into xfs_attr_set_iter
        xfs: xfs_attr_set_iter() does not need to return EAGAIN
        xfs: clean up final attr removal in xfs_attr_set_iter
        xfs: remote xattr removal in xfs_attr_set_iter() is conditional
        xfs: XFS_DAS_LEAF_REPLACE state only needed if !LARP
        xfs: split remote attr setting out from replace path
        xfs: consolidate leaf/node states in xfs_attr_set_iter
        xfs: kill XFS_DAC_LEAF_ADDNAME_INIT
        xfs: separate out initial attr_set states
        xfs: don't set quota warning values
        xfs: remove warning counters from struct xfs_dquot_res
        xfs: remove quota warning limit from struct xfs_quota_limits
        xfs: rework deferred attribute operation setup
        xfs: make xattri_leaf_bp more useful
        ...
      babf0bb9
    • Linus Torvalds's avatar
      Merge tag 'fsnotify_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · e375780b
      Linus Torvalds authored
      Pull fsnotify updates from Jan Kara:
       "The biggest part of this is support for fsnotify inode marks that
        don't pin inodes in memory but rather get evicted together with the
        inode (they are useful if userspace needs to exclude receipt of events
        from potentially large subtrees using fanotify ignore marks).
      
        There is also a fix for more consistent handling of events sent to
        parent and a fix of sparse(1) complaints"
      
      * tag 'fsnotify_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fanotify: fix incorrect fmode_t casts
        fsnotify: consistent behavior for parent not watching children
        fsnotify: introduce mark type iterator
        fanotify: enable "evictable" inode marks
        fanotify: use fsnotify group lock helpers
        fanotify: implement "evictable" inode marks
        fanotify: factor out helper fanotify_mark_update_flags()
        fanotify: create helper fanotify_mark_user_flags()
        fsnotify: allow adding an inode mark without pinning inode
        dnotify: use fsnotify group lock helpers
        nfsd: use fsnotify group lock helpers
        audit: use fsnotify group lock helpers
        inotify: use fsnotify group lock helpers
        fsnotify: create helpers for group mark_mutex lock
        fsnotify: make allow_dups a property of the group
        fsnotify: pass flags argument to fsnotify_alloc_group()
        fsnotify: fix wrong lockdep annotations
        inotify: move control flags from mask to mark flags
        inotify: show inotify mask flags in proc fdinfo
      e375780b
    • Linus Torvalds's avatar
      Merge tag 'fs_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 8b728edc
      Linus Torvalds authored
      Pull writeback and ext2 cleanups from Jan Kara:
       "One small ext2 cleanup and one writeback spelling fix"
      
      * tag 'fs_for_v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        writeback: fix typo in comment
        fs: ext2: Fix duplicate included linux/dax.h
      8b728edc
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-5.19-2022-05-25' of git://git.infradead.org/users/hch/dma-mapping · 3f306ea2
      Linus Torvalds authored
      Pull dma-mapping updates from Christoph Hellwig:
      
       - don't over-decrypt memory (Robin Murphy)
      
       - takes min align mask into account for the swiotlb max mapping size
         (Tianyu Lan)
      
       - use GFP_ATOMIC in dma-debug (Mikulas Patocka)
      
       - fix DMA_ATTR_NO_KERNEL_MAPPING on xen/arm (me)
      
       - don't fail on highmem CMA pages in dma_direct_alloc_pages (me)
      
       - cleanup swiotlb initialization and share more code with swiotlb-xen
         (me, Stefano Stabellini)
      
      * tag 'dma-mapping-5.19-2022-05-25' of git://git.infradead.org/users/hch/dma-mapping: (23 commits)
        dma-direct: don't over-decrypt memory
        swiotlb: max mapping size takes min align mask into account
        swiotlb: use the right nslabs-derived sizes in swiotlb_init_late
        swiotlb: use the right nslabs value in swiotlb_init_remap
        swiotlb: don't panic when the swiotlb buffer can't be allocated
        dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
        dma-direct: don't fail on highmem CMA pages in dma_direct_alloc_pages
        swiotlb-xen: fix DMA_ATTR_NO_KERNEL_MAPPING on arm
        x86: remove cruft from <asm/dma-mapping.h>
        swiotlb: remove swiotlb_init_with_tbl and swiotlb_init_late_with_tbl
        swiotlb: merge swiotlb-xen initialization into swiotlb
        swiotlb: provide swiotlb_init variants that remap the buffer
        swiotlb: pass a gfp_mask argument to swiotlb_init_late
        swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction
        swiotlb: make the swiotlb_init interface more useful
        x86: centralize setting SWIOTLB_FORCE when guest memory encryption is enabled
        x86: remove the IOMMU table infrastructure
        MIPS/octeon: use swiotlb_init instead of open coding it
        arm/xen: don't check for xen_initial_domain() in xen_create_contiguous_region
        swiotlb: rename swiotlb_late_init_with_default_size
        ...
      3f306ea2
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · fbe86dac
      Linus Torvalds authored
      Pull SCSI updates from James Bottomley:
       "This consists of a small set of driver updates (lpfc, ufs, mpt3sas
        mpi3mr, iscsi target). Apart from that this is mostly small fixes with
        very few core changes (the biggest one being VPD caching)"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (177 commits)
        scsi: target: tcmu: Avoid holding XArray lock when calling lock_page
        scsi: elx: efct: Remove NULL check after calling container_of()
        scsi: dpt_i2o: Drop redundant spinlock initialization
        scsi: qedf: Remove redundant variable op
        scsi: hisi_sas: Fix memory ordering in hisi_sas_task_deliver()
        scsi: fnic: Replace DMA mask of 64 bits with 47 bits
        scsi: mpi3mr: Add target device related sysfs attributes
        scsi: mpi3mr: Add shost related sysfs attributes
        scsi: elx: efct: Remove redundant memset() statement
        scsi: megaraid_sas: Remove redundant memset() statement
        scsi: mpi3mr: Return error if dma_alloc_coherent() fails
        scsi: hisi_sas: Fix rescan after deleting a disk
        scsi: hisi_sas: Use sas_ata_wait_after_reset() in IT nexus reset
        scsi: libsas: Refactor sas_ata_hard_reset()
        scsi: mpt3sas: Update driver version to 42.100.00.00
        scsi: mpt3sas: Fix junk chars displayed while printing ChipName
        scsi: ipr: Use kobj_to_dev()
        scsi: mpi3mr: Fix a NULL vs IS_ERR() bug in mpi3mr_bsg_init()
        scsi: bnx2fc: Avoid using get_cpu() in bnx2fc_cmd_alloc()
        scsi: libfc: Remove get_cpu() semantics in fc_exch_em_alloc()
        ...
      fbe86dac
  2. 25 May, 2022 10 commits
    • Linus Torvalds's avatar
      Merge tag 'sound-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · d7227785
      Linus Torvalds authored
      Pull sound updates from Takashi Iwai:
       "Not much dramatic changes at this time, but we've received quite a lot
        of changes for ASoC, while there are still a few fixes and quirks for
        usual HD- and USB-auido. Here are some highlights.
      
        ASoC:
      
         - Overhaul of endianness specification for data formats, avoiding
           needless restrictions due to CODECs
      
         - Initial stages of Intel AVS driver merge
      
         - Introduction of v4 IPC mechanism for SOF
      
         - TDM mode support for AK4613
      
         - Support for Analog Devices ADAU1361, Cirrus Logic CS35L45, Maxim
           MAX98396, MediaTek MT8186, NXP i.MX8 micfil and SAI interfaces,
           nVidia Tegra186 ASRC, and Texas Instruments TAS2764 and TAS2780
      
        Others:
      
         - A few regression fixes after the USB-audio endpoint management
           refactoring
      
         - More enhancements for Cirrus HD-audio codec support (still ongoing)
      
         - Addition of generic serial MIDI driver"
      
      * tag 'sound-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (504 commits)
        ALSA: hda/realtek - Add new type for ALC245
        ALSA: usb-audio: Configure sync endpoints before data
        ALSA: ctxfi: fix typo in comment
        ALSA: cs5535audio: fix typo in comment
        ALSA: ctxfi: Add SB046x PCI ID
        ALSA: usb-audio: Add missing ep_idx in fixed EP quirks
        ALSA: usb-audio: Workaround for clock setup on TEAC devices
        ALSA: lola: Bounds check loop iterator against streams array size
        ASoC: max98090: Move check for invalid values before casting in max98090_put_enab_tlv()
        ASoC: rt1308-sdw: add the default value of register 0xc320
        ASoC: rt9120: Use pm_runtime and regcache to optimize 'pwdnn' logic
        ASoC: rt9120: Fix 3byte read, valule offset typo
        ASoC: amd: acp: Set Speaker enable/disable pin through rt1019 codec driver.
        ASoC: amd: acp: Set Speaker enable/disable pin through rt1019 codec driver
        ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
        ASoC: codecs: lpass: Fix passing zero to 'PTR_ERR'
        ASoC: SOF: sof-client-ipc-flood-test: use pm_runtime_resume_and_get()
        ASoC: SOF: mediatek: remove duplicate include in mt8195.c
        ASoC: SOF: mediatek: Add mt8195 debug dump
        ASoC: SOF: mediatek: Add mediatek common debug dump
        ...
      d7227785
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2022-05-25' of git://anongit.freedesktop.org/drm/drm · 2518f226
      Linus Torvalds authored
      Pull drm updates from Dave Airlie:
       "Intel have enabled DG2 on certain SKUs for laptops, AMD has started
        some new GPU support, msm has user allocated VA controls
      
        dma-buf:
         - add dma_resv_replace_fences
         - add dma_resv_get_singleton
         - make dma_excl_fence private
      
        core:
         - EDID parser refactorings
         - switch drivers to drm_mode_copy/duplicate
         - DRM managed mutex initialization
      
        display-helper:
         - put HDMI, SCDC, HDCP, DSC and DP into new module
      
        gem:
         - rework fence handling
      
        ttm:
         - rework bulk move handling
         - add common debugfs for resource managers
         - convert to kvcalloc
      
        format helpers:
         - support monochrome formats
         - RGB888, RGB565 to XRGB8888 conversions
      
        fbdev:
         - cfb/sys_imageblit fixes
         - pagelist corruption fix
         - create offb platform device
         - deferred io improvements
      
        sysfb:
         - Kconfig rework
         - support for VESA mode selection
      
        bridge:
         - conversions to devm_drm_of_get_bridge
         - conversions to panel_bridge
         - analogix_dp - autosuspend support
         - it66121 - audio support
         - tc358767 - DSI to DPI support
         - icn6211 - PLL/I2C fixes, DT property
         - adv7611 - enable DRM_BRIDGE_OP_HPD
         - anx7625 - fill ELD if no monitor
         - dw_hdmi - add audio support
         - lontium LT9211 support, i.MXMP LDB
         - it6505: Kconfig fix, DPCD set power fix
         - adv7511 - CEC support for ADV7535
      
        panel:
         - ltk035c5444t, B133UAN01, NV3052C panel support
         - DataImage FG040346DSSWBG04 support
         - st7735r - DT bindings fix
         - ssd130x - fixes
      
        i915:
         - DG2 laptop PCI-IDs ("motherboard down")
         - Initial RPL-P PCI IDs
         - compute engine ABI
         - DG2 Tile4 support
         - DG2 CCS clear color compression support
         - DG2 render/media compression formats support
         - ATS-M platform info
         - RPL-S PCI IDs added
         - Bump ADL-P DMC version to v2.16
         - Support static DRRS
         - Support multiple eDP/LVDS native mode refresh rates
         - DP HDR support for HSW+
         - Lots of display refactoring + fixes
         - GuC hwconfig support and query
         - sysfs support for multi-tile
         - fdinfo per-client gpu utilisation
         - add geometry subslices query
         - fix prime mmap with LMEM
         - fix vm open count and remove vma refcounts
         - contiguous allocation fixes
         - steered register write support
         - small PCI BAR enablement
         - GuC error capture support
         - sunset igpu legacy mmap support for newer devices
         - GuC version 70.1.1 support
      
        amdgpu:
         - Initial SoC21 support
         - SMU 13.x enablement
         - SMU 13.0.4 support
         - ttm_eu cleanups
         - USB-C, GPUVM updates
         - TMZ fixes for RV
         - RAS support for VCN
         - PM sysfs code cleanup
         - DC FP rework
         - extend CG/PG flags to 64-bit
         - SI dpm lockdep fix
         - runtime PM fixes
      
        amdkfd:
         - RAS/SVM fixes
         - TLB flush fixes
         - CRIU GWS support
         - ignore bogus MEC signals more efficiently
      
        msm:
         - Fourcc modifier for tiled but not compressed layouts
         - Support for userspace allocated IOVA (GPU virtual address)
         - DPU: DSC (Display Stream Compression) support
         - DP: eDP support
         - DP: conversion to use drm_bridge and drm_bridge_connector
         - Merge DPU1 and MDP5 MDSS driver
         - DPU: writeback support
      
        nouveau:
         - make some structures static
         - make some variables static
         - switch to drm_gem_plane_helper_prepare_fb
      
        radeon:
         - misc fixes/cleanups
      
        mxsfb:
         - rework crtc mode setting
         - LCDIF CRC support
      
        etnaviv:
         - fencing improvements
         - fix address space collisions
         - cleanup MMU reference handling
      
        gma500:
         - GEM/GTT improvements
         - connector handling fixes
      
        komeda:
         - switch to plane reset helper
      
        mediatek:
         - MIPI DSI improvements
      
        omapdrm:
         - GEM improvements
      
        qxl:
         - aarch64 support
      
        vc4:
         - add a CL submission tracepoint
         - HDMI YUV support
         - HDMI/clock improvements
         - drop is_hdmi caching
      
        virtio:
         - remove restriction of non-zero blob types
      
        vmwgfx:
         - support for cursormob and cursorbypass 4
         - fence improvements
      
        tidss:
         - reset DISPC on startup
      
        solomon:
         - SPI support
         - DT improvements
      
        sun4i:
         - allwinner D1 support
         - drop is_hdmi caching
      
        imx:
         - use swap() instead of open-coding
         - use devm_platform_ioremap_resource
         - remove redunant initializations
      
        ast:
         - Displayport support
      
        rockchip:
         - Refactor IOMMU initialisation
         - make some structures static
         - replace drm_detect_hdmi_monitor with drm_display_info.is_hdmi
         - support swapped YUV formats,
         - clock improvements
         - rk3568 support
         - VOP2 support
      
        mediatek:
         - MT8186 support
      
        tegra:
         - debugabillity improvements"
      
      * tag 'drm-next-2022-05-25' of git://anongit.freedesktop.org/drm/drm: (1740 commits)
        drm/i915/dsi: fix VBT send packet port selection for ICL+
        drm/i915/uc: Fix undefined behavior due to shift overflowing the constant
        drm/i915/reg: fix undefined behavior due to shift overflowing the constant
        drm/i915/gt: Fix use of static in macro mismatch
        drm/i915/audio: fix audio code enable/disable pipe logging
        drm/i915: Fix CFI violation with show_dynamic_id()
        drm/i915: Fix 'mixing different enum types' warnings in intel_display_power.c
        drm/i915/gt: Fix build error without CONFIG_PM
        drm/msm/dpu: handle pm_runtime_get_sync() errors in bind path
        drm/msm/dpu: add DRM_MODE_ROTATE_180 back to supported rotations
        drm/msm: don't free the IRQ if it was not requested
        drm/msm/dpu: limit writeback modes according to max_linewidth
        drm/amd: Don't reset dGPUs if the system is going to s2idle
        drm/amdgpu: Unmap legacy queue when MES is enabled
        drm: msm: fix possible memory leak in mdp5_crtc_cursor_set()
        drm/msm: Fix fb plane offset calculation
        drm/msm/a6xx: Fix refcount leak in a6xx_gpu_init
        drm/msm/dsi: don't powerup at modeset time for parade-ps8640
        drm/rockchip: Change register space names in vop2
        dt-bindings: display: rockchip: make reg-names mandatory for VOP2
        ...
      2518f226
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 86c87bea
      Linus Torvalds authored
      Pull devicetree updates from Rob Herring:
       "Bindings:
      
         - Convert smsc,lan91c111, qcom,spi-qup, qcom,msm-uartdm,
           qcom,i2c-qup, qcom,gsbi, i2c-mt65xx, TI wkup_m3_ipc (and new
           props), qcom,smp2p, TI timer, Mediatek gnss, Mediatek topckgen,
           Mediatek apmixedsys, Mediatek infracfg, fsl,ls-extirq,
           fsl,layerscape-dcfg, QCom PMIC SPMI, rda,8810pl-timer, Xilinx
           zynqmp_ipi, uniphier-pcie, and Ilitek touchscreen controllers
      
         - Convert various Arm Ltd peripheral IP bindings to schemas
      
         - New bindings for Menlo board CPLD, DH electronics board CPLD,
           Qualcomm Geni based QUP I2C, Renesas RZ/G2UL OSTM, Broafcom BCM4751
           GNSS, MT6360 PMIC, ASIX USB Ethernet controllers, and
           Microchip/SMSC LAN95xx USB Ethernet controllers
      
         - Add vendor prefix for Enclustra
      
         - Add various compatible string additions
      
         - Various example fixes and cleanups
      
         - Remove unused hisilicon,hi6220-reset binding
      
         - Treewide fix properties missing type definition
      
         - Drop some empty and unreferenced .txt bindings
      
         - Documentation improvements for writing schemas
      
        DT driver core:
      
         - Drop static IRQ resources for DT platform devices as IRQ setup is
           dynamic and drivers have all been converted to use
           platform_get_irq() and friends
      
         - Rework memory allocations and frees for overlays
      
         - Continue overlay notifier callbacks on successful calls and add
           unittests
      
         - Handle 'interrupts-extended' in early DT IRQ setup
      
         - Fix of_property_read_string() errors to match documentation
      
         - Ignore disabled nodes in FDT API calls"
      
      * tag 'devicetree-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (86 commits)
        of/irq: fix typo in comment
        dt-bindings: Fix properties without any type
        Revert "dt-bindings: mailbox: qcom-ipcc: add missing properties into example"
        dt-bindings: input: touchscreen: ilitek_ts_i2c: Absorb ili2xxx bindings
        dt-bindings: timer: samsung,exynos4210-mct: define strict clock order
        dt-bindings: timer: samsung,exynos4210-mct: drop unneeded minItems
        dt-bindings: timer: cdns,ttc: drop unneeded minItems
        dt-bindings: mailbox: zynqmp_ipi: convert to yaml
        dt-bindings: usb: ci-hdrc-usb2: fix node node for ethernet controller
        dt-bindings: net: add schema for Microchip/SMSC LAN95xx USB Ethernet controllers
        dt-bindings: net: add schema for ASIX USB Ethernet controllers
        of/fdt: Ignore disabled memory nodes
        dt-bindings: arm: fix typos in compatible
        dt-bindings: mfd: Add bindings child nodes for the Mediatek MT6360
        dt-bindings: display: convert Arm Komeda to DT schema
        dt-bindings: display: convert Arm Mali-DP to DT schema
        dt-bindings: display: convert Arm HDLCD to DT schema
        dt-bindings: display: convert PL110/PL111 to DT schema
        dt-bindings: arm: convert vexpress-config to DT schema
        dt-bindings: arm: convert vexpress-sysregs to DT schema
        ...
      86c87bea
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.19-2022-05-23' of... · d223575e
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.19-2022-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tool updates from Arnaldo Carvalho de Melo:
       "Intel PT:
      
         - Allow hardware tracing on KVM test programs. In this case, the VM
           is not running an OS, but only the functions loaded into it by the
           hypervisor test program, and conveniently, loaded at the same
           virtual addresses.
      
         - Improve documentation:
            - Add link to perf wiki's page
      
         - Cleanups:
            - Delete now unused perf-with-kcore.sh script
            - Remove unused machines__find_host()
      
        ARM SPE (Statistical Profile Extensions):
      
         - Add man page entry.
      
        Vendor Events:
      
         - Update various Intel event topics
      
         - Update various microarch events
      
         - Fix various cstate metrics
      
         - Fix Alderlake metric groups
      
         - Add sapphirerapids events
      
         - Add JSON files for ARM Cortex A34, A35, A55, A510, A65, A73, A75,
           A77, A78, A710, X1, X2 and Neoverse E1
      
         - Update Cortex A57/A72
      
        perf stat:
      
         - Introduce stats for the user and system rusage times
      
        perf c2c:
      
         - Prep work to support ARM systems
      
        perf annotate:
      
         - Add --percent-limit option
      
        perf lock:
      
         - Add -t/--thread option for report
      
         - Do not discard broken lock stats
      
        perf bench:
      
         - Add breakpoint benchmarks
      
        perf test:
      
         - Limit to only run executable scripts in tests
      
         - Add basic perf record tests
      
         - Add stat record+report test
      
         - Add basic stat and topdown group test
      
         - Skip several tests when the user hasn't permission to perform them
      
         - Fix test case 81 ("perf record tests") on s390x
      
        perf version:
      
         - debuginfod support improvements
      
        perf scripting python:
      
         - Expose symbol offset and source information
      
        perf build:
      
         - Error for BPF skeletons without LIBBPF
      
         - Use Python devtools for version autodetection rather than runtime
      
        Miscellaneous:
      
         - Add riscv64 support to 'perf jitdump'
      
         - Various fixes/tidy ups related to cpu_map
      
         - Fixes for handling Intel hybrid systems"
      
      * tag 'perf-tools-for-v5.19-2022-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (122 commits)
        perf intel-pt: Add guest_code support
        perf kvm report: Add guest_code support
        perf script: Add guest_code support
        perf tools: Add guest_code support
        perf tools: Factor out thread__set_guest_comm()
        perf tools: Add machine to machines back pointer
        perf vendors events arm64: Update Cortex A57/A72
        perf vendors events arm64: Arm Neoverse E1
        perf vendors events arm64: Arm Cortex-X2
        perf vendors events arm64: Arm Cortex-X1
        perf vendors events arm64: Arm Cortex-A710
        perf vendors events arm64: Arm Cortex-A78
        perf vendors events arm64: Arm Cortex-A77
        perf vendors events arm64: Arm Cortex-A75
        perf vendors events arm64: Arm Cortex-A73
        perf vendors events arm64: Arm Cortex-A65
        perf vendors events arm64: Arm Cortex-A510
        perf vendors events arm64: Arm Cortex-A55
        perf vendors events arm64: Arm Cortex-A35
        perf vendors events arm64: Arm Cortex-A34
        ...
      d223575e
    • Linus Torvalds's avatar
      Merge tag 'checkpatch-new-alloc-check-5.19-rc1' of... · e908305f
      Linus Torvalds authored
      Merge tag 'checkpatch-new-alloc-check-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
      
      Pull checkpatch update from Gustavo Silva:
       "kvmalloc() and kvzalloc() functions have now 2-factor multiplication
        argument forms kvmalloc_array() and kvcalloc().
      
        Add alloc-with-multiplies checks for these new functions"
      
      * tag 'checkpatch-new-alloc-check-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
        checkpatch: add new alloc functions to alloc with multiplies check
      e908305f
    • Linus Torvalds's avatar
      Merge tag 'size_t-saturating-helpers-5.19-rc1' of... · 62e5873e
      Linus Torvalds authored
      Merge tag 'size_t-saturating-helpers-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
      
      Pull misc hardening updates from Gustavo Silva:
       "Replace a few open-coded instances with size_t saturating arithmetic
        helpers"
      
      * tag 'size_t-saturating-helpers-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
        virt: acrn: Prefer array_size and struct_size over open coded arithmetic
        afs: Prefer struct_size over open coded arithmetic
      62e5873e
    • Linus Torvalds's avatar
      Merge tag 'Wstringop-overflow-fixes-5.19-rc1' of... · a3a8b54b
      Linus Torvalds authored
      Merge tag 'Wstringop-overflow-fixes-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
      
      Pull Wstringop-overflow fixes from Gustavo Silva:
       "Fix some -Wstringop-overflow warnings when building with GCC-11. All
        the patches have been in linux-next during the last development cycle.
      
        This is part of the ongoing efforts to globally enable
        -Wstringop-overflow"
      
      * tag 'Wstringop-overflow-fixes-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
        drm/i915: Fix -Wstringop-overflow warning in call to intel_read_wm_latency()
        drm/amd/display: Fix Wstringop-overflow warnings in dc_link_dp.c
        scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac()
      a3a8b54b
    • Linus Torvalds's avatar
      Merge tag 'net-next-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next · 7e062cda
      Linus Torvalds authored
      Pull networking updates from Jakub Kicinski:
       "Core
        ----
      
         - Support TCPv6 segmentation offload with super-segments larger than
           64k bytes using the IPv6 Jumbogram extension header (AKA BIG TCP).
      
         - Generalize skb freeing deferral to per-cpu lists, instead of
           per-socket lists.
      
         - Add a netdev statistic for packets dropped due to L2 address
           mismatch (rx_otherhost_dropped).
      
         - Continue work annotating skb drop reasons.
      
         - Accept alternative netdev names (ALT_IFNAME) in more netlink
           requests.
      
         - Add VLAN support for AF_PACKET SOCK_RAW GSO.
      
         - Allow receiving skb mark from the socket as a cmsg.
      
         - Enable memcg accounting for veth queues, sysctl tables and IPv6.
      
        BPF
        ---
      
         - Add libbpf support for User Statically-Defined Tracing (USDTs).
      
         - Speed up symbol resolution for kprobes multi-link attachments.
      
         - Support storing typed pointers to referenced and unreferenced
           objects in BPF maps.
      
         - Add support for BPF link iterator.
      
         - Introduce access to remote CPU map elements in BPF per-cpu map.
      
         - Allow middle-of-the-road settings for the
           kernel.unprivileged_bpf_disabled sysctl.
      
         - Implement basic types of dynamic pointers e.g. to allow for
           dynamically sized ringbuf reservations without extra memory copies.
      
        Protocols
        ---------
      
         - Retire port only listening_hash table, add a second bind table
           hashed by port and address. Avoid linear list walk when binding to
           very popular ports (e.g. 443).
      
         - Add bridge FDB bulk flush filtering support allowing user space to
           remove all FDB entries matching a condition.
      
         - Introduce accept_unsolicited_na sysctl for IPv6 to implement
           router-side changes for RFC9131.
      
         - Support for MPTCP path manager in user space.
      
         - Add MPTCP support for fallback to regular TCP for connections that
           have never connected additional subflows or transmitted
           out-of-sequence data (partial support for RFC8684 fallback).
      
         - Avoid races in MPTCP-level window tracking, stabilize and improve
           throughput.
      
         - Support lockless operation of GRE tunnels with seq numbers enabled.
      
         - WiFi support for host based BSS color collision detection.
      
         - Add support for SO_TXTIME/SCM_TXTIME on CAN sockets.
      
         - Support transmission w/o flow control in CAN ISOTP (ISO 15765-2).
      
         - Support zero-copy Tx with TLS 1.2 crypto offload (sendfile).
      
         - Allow matching on the number of VLAN tags via tc-flower.
      
         - Add tracepoint for tcp_set_ca_state().
      
        Driver API
        ----------
      
         - Improve error reporting from classifier and action offload.
      
         - Add support for listing line cards in switches (devlink).
      
         - Add helpers for reporting page pool statistics with ethtool -S.
      
         - Add support for reading clock cycles when using PTP virtual clocks,
           instead of having the driver convert to time before reporting. This
           makes it possible to report time from different vclocks.
      
         - Support configuring low-latency Tx descriptor push via ethtool.
      
         - Separate Clause 22 and Clause 45 MDIO accesses more explicitly.
      
        New hardware / drivers
        ----------------------
      
         - Ethernet:
            - Marvell's Octeon NIC PCI Endpoint support (octeon_ep)
            - Sunplus SP7021 SoC (sp7021_emac)
            - Add support for Renesas RZ/V2M (in ravb)
            - Add support for MediaTek mt7986 switches (in mtk_eth_soc)
      
         - Ethernet PHYs:
            - ADIN1100 industrial PHYs (w/ 10BASE-T1L and SQI reporting)
            - TI DP83TD510 PHY
            - Microchip LAN8742/LAN88xx PHYs
      
         - WiFi:
            - Driver for pureLiFi X, XL, XC devices (plfxlc)
            - Driver for Silicon Labs devices (wfx)
            - Support for WCN6750 (in ath11k)
            - Support Realtek 8852ce devices (in rtw89)
      
         - Mobile:
            - MediaTek T700 modems (Intel 5G 5000 M.2 cards)
      
         - CAN:
            - ctucanfd: add support for CTU CAN FD open-source IP core from
              Czech Technical University in Prague
      
        Drivers
        -------
      
         - Delete a number of old drivers still using virt_to_bus().
      
         - Ethernet NICs:
            - intel: support TSO on tunnels MPLS
            - broadcom: support multi-buffer XDP
            - nfp: support VF rate limiting
            - sfc: use hardware tx timestamps for more than PTP
            - mlx5: multi-port eswitch support
            - hyper-v: add support for XDP_REDIRECT
            - atlantic: XDP support (including multi-buffer)
            - macb: improve real-time perf by deferring Tx processing to NAPI
      
         - High-speed Ethernet switches:
            - mlxsw: implement basic line card information querying
            - prestera: add support for traffic policing on ingress and egress
      
         - Embedded Ethernet switches:
            - lan966x: add support for packet DMA (FDMA)
            - lan966x: add support for PTP programmable pins
            - ti: cpsw_new: enable bc/mc storm prevention
      
         - Qualcomm 802.11ax WiFi (ath11k):
            - Wake-on-WLAN support for QCA6390 and WCN6855
            - device recovery (firmware restart) support
            - support setting Specific Absorption Rate (SAR) for WCN6855
            - read country code from SMBIOS for WCN6855/QCA6390
            - enable keep-alive during WoWLAN suspend
            - implement remain-on-channel support
      
         - MediaTek WiFi (mt76):
            - support Wireless Ethernet Dispatch offloading packet movement
              between the Ethernet switch and WiFi interfaces
            - non-standard VHT MCS10-11 support
            - mt7921 AP mode support
            - mt7921 IPv6 NS offload support
      
         - Ethernet PHYs:
            - micrel: ksz9031/ksz9131: cabletest support
            - lan87xx: SQI support for T1 PHYs
            - lan937x: add interrupt support for link detection"
      
      * tag 'net-next-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1809 commits)
        ptp: ocp: Add firmware header checks
        ptp: ocp: fix PPS source selector debugfs reporting
        ptp: ocp: add .init function for sma_op vector
        ptp: ocp: vectorize the sma accessor functions
        ptp: ocp: constify selectors
        ptp: ocp: parameterize input/output sma selectors
        ptp: ocp: revise firmware display
        ptp: ocp: add Celestica timecard PCI ids
        ptp: ocp: Remove #ifdefs around PCI IDs
        ptp: ocp: 32-bit fixups for pci start address
        Revert "net/smc: fix listen processing for SMC-Rv2"
        ath6kl: Use cc-disable-warning to disable -Wdangling-pointer
        selftests/bpf: Dynptr tests
        bpf: Add dynptr data slices
        bpf: Add bpf_dynptr_read and bpf_dynptr_write
        bpf: Dynptr support for ring buffers
        bpf: Add bpf_dynptr_from_mem for local dynptrs
        bpf: Add verifier support for dynptrs
        bpf: Suppress 'passing zero to PTR_ERR' warning
        bpf: Introduce bpf_arch_text_invalidate for bpf_prog_pack
        ...
      7e062cda
    • Linus Torvalds's avatar
      Merge branch 'for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 5d1772b1
      Linus Torvalds authored
      Pull workqueue update from Tejun Heo:
       "A lone commit fixing CPU offline handling for per-cpu wq workers so
        that they don't bother isolated CPUs"
      
      * 'for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        workqueue: Restrict kworker in the offline CPU pool running on housekeeping CPUs
      5d1772b1
    • Linus Torvalds's avatar
      Merge branch 'for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 8b49c4b1
      Linus Torvalds authored
      Pull cgroup updates from Tejun Heo:
       "Nothing too interesting. This adds cpu controller selftests and there
        are a couple code cleanup patches"
      
      * 'for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup: remove the superfluous judgment
        cgroup: Make cgroup_debug static
        kseltest/cgroup: Make test_stress.sh work if run interactively
        kselftest/cgroup: fix test_stress.sh to use OUTPUT dir
        cgroup: Add config file to cgroup selftest suite
        cgroup: Add test_cpucg_max_nested() testcase
        cgroup: Add test_cpucg_max() testcase
        cgroup: Add test_cpucg_nested_weight_underprovisioned() testcase
        cgroup: Adding test_cpucg_nested_weight_overprovisioned() testcase
        cgroup: Add test_cpucg_weight_underprovisioned() testcase
        cgroup: Add test_cpucg_weight_overprovisioned() testcase
        cgroup: Add test_cpucg_stats() testcase to cgroup cpu selftests
        cgroup: Add new test_cpu.c test suite in cgroup selftests
      8b49c4b1