1. 16 1月, 2021 1 次提交
    • A
      tools headers UAPI: Sync kvm.h headers with the kernel sources · 38c53947
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        647daca2 ("KVM: SVM: Add support for booting APs in an SEV-ES guest")
      
      That don't cause any tooling change, just silences this perf build
      warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
        diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      38c53947
  2. 24 12月, 2020 2 次提交
    • A
      tools headers UAPI: Sync kvm.h headers with the kernel sources · 288807fc
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        fb04a1ed ("KVM: X86: Implement ring-based dirty memory tracking")
      
      That result in these change in tooling:
      
        $ tools/perf/trace/beauty/kvm_ioctl.sh > before
        $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h
        $ cp arch/x86/include/uapi/asm/kvm.h tools/arch/x86/include/uapi/asm/kvm.h
        $ tools/perf/trace/beauty/kvm_ioctl.sh > after
        $ diff -u before after
        --- before	2020-12-21 11:55:45.229737066 -0300
        +++ after	2020-12-21 11:55:56.379983393 -0300
        @@ -90,6 +90,7 @@
         	[0xc0] = "CLEAR_DIRTY_LOG",
         	[0xc1] = "GET_SUPPORTED_HV_CPUID",
         	[0xc6] = "X86_SET_MSR_FILTER",
        +	[0xc7] = "RESET_DIRTY_RINGS",
         	[0xe0] = "CREATE_DEVICE",
         	[0xe1] = "SET_DEVICE_ATTR",
         	[0xe2] = "GET_DEVICE_ATTR",
        $
      
      Now one can use that string in filters when tracing ioctls, etc.
      
      And silences this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
        diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
        Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
        diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Xu <peterx@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      288807fc
    • A
      tools headers UAPI: Update epoll_pwait2 affected files · 6e519214
      Arnaldo Carvalho de Melo 提交于
      To pick the changes from:
      
        b0a0c261 ("epoll: wire up syscall epoll_pwait2")
      
      That addresses these perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h'
        diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
        Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
        diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Willem de Bruijn <willemb@google.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6e519214
  3. 19 12月, 2020 7 次提交
    • A
      tools headers UAPI: Update asm-generic/unistd.h · b53d4872
      Arnaldo Carvalho de Melo 提交于
      Just a comment change, trivial.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b53d4872
    • A
      tools headers UAPI: Sync linux/prctl.h with the kernel sources · d6dbfcee
      Arnaldo Carvalho de Melo 提交于
      To pick a new prctl introduced in:
      
        1446e1df ("kernel: Implement selective syscall userspace redirection")
      
      That results in:
      
        $ tools/perf/trace/beauty/prctl_option.sh > before
        $ cp include/uapi/linux/prctl.h tools/include/uapi/linux/prctl.h
        $ tools/perf/trace/beauty/prctl_option.sh > after
        $ diff -u before after
        --- before	2020-12-17 15:00:42.012537367 -0300
        +++ after	2020-12-17 15:00:49.832699463 -0300
        @@ -53,6 +53,7 @@
         	[56] = "GET_TAGGED_ADDR_CTRL",
         	[57] = "SET_IO_FLUSHER",
         	[58] = "GET_IO_FLUSHER",
        +	[59] = "SET_SYSCALL_USER_DISPATCH",
         };
         static const char *prctl_set_mm_options[] = {
         	[1] = "START_CODE",
        $
      
      Now users can do:
      
        # perf trace -e syscalls:sys_enter_prctl --filter "option==SET_SYSCALL_USER_DISPATCH"
      ^C#
        # trace -v -e syscalls:sys_enter_prctl --filter "option==SET_SYSCALL_USER_DISPATCH"
        New filter for syscalls:sys_enter_prctl: (option==0x3b) && (common_pid != 5519 && common_pid != 3404)
      ^C#
      
      And also when prctl appears in a session, its options will be
      translated to the string.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Gabriel Krisman Bertazi <krisman@collabora.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d6dbfcee
    • A
      tools headers UAPI: Sync linux/fscrypt.h with the kernel sources · 4a443a51
      Arnaldo Carvalho de Melo 提交于
      To pick the changes from:
      
        3ceb6543 ("fscrypt: remove kernel-internal constants from UAPI header")
      
      That don't result in any changes in tooling, just addressing this perf
      build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/fscrypt.h' differs from latest version at 'include/uapi/linux/fscrypt.h'
        diff -u tools/include/uapi/linux/fscrypt.h include/uapi/linux/fscrypt.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Eric Biggers <ebiggers@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4a443a51
    • A
      tools headers UAPI: Sync linux/const.h with the kernel headers · 7ddcdea5
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes in:
      
        a85cbe61 ("uapi: move constants from <linux/kernel.h> to <linux/const.h>")
      
      That causes no changes in tooling, just addresses this perf build
      warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/const.h' differs from latest version at 'include/uapi/linux/const.h'
        diff -u tools/include/uapi/linux/const.h include/uapi/linux/const.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Petr Vorel <petr.vorel@gmail.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7ddcdea5
    • A
      tools headers: Update linux/ctype.h with the kernel sources · 23cd9543
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes in:
      
        caabdd0f ("ctype.h: remove duplicate isdigit() helper")
      
      Addressing this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/linux/ctype.h' differs from latest version at 'include/linux/ctype.h'
        diff -u tools/include/linux/ctype.h include/linux/ctype.h
      
      And we need to continue using the combination of:
      
        inline __isdigit()
        #define isdigit() __isdigit
      
      When the __has_builtin() thing isn't available, as it is a builtin in
      older systems with it as a builtin but with compilers not hacinv
      __has_builtin(), rendering the __has_builtin() check useless otherwise.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      23cd9543
    • A
      tools headers: Add conditional __has_builtin() · ffb9beb1
      Arnaldo Carvalho de Melo 提交于
      As it'll be used by the ctype.h sync with its kernel source original.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ffb9beb1
    • A
      tools headers: Get tools's linux/compiler.h closer to the kernel's · 4bba4c4b
      Arnaldo Carvalho de Melo 提交于
      We're cherry picking stuff from the kernel to allow for the other
      headers that we keep in sync via tools/perf/check-headers.sh to work,
      so introduce linux/compiler_types.h and from there get the compiler
      specific stuff.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4bba4c4b
  4. 18 12月, 2020 3 次提交
  5. 16 12月, 2020 1 次提交
    • V
      mm, page_poison: remove CONFIG_PAGE_POISONING_ZERO · f289041e
      Vlastimil Babka 提交于
      CONFIG_PAGE_POISONING_ZERO uses the zero pattern instead of 0xAA.  It was
      introduced by commit 1414c7f4 ("mm/page_poisoning.c: allow for zero
      poisoning"), noting that using zeroes retains the benefit of sanitizing
      content of freed pages, with the benefit of not having to zero them again
      on alloc, and the downside of making some forms of corruption (stray
      writes of NULLs) harder to detect than with the 0xAA pattern.  Together
      with CONFIG_PAGE_POISONING_NO_SANITY it made possible to sanitize the
      contents on free without checking it back on alloc.
      
      These days we have the init_on_free() option to achieve sanitization with
      zeroes and to save clearing on alloc (and without checking on alloc).
      Arguably if someone does choose to check the poison for corruption on
      alloc, the savings of not clearing the page are secondary, and it makes
      sense to always use the 0xAA poison pattern.  Thus, remove the
      CONFIG_PAGE_POISONING_ZERO option for being redundant.
      
      Link: https://lkml.kernel.org/r/20201113104033.22907-6-vbabka@suse.czSigned-off-by: NVlastimil Babka <vbabka@suse.cz>
      Acked-by: NDavid Hildenbrand <david@redhat.com>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Laura Abbott <labbott@kernel.org>
      Cc: Mateusz Nosek <mateusznosek0@gmail.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f289041e
  6. 12 12月, 2020 1 次提交
  7. 05 12月, 2020 1 次提交
  8. 04 12月, 2020 2 次提交
  9. 27 11月, 2020 1 次提交
  10. 26 11月, 2020 1 次提交
  11. 19 11月, 2020 1 次提交
  12. 18 11月, 2020 1 次提交
  13. 11 11月, 2020 1 次提交
  14. 07 11月, 2020 4 次提交
  15. 03 11月, 2020 9 次提交
    • A
      tools include UAPI: Update linux/mount.h copy · 42cc0e70
      Arnaldo Carvalho de Melo 提交于
      To pick the changes from:
      
        dab741e0 ("Add a "nosymfollow" mount option.")
      
      That ends up adding support for the new MS_NOSYMFOLLOW mount flag:
      
        $ tools/perf/trace/beauty/mount_flags.sh > before
        $ cp include/uapi/linux/mount.h tools/include/uapi/linux/mount.h
        $ tools/perf/trace/beauty/mount_flags.sh > after
        $ diff -u before after
        --- before	2020-11-03 08:51:28.117997454 -0300
        +++ after	2020-11-03 08:51:38.992218869 -0300
        @@ -7,6 +7,7 @@
         	[32 ? (ilog2(32) + 1) : 0] = "REMOUNT",
         	[64 ? (ilog2(64) + 1) : 0] = "MANDLOCK",
         	[128 ? (ilog2(128) + 1) : 0] = "DIRSYNC",
        +	[256 ? (ilog2(256) + 1) : 0] = "NOSYMFOLLOW",
         	[1024 ? (ilog2(1024) + 1) : 0] = "NOATIME",
         	[2048 ? (ilog2(2048) + 1) : 0] = "NODIRATIME",
         	[4096 ? (ilog2(4096) + 1) : 0] = "BIND",
        $
      
      So now one can use it in --filter expressions for tracepoints.
      
      This silences this perf build warnings:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/mount.h' differs from latest version at 'include/uapi/linux/mount.h'
        diff -u tools/include/uapi/linux/mount.h include/uapi/linux/mount.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mattias Nissler <mnissler@chromium.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      42cc0e70
    • A
      tools headers UAPI: Update tools's copy of linux/perf_event.h · a9e27f5f
      Arnaldo Carvalho de Melo 提交于
      The diff is just tabs versus spaces, trivial.
      
      This silences this perf tools build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/perf_event.h' differs from latest version at 'include/uapi/linux/perf_event.h'
        diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a9e27f5f
    • A
      tools kvm headers: Update KVM headers from the kernel sources · aa04899a
      Arnaldo Carvalho de Melo 提交于
      Some should cause changes in tooling, like the one adding LAST_EXCP, but
      the way it is structured end up not making that happen.
      
      The new SVM_EXIT_INVPCID should get used by arch/x86/util/kvm-stat.c,
      in the svm_exit_reasons table.
      
      The tools/perf/trace/beauty part has scripts to catch changes and
      automagically create tables, like tools/perf/trace/beauty/kvm_ioctl.sh,
      but changes are needed to make tools/perf/arch/x86/util/kvm-stat.c catch
      those automatically.
      
      These were handled by the existing scripts:
      
        $ tools/perf/trace/beauty/kvm_ioctl.sh > before
        $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h
        $ tools/perf/trace/beauty/kvm_ioctl.sh > after
        $ diff -u before after
        --- before	2020-11-03 08:43:52.910728608 -0300
        +++ after	2020-11-03 08:44:04.273959984 -0300
        @@ -89,6 +89,7 @@
         	[0xbf] = "SET_NESTED_STATE",
         	[0xc0] = "CLEAR_DIRTY_LOG",
         	[0xc1] = "GET_SUPPORTED_HV_CPUID",
        +	[0xc6] = "X86_SET_MSR_FILTER",
         	[0xe0] = "CREATE_DEVICE",
         	[0xe1] = "SET_DEVICE_ATTR",
         	[0xe2] = "GET_DEVICE_ATTR",
        $
        $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > before
        $ cp include/uapi/linux/vhost.h tools/include/uapi/linux/vhost.h
        $
        $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > after
        $ diff -u before after
        --- before	2020-11-03 08:45:55.522225198 -0300
        +++ after	2020-11-03 08:46:12.881578666 -0300
        @@ -37,4 +37,5 @@
         	[0x71] = "VDPA_GET_STATUS",
         	[0x73] = "VDPA_GET_CONFIG",
         	[0x76] = "VDPA_GET_VRING_NUM",
        +	[0x78] = "VDPA_GET_IOVA_RANGE",
         };
        $
      
      This addresses these perf build warnings:
      
        Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
        diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/sie.h' differs from latest version at 'arch/s390/include/uapi/asm/sie.h'
        diff -u tools/arch/s390/include/uapi/asm/sie.h arch/s390/include/uapi/asm/sie.h
        Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
        diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/svm.h' differs from latest version at 'arch/x86/include/uapi/asm/svm.h'
        diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h
        Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
        diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
        Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h'
        diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      aa04899a
    • A
      tools UAPI: Update copy of linux/mman.h from the kernel sources · 97a3863b
      Arnaldo Carvalho de Melo 提交于
        e47168f3 ("powerpc/8xx: Support 16k hugepages with 4k pages")
      
      That don't cause any changes in tooling, just addresses this perf build
      warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/mman.h' differs from latest version at 'include/uapi/linux/mman.h'
        diff -u tools/include/uapi/linux/mman.h include/uapi/linux/mman.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      97a3863b
    • A
      tools headers UAPI: Update fscrypt.h copy · d0448d6a
      Arnaldo Carvalho de Melo 提交于
      To get the changes from:
      
        c7f0207b ("fscrypt: make "#define fscrypt_policy" user-only")
      
      That don't cause any changes in tools/perf, only addresses this perf
      tools build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/fscrypt.h' differs from latest version at 'include/uapi/linux/fscrypt.h'
        diff -u tools/include/uapi/linux/fscrypt.h include/uapi/linux/fscrypt.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Eric Biggers <ebiggers@google.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d0448d6a
    • A
      tools headers UAPI: Sync drm/i915_drm.h with the kernel sources · 9e228f48
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        13149e8b ("drm/i915: add syncobj timeline support")
        cda9edd0 ("drm/i915: introduce a mechanism to extend execbuf2")
      
      That don't result in any changes in tooling, just silences this perf
      build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
        diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9e228f48
    • A
      tools headers UAPI: Sync prctl.h with the kernel sources · ad6330ac
      Arnaldo Carvalho de Melo 提交于
      To get the changes in:
      
        1c101da8 ("arm64: mte: Allow user control of the tag check mode via prctl()")
        af5ce952 ("arm64: mte: Allow user control of the generated random tags via prctl()")
      
      Which don't cause any change in tooling, only addresses this perf build
      warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/prctl.h' differs from latest version at 'include/uapi/linux/prctl.h'
        diff -u tools/include/uapi/linux/prctl.h include/uapi/linux/prctl.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ad6330ac
    • P
      perf tools: Remove broken __no_tail_call attribute · 9ae1e990
      Peter Zijlstra 提交于
      The GCC specific __attribute__((optimize)) attribute does not what is
      commonly expected and is explicitly recommended against using in
      production code by the GCC people.
      
      Unlike what is often expected, it doesn't add to the optimization flags,
      but it fully replaces them, loosing any and all optimization flags
      provided by the compiler commandline.
      
      The only guaranteed upon means of inhibiting tail-calls is by placing a
      volatile asm with side-effects after the call such that the tail-call simply
      cannot be done.
      
      Given the original commit wasn't specific on which calls were the problem, this
      removal might re-introduce the problem, which can then be re-analyzed and cured
      properly.
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Acked-by: NArd Biesheuvel <ardb@kernel.org>
      Acked-by: NMiguel Ojeda <ojeda@kernel.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Arvind Sankar <nivedita@alum.mit.edu>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kees Kook <keescook@chromium.org>
      Cc: Martin Liška <mliska@suse.cz>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lore.kernel.org/lkml/20201028081123.GT2628@hirez.programming.kicks-ass.netSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9ae1e990
    • A
      tools headers UAPI: Update process_madvise affected files · 263e452e
      Arnaldo Carvalho de Melo 提交于
      To pick the changes from:
      
        ecb8ac8b ("mm/madvise: introduce process_madvise() syscall: an external memory hinting API")
      
      That addresses these perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h'
        diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
        Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
        diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      263e452e
  16. 26 10月, 2020 1 次提交
  17. 22 10月, 2020 1 次提交
  18. 12 10月, 2020 2 次提交
    • D
      bpf: Allow for map-in-map with dynamic inner array map entries · 4a8f87e6
      Daniel Borkmann 提交于
      Recent work in f4d05259 ("bpf: Add map_meta_equal map ops") and 134fede4
      ("bpf: Relax max_entries check for most of the inner map types") added support
      for dynamic inner max elements for most map-in-map types. Exceptions were maps
      like array or prog array where the map_gen_lookup() callback uses the maps'
      max_entries field as a constant when emitting instructions.
      
      We recently implemented Maglev consistent hashing into Cilium's load balancer
      which uses map-in-map with an outer map being hash and inner being array holding
      the Maglev backend table for each service. This has been designed this way in
      order to reduce overall memory consumption given the outer hash map allows to
      avoid preallocating a large, flat memory area for all services. Also, the
      number of service mappings is not always known a-priori.
      
      The use case for dynamic inner array map entries is to further reduce memory
      overhead, for example, some services might just have a small number of back
      ends while others could have a large number. Right now the Maglev backend table
      for small and large number of backends would need to have the same inner array
      map entries which adds a lot of unneeded overhead.
      
      Dynamic inner array map entries can be realized by avoiding the inlined code
      generation for their lookup. The lookup will still be efficient since it will
      be calling into array_map_lookup_elem() directly and thus avoiding retpoline.
      The patch adds a BPF_F_INNER_MAP flag to map creation which therefore skips
      inline code generation and relaxes array_map_meta_equal() check to ignore both
      maps' max_entries. This also still allows to have faster lookups for map-in-map
      when BPF_F_INNER_MAP is not specified and hence dynamic max_entries not needed.
      
      Example code generation where inner map is dynamic sized array:
      
        # bpftool p d x i 125
        int handle__sys_enter(void * ctx):
        ; int handle__sys_enter(void *ctx)
           0: (b4) w1 = 0
        ; int key = 0;
           1: (63) *(u32 *)(r10 -4) = r1
           2: (bf) r2 = r10
        ;
           3: (07) r2 += -4
        ; inner_map = bpf_map_lookup_elem(&outer_arr_dyn, &key);
           4: (18) r1 = map[id:468]
           6: (07) r1 += 272
           7: (61) r0 = *(u32 *)(r2 +0)
           8: (35) if r0 >= 0x3 goto pc+5
           9: (67) r0 <<= 3
          10: (0f) r0 += r1
          11: (79) r0 = *(u64 *)(r0 +0)
          12: (15) if r0 == 0x0 goto pc+1
          13: (05) goto pc+1
          14: (b7) r0 = 0
          15: (b4) w6 = -1
        ; if (!inner_map)
          16: (15) if r0 == 0x0 goto pc+6
          17: (bf) r2 = r10
        ;
          18: (07) r2 += -4
        ; val = bpf_map_lookup_elem(inner_map, &key);
          19: (bf) r1 = r0                               | No inlining but instead
          20: (85) call array_map_lookup_elem#149280     | call to array_map_lookup_elem()
        ; return val ? *val : -1;                        | for inner array lookup.
          21: (15) if r0 == 0x0 goto pc+1
        ; return val ? *val : -1;
          22: (61) r6 = *(u32 *)(r0 +0)
        ; }
          23: (bc) w0 = w6
          24: (95) exit
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Acked-by: NAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/bpf/20201010234006.7075-4-daniel@iogearbox.net
      4a8f87e6
    • D
      bpf: Add redirect_peer helper · 9aa1206e
      Daniel Borkmann 提交于
      Add an efficient ingress to ingress netns switch that can be used out of tc BPF
      programs in order to redirect traffic from host ns ingress into a container
      veth device ingress without having to go via CPU backlog queue [0]. For local
      containers this can also be utilized and path via CPU backlog queue only needs
      to be taken once, not twice. On a high level this borrows from ipvlan which does
      similar switch in __netif_receive_skb_core() and then iterates via another_round.
      This helps to reduce latency for mentioned use cases.
      
      Pod to remote pod with redirect(), TCP_RR [1]:
      
        # percpu_netperf 10.217.1.33
                RT_LATENCY:         122.450         (per CPU:         122.666         122.401         122.333         122.401 )
              MEAN_LATENCY:         121.210         (per CPU:         121.100         121.260         121.320         121.160 )
            STDDEV_LATENCY:         120.040         (per CPU:         119.420         119.910         125.460         115.370 )
               MIN_LATENCY:          46.500         (per CPU:          47.000          47.000          47.000          45.000 )
               P50_LATENCY:         118.500         (per CPU:         118.000         119.000         118.000         119.000 )
               P90_LATENCY:         127.500         (per CPU:         127.000         128.000         127.000         128.000 )
               P99_LATENCY:         130.750         (per CPU:         131.000         131.000         129.000         132.000 )
      
          TRANSACTION_RATE:       32666.400         (per CPU:        8152.200        8169.842        8174.439        8169.897 )
      
      Pod to remote pod with redirect_peer(), TCP_RR:
      
        # percpu_netperf 10.217.1.33
                RT_LATENCY:          44.449         (per CPU:          43.767          43.127          45.279          45.622 )
              MEAN_LATENCY:          45.065         (per CPU:          44.030          45.530          45.190          45.510 )
            STDDEV_LATENCY:          84.823         (per CPU:          66.770          97.290          84.380          90.850 )
               MIN_LATENCY:          33.500         (per CPU:          33.000          33.000          34.000          34.000 )
               P50_LATENCY:          43.250         (per CPU:          43.000          43.000          43.000          44.000 )
               P90_LATENCY:          46.750         (per CPU:          46.000          47.000          47.000          47.000 )
               P99_LATENCY:          52.750         (per CPU:          51.000          54.000          53.000          53.000 )
      
          TRANSACTION_RATE:       90039.500         (per CPU:       22848.186       23187.089       22085.077       21919.130 )
      
        [0] https://linuxplumbersconf.org/event/7/contributions/674/attachments/568/1002/plumbers_2020_cilium_load_balancer.pdf
        [1] https://github.com/borkmann/netperf_scripts/blob/master/percpu_netperfSigned-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Link: https://lore.kernel.org/bpf/20201010234006.7075-3-daniel@iogearbox.net
      9aa1206e