Skip to content
  1. Apr 25, 2021
  2. Apr 23, 2021
  3. Apr 20, 2021
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Add a build-test variant to use in builds from a tarball · bb7db869
      Arnaldo Carvalho de Melo authored
      
      
      To use in automated tests inside containers from a tarball generated
      by 'make perf-tar-src-pkg*', where testing building from a tarball
      is obviously not needed, so add a 'build-test-tarball' for that case.
      
      And don't build with gtk2 as this complicates things for cross builds
      where we don't always have all the libraries a full perf build requires
      available for the target arch, ditto for static builds.
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bb7db869
    • Zhen Lei's avatar
      perf data: Fix error return code in perf_data__create_dir() · 59a1a843
      Zhen Lei authored
      
      
      Although 'ret' has been initialized to -1, but it will be reassigned by
      the "ret = open(...)" statement in the for loop. So that, the value of
      'ret' is unknown when asprintf() failed.
      
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210415083417.3740-1-thunder.leizhen@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      59a1a843
    • Ian Rogers's avatar
      perf arm64: Fix off-by-one directory paths. · b96da02b
      Ian Rogers authored
      
      
      Relative path include works in the regular build due to -I paths but may
      break in other situations.
      
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lore.kernel.org/lkml/20210416214113.552252-1-irogers@google.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b96da02b
    • Martin Liška's avatar
      perf annotate: Add line number like in TUI and source location at EOL · f89a82a8
      Martin Liška authored
      
      
      The patch changes the output format in 2 ways:
      - line number is displayed for all source lines (matching TUI mode)
      - source locations for the hottest lines are printed
         at the line end in order to preserve layout
      
      Before:
      
           0.00 :   405ef1: inc    %r15
                :            tmpsd * (TD + tmpsd * TDD)));
           0.01 :   405ef4: vfmadd213sd 0x2b9b3(%rip),%xmm0,%xmm3        # 4318b0 <_IO_stdin_used+0x8b0>
                :            tmpsd * (TC +
        eff.c:1811    0.67 :   405efd: vfmadd213sd 0x2b9b2(%rip),%xmm0,%xmm3        # 4318b8 <_IO_stdin_used+0x8b8>
                :            TA + tmpsd * (TB +
           0.35 :   405f06: vfmadd213sd 0x2b9b1(%rip),%xmm0,%xmm3        # 4318c0 <_IO_stdin_used+0x8c0>
                :            dumbo =
        eff.c:1809    1.41 :   405f0f: vfmadd213sd 0x2b9b0(%rip),%xmm0,%xmm3        # 4318c8 <_IO_stdin_used+0x8c8>
                :            sumi -= sj * tmpsd * dij2i * dumbo;
        eff.c:1813    2.58 :   405f18: vmulsd %xmm3,%xmm0,%xmm0
           2.81 :   405f1c: vfnmadd213sd 0x30(%rsp),%xmm1,%xmm0
           3.78 :   405f23: vmovsd %xmm0,0x30(%rsp)
                :            for (k = 0; k < lpears[i] + upears[i]; k++) {
        eff.c:1761    0.90 :   405f29: cmp    %r15d,%r12d
      
      After:
      
           0.00 :   405ef1: inc    %r15
                : 1812   tmpsd * (TD + tmpsd * TDD)));
           0.01 :   405ef4: vfmadd213sd 0x2b9b3(%rip),%xmm0,%xmm3        # 4318b0 <_IO_stdin_used+0x8b0>
                : 1811   tmpsd * (TC +
           0.67 :   405efd: vfmadd213sd 0x2b9b2(%rip),%xmm0,%xmm3        # 4318b8 <_IO_stdin_used+0x8b8> // eff.c:1811
                : 1810   TA + tmpsd * (TB +
           0.35 :   405f06: vfmadd213sd 0x2b9b1(%rip),%xmm0,%xmm3        # 4318c0 <_IO_stdin_used+0x8c0>
                : 1809   dumbo =
           1.41 :   405f0f: vfmadd213sd 0x2b9b0(%rip),%xmm0,%xmm3        # 4318c8 <_IO_stdin_used+0x8c8> // eff.c:1809
                : 1813   sumi -= sj * tmpsd * dij2i * dumbo;
           2.58 :   405f18: vmulsd %xmm3,%xmm0,%xmm0 // eff.c:1813
           2.81 :   405f1c: vfnmadd213sd 0x30(%rsp),%xmm1,%xmm0
           3.78 :   405f23: vmovsd %xmm0,0x30(%rsp)
                : 1761   for (k = 0; k < lpears[i] + upears[i]; k++) {
      
      Where e.g. '// eff.c:1811' shares the same color as the percentantage
      at the line beginning.
      
      Signed-off-by: default avatarMartin Liška <mliska@suse.cz>
      Link: http://lore.kernel.org/lkml/a0d53f31-f633-5013-c386-a4452391b081@suse.cz
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f89a82a8
    • Alexander Antonov's avatar
      perf: Update .gitignore file · 537f1e38
      Alexander Antonov authored
      
      
      After a "make -C tools/perf", git reports the following untracked file:
      perf-iostat
      
      Add this generated file to perf's .gitignore file.
      
      Signed-off-by: default avatarAlexander Antonov <alexander.antonov@linux.intel.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey V Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20210419094147.15909-5-alexander.antonov@linux.intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      537f1e38
    • Alexander Antonov's avatar
      perf stat: Enable iostat mode for x86 platforms · f9ed693e
      Alexander Antonov authored
      This functionality is based on recently introduced sysfs attributes for
      Intel® Xeon® Scalable processor family (code name Skylake-SP):
      
      Commit bb42b3d3
      
       ("perf/x86/intel/uncore: Expose an Uncore unit to IIO PMON mapping")
      
      Mode is intended to provide four I/O performance metrics in MB per each
      PCIe root port:
      
       - Inbound Read: I/O devices below root port read from the host memory
       - Inbound Write: I/O devices below root port write to the host memory
       - Outbound Read: CPU reads from I/O devices below root port
       - Outbound Write: CPU writes to I/O devices below root port
      
      Each metric requiries only one uncore event which increments at every 4B
      transfer in corresponding direction. The formulas to compute metrics
      are generic:
          #EventCount * 4B / (1024 * 1024)
      
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarAlexander Antonov <alexander.antonov@linux.intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey V Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20210419094147.15909-4-alexander.antonov@linux.intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f9ed693e
    • Alexander Antonov's avatar
      perf stat: Helper functions for PCIe root ports list in iostat mode · 19776d3c
      Alexander Antonov authored
      
      
      Introduce helper functions to control PCIe root ports list.
      These helpers will be used in the follow-up patch.
      
      Signed-off-by: default avatarAlexander Antonov <alexander.antonov@linux.intel.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey V Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20210419094147.15909-3-alexander.antonov@linux.intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      19776d3c
    • Alexander Antonov's avatar
      perf stat: Basic support for iostat in perf · f07952b1
      Alexander Antonov authored
      
      
      Add basic flow for a new iostat mode in perf. Mode is intended to
      provide four I/O performance metrics per each PCIe root port: Inbound Read,
      Inbound Write, Outbound Read, Outbound Write.
      
      The actual code to compute the metrics and attribute it to
      root port is in follow-on patches.
      
      Signed-off-by: default avatarAlexander Antonov <alexander.antonov@linux.intel.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey V Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20210419094147.15909-2-alexander.antonov@linux.intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f07952b1
    • Kajol Jain's avatar
      perf vendor events: Initial JSON/events list for power10 platform · 32daa5d7
      Kajol Jain authored
      
      
      Patch adds initial JSON/events for POWER10.
      
      Signed-off-by: default avatarKajol Jain <kjain@linux.ibm.com>
      Reviewed-by: default avatarPaul Clarke <pc@us.ibm.com>
      Tested-by: default avatarPaul Clarke <pc@us.ibm.com>
      Acked-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: http://lore.kernel.org/lkml/20210419112001.71466-1-kjain@linux.ibm.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      32daa5d7
    • Rob Herring's avatar
      libperf xyarray: Add bounds checks to xyarray__entry() · 81886948
      Rob Herring authored
      
      
      xyarray__entry() is missing any bounds checking yet often the x and y
      parameters come from external callers. Add bounds checks and an
      unchecked __xyarray__entry().
      
      Committer notes:
      
      Make the 'x' and 'y' arguments to the new xyarray__entry() that does
      bounds check to be of type 'size_t', so that we cover also the case
      where 'x' and 'y' could be negative, which is needed anyway as having
      them as 'int' breaks the build with:
      
        /home/acme/git/perf/tools/lib/perf/include/internal/xyarray.h: In function ‘xyarray__entry’:
        /home/acme/git/perf/tools/lib/perf/include/internal/xyarray.h:28:8: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
           28 |  if (x >= xy->max_x || y >= xy->max_y)
              |        ^~
        /home/acme/git/perf/tools/lib/perf/include/internal/xyarray.h:28:26: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
           28 |  if (x >= xy->max_x || y >= xy->max_y)
              |                          ^~
        cc1: all warnings being treated as errors
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Suggested-by: default avatarArnaldo Carvalho de Melo <acme@kernel.org>
      Suggested-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210414195758.4078803-1-robh@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      81886948
    • Rob Herring's avatar
      libperf: Add support for user space counter access · 47d01e7b
      Rob Herring authored
      
      
      x86 and arm64 can both support direct access of event counters in
      userspace. The access sequence is less than trivial and currently exists
      in perf test code (tools/perf/arch/x86/tests/rdpmc.c) with copies in
      projects such as PAPI and libpfm4.
      
      In order to support userspace access, an event must be mmapped first
      with perf_evsel__mmap(). Then subsequent calls to perf_evsel__read()
      will use the fast path (assuming the arch supports it).
      
      Committer notes:
      
      Added a '__maybe_unused' attribute to the read_perf_counter() argument
      to fix the build on arches other than x86_64 and arm.
      
      Committer testing:
      
        Building and running the libperf tests in verbose mode (V=1) now shows
        those "loop = N, count = N" extra lines, testing user space counter
        access.
      
        # make V=1 -C tools/lib/perf tests
        make: Entering directory '/home/acme/git/perf/tools/lib/perf'
        make -f /home/acme/git/perf/tools/build/Makefile.build dir=. obj=libperf
        make -C /home/acme/git/perf/tools/lib/api/ O= libapi.a
        make -f /home/acme/git/perf/tools/build/Makefile.build dir=./fd obj=libapi
        make -f /home/acme/git/perf/tools/build/Makefile.build dir=./fs obj=libapi
        make -C tests
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-cpumap-a test-cpumap.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-threadmap-a test-threadmap.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-evlist-a test-evlist.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-evsel-a test-evsel.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-cpumap-so test-cpumap.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-threadmap-so test-threadmap.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-evlist-so test-evlist.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf
        gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-evsel-so test-evsel.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf
        make -C tests run
        running static:
        - running test-cpumap.c...OK
        - running test-threadmap.c...OK
        - running test-evlist.c...OK
        - running test-evsel.c...
        	loop = 65536, count = 333926
        	loop = 131072, count = 655781
        	loop = 262144, count = 1311141
        	loop = 524288, count = 2630126
        	loop = 1048576, count = 5256955
        	loop = 65536, count = 524594
        	loop = 131072, count = 1058916
        	loop = 262144, count = 2097458
        	loop = 524288, count = 4205429
        	loop = 1048576, count = 8406606
        OK
        running dynamic:
        - running test-cpumap.c...OK
        - running test-threadmap.c...OK
        - running test-evlist.c...OK
        - running test-evsel.c...
        	loop = 65536, count = 328102
        	loop = 131072, count = 655782
        	loop = 262144, count = 1317494
        	loop = 524288, count = 2627851
        	loop = 1048576, count = 5255187
        	loop = 65536, count = 524601
        	loop = 131072, count = 1048923
        	loop = 262144, count = 2107917
        	loop = 524288, count = 4194606
        	loop = 1048576, count = 8409322
        OK
        make: Leaving directory '/home/acme/git/perf/tools/lib/perf'
        #
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Itaru Kitayama <itaru.kitayama@gmail.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will@kernel.org>
      Link: http://lore.kernel.org/lkml/20210414155412.3697605-4-robh@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      47d01e7b
  4. Apr 16, 2021
  5. Apr 14, 2021
    • Yang Jihong's avatar
      perf annotate: Fix sample events lost in stdio mode · 5676dba7
      Yang Jihong authored
      
      
      In hist__find_annotations(), since different 'struct hist_entry' entries
      may point to same symbol, we free notes->src to signal already processed
      this symbol in stdio mode; when annotate, entry will skipped if
      notes->src is NULL to avoid repeated output.
      
      However, there is a problem, for example, run the following command:
      
       # perf record -e branch-misses -e branch-instructions -a sleep 1
      
      perf.data file contains different types of sample event.
      
      If the same IP sample event exists in branch-misses and branch-instructions,
      this event uses the same symbol. When annotate branch-misses events, notes->src
      corresponding to this event is set to null, as a result, when annotate
      branch-instructions events, this event is skipped and no annotate is output.
      
      Solution of this patch is to remove zfree in hists__find_annotations and
      change sort order to "dso,symbol" to avoid duplicate output when different
      processes correspond to the same symbol.
      
      Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin Liška <mliska@suse.cz>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: zhangjinhao2@huawei.com
      Link: http://lore.kernel.org/lkml/20210319123527.173883-1-yangjihong1@huawei.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5676dba7
    • Arnaldo Carvalho de Melo's avatar
      Merge remote-tracking branch 'torvalds/master' into perf/core · 473b2922
      Arnaldo Carvalho de Melo authored
      
      
      To pick up fixes from perf/urgent that got into upstream.
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      473b2922
  6. Apr 13, 2021
  7. Apr 12, 2021
  8. Apr 11, 2021
  9. Apr 10, 2021
    • Naohiro Aota's avatar
      btrfs: zoned: move superblock logging zone location · 53b74fa9
      Naohiro Aota authored
      
      
      Moves the location of the superblock logging zones. The new locations of
      the logging zones are now determined based on fixed block addresses
      instead of on fixed zone numbers.
      
      The old placement method based on fixed zone numbers causes problems when
      one needs to inspect a file system image without access to the drive zone
      information. In such case, the super block locations cannot be reliably
      determined as the zone size is unknown. By locating the superblock logging
      zones using fixed addresses, we can scan a dumped file system image without
      the zone information since a super block copy will always be present at or
      after the fixed known locations.
      
      Introduce the following three pairs of zones containing fixed offset
      locations, regardless of the device zone size.
      
        - primary superblock: offset   0B (and the following zone)
        - first copy:         offset 512G (and the following zone)
        - Second copy:        offset   4T (4096G, and the following zone)
      
      If a logging zone is outside of the disk capacity, we do not record the
      superblock copy.
      
      The first copy position is much larger than for a non-zoned filesystem,
      which is at 64M.  This is to avoid overlapping with the log zones for
      the primary superblock. This higher location is arbitrary but allows
      supporting devices with very large zone sizes, plus some space around in
      between.
      
      Such large zone size is unrealistic and very unlikely to ever be seen in
      real devices. Currently, SMR disks have a zone size of 256MB, and we are
      expecting ZNS drives to be in the 1-4GB range, so this limit gives us
      room to breathe. For now, we only allow zone sizes up to 8GB. The
      maximum zone size that would still fit in the space is 256G.
      
      The fixed location addresses are somewhat arbitrary, with the intent of
      maintaining superblock reliability for smaller and larger devices, with
      the preference for the latter. For this reason, there are two superblocks
      under the first 1T. This should cover use cases for physical devices and
      for emulated/device-mapper devices.
      
      The superblock logging zones are reserved for superblock logging and
      never used for data or metadata blocks. Note that we only reserve the
      two zones per primary/copy actually used for superblock logging. We do
      not reserve the ranges of zones possibly containing superblocks with the
      largest supported zone size (0-16GB, 512G-528GB, 4096G-4112G).
      
      The zones containing the fixed location offsets used to store
      superblocks on a non-zoned volume are also reserved to avoid confusion.
      
      Signed-off-by: default avatarNaohiro Aota <naohiro.aota@wdc.com>
      Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
      53b74fa9
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · d4961772
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "Here's the latest pile of clk driver and clk framework fixes for this
        release:
      
         - Two clk framework fixes for a long standing issue in
           clk_notifier_{register,unregister}() where we used a pointer that
           was for a struct containing a list head when there was no container
           struct
      
         - A compile warning fix for socfpga that's good to have
      
         - A double free problem with devm registered fixed factor clks
      
         - One last fix to the Qualcomm camera clk driver to use the right clk
           ops so clks don't get stuck and stop working because the firmware
           takes them for a ride"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: fixed: fix double free in resource managed fixed-factor clock
        clk: fix invalid usage of list cursor in unregister
        clk: fix invalid usage of list cursor in register
        clk: qcom: camcc: Update the clock ops for the SC7180
        clk: socfpga: fix iomem pointer cast on 64-bit
      d4961772
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.12-2020-04-09' of... · 9288e1f7
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.12-2020-04-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tool fixes from Arnaldo Carvalho de Melo:
      
       - Fix wrong LBR block sorting in 'perf report'
      
       - Fix 'perf inject' repipe usage when consuming perf.data files
      
       - Avoid potential buffer overrun when decoding ARM SPE hardware tracing
         packets, bug found using a fuzzer
      
      * tag 'perf-tools-fixes-for-v5.12-2020-04-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf arm-spe: Avoid potential buffer overrun
        perf report: Fix wrong LBR block sorting
        perf inject: Fix repipe usage
      9288e1f7
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · adb2c417
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "14 patches.
      
        Subsystems affected by this patch series: mm (kasan, gup, pagecache,
        and kfence), MAINTAINERS, mailmap, nds32, gcov, ocfs2, ia64, and lib"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS
        kfence, x86: fix preemptible warning on KPTI-enabled systems
        lib/test_kasan_module.c: suppress unused var warning
        kasan: fix conflict with page poisoning
        fs: direct-io: fix missing sdio->boundary
        ia64: fix user_stack_pointer() for ptrace()
        ocfs2: fix deadlock between setattr and dio_end_io_write
        gcov: re-fix clang-11+ support
        nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff
        mm/gup: check page posion status for coredump.
        .mailmap: fix old email addresses
        mailmap: update email address for Jordan Crouse
        treewide: change my e-mail address, fix my name
        MAINTAINERS: update CZ.NIC's Turris information
      adb2c417
    • Linus Torvalds's avatar
      Merge tag 'net-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 4e04e751
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Networking fixes for 5.12-rc7, including fixes from can, ipsec,
        mac80211, wireless, and bpf trees.
      
        No scary regressions here or in the works, but small fixes for 5.12
        changes keep coming.
      
        Current release - regressions:
      
         - virtio: do not pull payload in skb->head
      
         - virtio: ensure mac header is set in virtio_net_hdr_to_skb()
      
         - Revert "net: correct sk_acceptq_is_full()"
      
         - mptcp: revert "mptcp: provide subflow aware release function"
      
         - ethernet: lan743x: fix ethernet frame cutoff issue
      
         - dsa: fix type was not set for devlink port
      
         - ethtool: remove link_mode param and derive link params from driver
      
         - sched: htb: fix null pointer dereference on a null new_q
      
         - wireless: iwlwifi: Fix softirq/hardirq disabling in
           iwl_pcie_enqueue_hcmd()
      
         - wireless: iwlwifi: fw: fix notification wait locking
      
         - wireless: brcmfmac: p2p: Fix deadlock introduced by avoiding the
           rtnl dependency
      
        Current release - new code bugs:
      
         - napi: fix hangup on napi_disable for threaded napi
      
         - bpf: take module reference for trampoline in module
      
         - wireless: mt76: mt7921: fix airtime reporting and related tx hangs
      
         - wireless: iwlwifi: mvm: rfi: don't lock mvm->mutex when sending
           config command
      
        Previous releases - regressions:
      
         - rfkill: revert back to old userspace API by default
      
         - nfc: fix infinite loop, refcount & memory leaks in LLCP sockets
      
         - let skb_orphan_partial wake-up waiters
      
         - xfrm/compat: Cleanup WARN()s that can be user-triggered
      
         - vxlan, geneve: do not modify the shared tunnel info when PMTU
           triggers an ICMP reply
      
         - can: fix msg_namelen values depending on CAN_REQUIRED_SIZE
      
         - can: uapi: mark union inside struct can_frame packed
      
         - sched: cls: fix action overwrite reference counting
      
         - sched: cls: fix err handler in tcf_action_init()
      
         - ethernet: mlxsw: fix ECN marking in tunnel decapsulation
      
         - ethernet: nfp: Fix a use after free in nfp_bpf_ctrl_msg_rx
      
         - ethernet: i40e: fix receiving of single packets in xsk zero-copy
           mode
      
         - ethernet: cxgb4: avoid collecting SGE_QBASE regs during traffic
      
        Previous releases - always broken:
      
         - bpf: Refuse non-O_RDWR flags in BPF_OBJ_GET
      
         - bpf: Refcount task stack in bpf_get_task_stack
      
         - bpf, x86: Validate computation of branch displacements
      
         - ieee802154: fix many similar syzbot-found bugs
             - fix NULL dereferences in netlink attribute handling
             - reject unsupported operations on monitor interfaces
             - fix error handling in llsec_key_alloc()
      
         - xfrm: make ipv4 pmtu check honor ip header df
      
         - xfrm: make hash generation lock per network namespace
      
         - xfrm: esp: delete NETIF_F_SCTP_CRC bit from features for esp
           offload
      
         - ethtool: fix incorrect datatype in set_eee ops
      
         - xdp: fix xdp_return_frame() kernel BUG throw for page_pool memory
           model
      
         - openvswitch: fix send of uninitialized stack memory in ct limit
           reply
      
        Misc:
      
         - udp: add get handling for UDP_GRO sockopt"
      
      * tag 'net-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (182 commits)
        net: fix hangup on napi_disable for threaded napi
        net: hns3: Trivial spell fix in hns3 driver
        lan743x: fix ethernet frame cutoff issue
        net: ipv6: check for validity before dereferencing cfg->fc_nlinfo.nlh
        net: dsa: lantiq_gswip: Configure all remaining GSWIP_MII_CFG bits
        net: dsa: lantiq_gswip: Don't use PHY auto polling
        net: sched: sch_teql: fix null-pointer dereference
        ipv6: report errors for iftoken via netlink extack
        net: sched: fix err handler in tcf_action_init()
        net: sched: fix action overwrite reference counting
        Revert "net: sched: bump refcount for new action in ACT replace mode"
        ice: fix memory leak of aRFS after resuming from suspend
        i40e: Fix sparse warning: missing error code 'err'
        i40e: Fix sparse error: 'vsi->netdev' could be null
        i40e: Fix sparse error: uninitialized symbol 'ring'
        i40e: Fix sparse errors in i40e_txrx.c
        i40e: Fix parameters in aq_get_phy_register()
        nl80211: fix beacon head validation
        bpf, x86: Validate computation of branch displacements for x86-32
        bpf, x86: Validate computation of branch displacements for x86-64
        ...
      4e04e751
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.12-2021-04-09' of git://git.kernel.dk/linux-block · 3b978435
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Two minor fixups for the reissue logic, and one for making sure that
        unbounded work is canceled on io-wq exit"
      
      * tag 'io_uring-5.12-2021-04-09' of git://git.kernel.dk/linux-block:
        io-wq: cancel unbounded works on io-wq destroy
        io_uring: fix rw req completion
        io_uring: clear F_REISSUE right after getting it
      3b978435
    • Julian Braha's avatar
      lib: fix kconfig dependency on ARCH_WANT_FRAME_POINTERS · 7d37cb2c
      Julian Braha authored
      When LATENCYTOP, LOCKDEP, or FAULT_INJECTION_STACKTRACE_FILTER is
      enabled and ARCH_WANT_FRAME_POINTERS is disabled, Kbuild gives a warning
      such as:
      
        WARNING: unmet direct dependencies detected for FRAME_POINTER
          Depends on [n]: DEBUG_KERNEL [=y] && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS [=n] || MCOUNT [=n]
          Selected by [y]:
          - LATENCYTOP [=y] && DEBUG_KERNEL [=y] && STACKTRACE_SUPPORT [=y] && PROC_FS [=y] && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
      
      Depending on ARCH_WANT_FRAME_POINTERS causes a recursive dependency
      error.  ARCH_WANT_FRAME_POINTERS is to be selected by the architecture,
      and is not supposed to be overridden by other config options.
      
      Link: https://lkml.kernel.org/r/20210329165329.27994-1-julianbraha@gmail.com
      
      
      Signed-off-by: default avatarJulian Braha <julianbraha@gmail.com>
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Necip Fazil Yildiran <fazilyildiran@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7d37cb2c