1. Oct 26, 2018
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-4.20-20181025' of... · efe8eaf7
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-4.20-20181025' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
       into perf/urgent
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      - Introduce 'perf trace --max-events' for stopping 'perf trace' when
        that many syscalls (enter+exit), tracepoints or other events such as
        page faults take place.
      
        Support that as well on a per-event basis, e.g.:
      
         perf trace -e sched:*switch/nr=2/,block:*_plug/nr=4/,block:*_unplug/nr=1/,net:*dev_queue/nr=3,max-stack=16/
      
        Will stop when 2 context switches, 4 block plugs, 1 block unplug and
        3 net_dev_queue tracepoints take place. (Arnaldo Carvalho de Melo)
      
      - Poll for monitored tasks being alive in 'perf stat -p/-t', exiting when
        those tasks all terminate (Jiri Olsa)
      
      - Encode -k clockid frequency into perf.data to enable timestamps derived
        metrics conversion into wall clock time on reporting stage. (Alexey Budankov)
      
      - Improve Intel PT call graph from SQL database and GUI python scripts,
        including adopting the Qt MDI interface to allow for multiple subwindows
        for all the tables, helping in better visualizing the data in the SQL
        tables, also uses, when available, the Intel XED disassembler libraries
        to present the Intel PT data as x86 asm mnemonics. This last feature
        is not currently working in some cases, fix is being discussed (Adrian Hunter)
      
      - Implement a ftrace function_graph view in 'perf script' when processing
        hardware trace data such as Intel PT (Andi Kleen)
      
      - Better integration with the Intel XED disassembler, when available, in
        'perf script' (Andi Kleen)
      
      - Some 'perf trace' drop refcount fixes (Arnaldo Carvalho de Melo)
      
      - Add Sparc support to 'perf annotate', jitdump (David Miller)
      
      - Fix PLT symbols entry/header sizes properly on Sparc (David Miller)
      
      - Fix generation of system call table failure with /tmp mounted with 'noexec'
        in arm64 (Hongxu Jia)
      
      - Allow extended console debug output in 'perf script' (Milian Wolff)
      
      - Flush output stream after events in 'perf script' verbose mode (Milian Wolff)
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      efe8eaf7
  2. Oct 25, 2018
    • Andi Kleen's avatar
      perf script: Support total cycles count · fe57120e
      Andi Kleen authored
      
      
      For 'perf script' brstackinsn also print a running cycles count.  This
      makes it easier to calculate cycle deltas for code sections measured
      with LBRs.
      
      % perf record -b -a sleep 1
      % perf script -F +brstackinsn
      ...
              00007f73ecc41083        insn: 74 06                     # PRED 9 cycles [17] 1.11 IPC
              00007f73ecc4108b        insn: a8 10
              00007f73ecc4108d        insn: 74 71                     # PRED 1 cycles [18] 1.00 IPC
              00007f73ecc41100        insn: 48 8b 46 10
              00007f73ecc41104        insn: 4c 8b 38
              00007f73ecc41107        insn: 4d 85 ff
              00007f73ecc4110a        insn: 0f 84 b0 00 00 00
              00007f73ecc41110        insn: 83 43 58 01
              00007f73ecc41114        insn: 48 89 df
              00007f73ecc41117        insn: e8 94 73 04 00            # PRED 6 cycles [24] 1.00 IPC
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Link: http://lkml.kernel.org/r/20180924170732.GA28040@tassilo.jf.intel.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fe57120e
    • Andi Kleen's avatar
      perf script: Implement --graph-function · 99f753f0
      Andi Kleen authored
      
      
      Add a ftrace style --graph-function argument to 'perf script' that
      allows to print itrace function calls only below a given function. This
      makes it easier to find the code of interest in a large trace.
      
      % perf record -e intel_pt//k -a sleep 1
      % perf script --graph-function group_sched_in --call-trace
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])          group_sched_in
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])              __x86_indirect_thunk_rax
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])              event_sched_in.isra.107
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                  perf_event_set_state.part.71
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                      perf_event_update_time
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                  perf_pmu_disable
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                  perf_log_itrace_start
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                  __x86_indirect_thunk_rax
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                      perf_event_update_userpage
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                          calc_timer_values
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                              sched_clock_cpu
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                          __x86_indirect_thunk_rax
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                          arch_perf_update_userpage
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                              __fentry__
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                              using_native_sched_clock
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                              sched_clock_stable
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                  perf_pmu_enable
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])              __x86_indirect_thunk_rax
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])          group_sched_in
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])              __x86_indirect_thunk_rax
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])              event_sched_in.isra.107
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                  perf_event_set_state.part.71
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                      perf_event_update_time
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                  perf_pmu_disable
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                  perf_log_itrace_start
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                  __x86_indirect_thunk_rax
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                      perf_event_update_userpage
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                          calc_timer_values
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                              sched_clock_cpu
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                          __x86_indirect_thunk_rax
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                          arch_perf_update_userpage
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                              __fentry__
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                              using_native_sched_clock
               swapper     0 [001] 194167.205660693: ([kernel.kallsyms])                              sched_clock_stable
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Tested-by: default avatarLeo Yan <leo.yan@linaro.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Kim Phillips <kim.phillips@arm.com>
      Link: http://lkml.kernel.org/r/20180920180540.14039-5-andi@firstfloor.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      99f753f0
    • Andi Kleen's avatar
      tools script: Add --call-trace and --call-ret-trace · d1b1552e
      Andi Kleen authored
      
      
      Add short cut options to print PT call trace and call-ret-trace, for
      calls and call and returns. Roughly corresponds to ftrace function
      tracer and function graph tracer.
      
      Just makes these common use cases nicer to use.
      
      % perf record -a -e intel_pt// sleep 1
      % perf script --call-trace
      	    perf   900 [000] 194167.205652203: ([kernel.kallsyms])          perf_pmu_enable
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])          __x86_indirect_thunk_rax
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])          event_filter_match
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])          group_sched_in
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])              __x86_indirect_thunk_rax
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])              event_sched_in.isra.107
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                  perf_event_set_state.part.71
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                      perf_event_update_time
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                  perf_pmu_disable
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                  perf_log_itrace_start
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                  __x86_indirect_thunk_rax
                  perf   900 [000] 194167.205652203: ([kernel.kallsyms])                      perf_event_update_userpage
      
      % perf script --call-ret-trace
      	    perf   900 [000] 194167.205652203:   tr strt     ([unknown])        pt_config
                  perf   900 [000] 194167.205652203:   return      ([kernel.kallsyms])            pt_config
                  perf   900 [000] 194167.205652203:   return      ([kernel.kallsyms])            pt_event_add
                  perf   900 [000] 194167.205652203:   call        ([kernel.kallsyms])            perf_pmu_enable
                  perf   900 [000] 194167.205652203:   return      ([kernel.kallsyms])            perf_pmu_nop_void
                  perf   900 [000] 194167.205652203:   return      ([kernel.kallsyms])            event_sched_in.isra.107
                  perf   900 [000] 194167.205652203:   call        ([kernel.kallsyms])            __x86_indirect_thunk_rax
                  perf   900 [000] 194167.205652203:   return      ([kernel.kallsyms])            perf_pmu_nop_int
                  perf   900 [000] 194167.205652203:   return      ([kernel.kallsyms])            group_sched_in
                  perf   900 [000] 194167.205652203:   call        ([kernel.kallsyms])            event_filter_match
                  perf   900 [000] 194167.205652203:   return      ([kernel.kallsyms])            event_filter_match
                  perf   900 [000] 194167.205652203:   call        ([kernel.kallsyms])            group_sched_in
                  perf   900 [000] 194167.205652203:   call        ([kernel.kallsyms])                __x86_indirect_thunk_rax
                  perf   900 [000] 194167.205652203:   return      ([kernel.kallsyms])                perf_pmu_nop_txn
                  perf   900 [000] 194167.205652203:   call        ([kernel.kallsyms])                event_sched_in.isra.107
                  perf   900 [000] 194167.205652203:   call        ([kernel.kallsyms])                    perf_event_set_state.part.71
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Tested-by: default avatarLeo Yan <leo.yan@linaro.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Kim Phillips <kim.phillips@arm.com>
      Link: http://lkml.kernel.org/r/20180920180540.14039-4-andi@firstfloor.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d1b1552e
    • Andi Kleen's avatar
      perf script: Make itrace script default to all calls · 4eb06815
      Andi Kleen authored
      
      
      By default 'perf script' for itrace outputs sampled instructions or
      branches. In my experience this is confusing to users because it's hard
      to correlate with real program behavior. The sampling makes sense for
      tools like 'perf report' that actually sample to reduce the run time,
      but run time is normally not a problem for 'perf script'.  It's better
      to give an accurate representation of the program flow.
      
      Default 'perf script' to output all calls for itrace. That's a much saner
      default. The old behavior can be still requested with 'perf script'
      --itrace=ibxwpe100000
      
      v2: Fix ETM build failure
      v3: Really fix ETM build failure (Kim Phillips)
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Kim Phillips <kim.phillips@arm.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Link: http://lkml.kernel.org/r/20180920180540.14039-3-andi@firstfloor.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4eb06815
    • Andi Kleen's avatar
      perf script: Add --insn-trace for instruction decoding · b585ebdb
      Andi Kleen authored
      Add a --insn-trace short hand option for decoding and disassembling
      instruction streams for intel_pt. This automatically pipes the output
      into the xed disassembler to generate disassembled instructions.  This
      just makes this use model much nicer to use.
      
      Before
      
        % perf record -e intel_pt// ...
        % perf script --itrace=i0ns --ns -F +insn,-event,-period | xed -F insn: -A -64
         swapper 0 [000] 17276.429606186: ffffffff81010486 pt_config ([kernel.kallsyms])    nopl  %eax, (%rax,%rax,1)
         swapper 0 [000] 17276.429606186: ffffffff8101048b pt_config ([kernel.kallsyms])    add $0x10, %rsp
         swapper 0 [000] 17276.429606186: ffffffff8101048f pt_config ([kernel.kallsyms])    popq  %rbx
         swapper 0 [000] 17276.429606186: ffffffff81010490 pt_config ([kernel.kallsyms])    popq  %rbp
         swapper 0 [000] 17276.429606186: ffffffff81010491 pt_config ([kernel.kallsyms])    popq  %r12
         swapper 0 [000] 17276.429606186: ffffffff81010493 pt_config ([kernel.kallsyms])    popq  %r13
         swapper 0 [000] 17276.429606186: ffffffff81010495 pt_config ([kernel.kallsyms])    popq  %r14
         swapper 0 [000] 17276.429606186: ffffffff81010497 pt_config ([kernel.kallsyms])    popq  %r15
         swapper 0 [000] 17276.429606186: ffffffff81010499 pt_config ([kernel.kallsyms])    retq
         swapper 0 [000] 17276.429606186: ffffffff8101063e pt_event_add ([kernel.kallsyms])         cmpl  $0x1, 0x1b0(%rbx)
         swapper 0 [000] 17276.429606186: ffffffff81010645 pt_event_add ([kernel.kallsyms])         mov $0xffffffea, %eax
         swapper 0 [000] 17276.429606186: ffffffff8101064a pt_event_add ([kernel.kallsyms])         mov $0x0, %edx
         swapper 0 [000] 17276.429606186: ffffffff8101064f pt_event_add ([kernel.kallsyms])         popq  %rbx
         swapper 0 [000] 17276.429606186: ffffffff81010650 pt_event_add ([kernel.kallsyms])         cmovnz %edx, %eax
         swapper 0 [000] 17276.429606186: ffffffff81010653 pt_event_add ([kernel.kallsyms])         jmp 0xffffffff81010635
         swapper 0 [000] 17276.429606186: ffffffff81010635 pt_event_add ([kernel.kallsyms])         retq
         swapper 0 [000] 17276.429606186: ffffffff8115e687 event_sched_in.isra.107 ([kernel.kallsyms])       test %eax, %eax
      
      Now:
      
        % perf record -e intel_pt// ...
        % perf script --insn-trace --xed
        ... same output ...
      
      XED needs to be installed with:
      
        $ git clone https://github.com/intelxed/mbuild.git mbuild
        $ git clone https://github.com/intelxed/xed
      
      
        $ cd xed
        $ ./mfile.py
        $ ./mfile.py examples
        $ sudo ./mfile.py --prefix=/usr/local install
        $ sudo cp obj/examples/xed /usr/local/bin
        $ xed | head -3
        ERROR: required argument(s) were missing
        Copyright (C) 2017, Intel Corporation. All rights reserved.
        XED version: [v10.0-328-g7d62c8c49b7b]
        $
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Link: http://lkml.kernel.org/r/20180920180540.14039-2-andi@firstfloor.org
      
      
      [ Fixed up whitespace damage, added the 'mfile.py examples + cp obj/examples/xed ... ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b585ebdb
  3. Oct 24, 2018
  4. Oct 23, 2018
    • Linus Torvalds's avatar
      Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 382d72a9
      Linus Torvalds authored
      Pull x86 hyperv updates from Ingo Molnar:
       "Two small changes: a boot warning removal and a minor cleanup"
      
      * 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/hyperv: Remove unused include
        x86/hyperv: Suppress "PCI: Fatal: No config space access function found"
      382d72a9
    • Linus Torvalds's avatar
      Merge branch 'x86-grub2-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ac73e08e
      Linus Torvalds authored
      Pull x86 grub2 updates from Ingo Molnar:
       "This extends the x86 boot protocol to include an address for the RSDP
        table - utilized by Xen currently.
      
        Matching Grub2 patches are pending as well. (Juergen Gross)"
      
      * 'x86-grub2-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/acpi, x86/boot: Take RSDP address for boot params if available
        x86/boot: Add ACPI RSDP address to setup_header
        x86/xen: Fix boot loader version reported for PVH guests
      ac73e08e
    • Linus Torvalds's avatar
      Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fec98069
      Linus Torvalds authored
      Pull x86 cpu updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - Add support for the "Dhyana" x86 CPUs by Hygon: these are licensed
           based on the AMD Zen architecture, and are built and sold in China,
           for domestic datacenter use. The code is pretty close to AMD
           support, mostly with a few quirks and enumeration differences. (Pu
           Wen)
      
         - Enable CPUID support on Cyrix 6x86/6x86L processors"
      
      * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tools/cpupower: Add Hygon Dhyana support
        cpufreq: Add Hygon Dhyana support
        ACPI: Add Hygon Dhyana support
        x86/xen: Add Hygon Dhyana support to Xen
        x86/kvm: Add Hygon Dhyana support to KVM
        x86/mce: Add Hygon Dhyana support to the MCA infrastructure
        x86/bugs: Add Hygon Dhyana to the respective mitigation machinery
        x86/apic: Add Hygon Dhyana support
        x86/pci, x86/amd_nb: Add Hygon Dhyana support to PCI and northbridge
        x86/amd_nb: Check vendor in AMD-only functions
        x86/alternative: Init ideal_nops for Hygon Dhyana
        x86/events: Add Hygon Dhyana support to PMU infrastructure
        x86/smpboot: Do not use BSP INIT delay and MWAIT to idle on Dhyana
        x86/cpu/mtrr: Support TOP_MEM2 and get MTRR number
        x86/cpu: Get cache info and setup cache cpumap for Hygon Dhyana
        x86/cpu: Create Hygon Dhyana architecture support file
        x86/CPU: Change query logic so CPUID is enabled before testing
        x86/CPU: Use correct macros for Cyrix calls
      fec98069
    • Linus Torvalds's avatar
      Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 04ce7fae
      Linus Torvalds authored
      Pull x86 build update from Ingo Molnar:
       "A small cleanup to x86 Kconfigs"
      
      * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/kconfig: Remove redundant 'default n' lines from all x86 Kconfig's
      04ce7fae
    • Linus Torvalds's avatar
      Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 642116d4
      Linus Torvalds authored
      Pull x86 boot updates from Ingo Molnar:
       "Two cleanups and a bugfix for a rare boot option combination"
      
      * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot/KASLR: Remove return value from handle_mem_options()
        x86/corruption-check: Use pr_*() instead of printk()
        x86/corruption-check: Fix panic in memory_corruption_check() when boot option without value is provided
      642116d4
    • Linus Torvalds's avatar
      Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e1d20bea
      Linus Torvalds authored
      Pull x86 asm updates from Ingo Molnar:
       "The main changes in this cycle were the fsgsbase related preparatory
        patches from Chang S. Bae - but there's also an optimized
        memcpy_flushcache() and a cleanup for the __cmpxchg_double() assembly
        glue"
      
      * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/fsgsbase/64: Clean up various details
        x86/segments: Introduce the 'CPUNODE' naming to better document the segment limit CPU/node NR trick
        x86/vdso: Initialize the CPU/node NR segment descriptor earlier
        x86/vdso: Introduce helper functions for CPU and node number
        x86/segments/64: Rename the GDT PER_CPU entry to CPU_NUMBER
        x86/fsgsbase/64: Factor out FS/GS segment loading from __switch_to()
        x86/fsgsbase/64: Convert the ELF core dump code to the new FSGSBASE helpers
        x86/fsgsbase/64: Make ptrace use the new FS/GS base helpers
        x86/fsgsbase/64: Introduce FS/GS base helper functions
        x86/fsgsbase/64: Fix ptrace() to read the FS/GS base accurately
        x86/asm: Use CC_SET()/CC_OUT() in __cmpxchg_double()
        x86/asm: Optimize memcpy_flushcache()
      e1d20bea
    • Linus Torvalds's avatar
      Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cbbfb0ae
      Linus Torvalds authored
      Pull x86 apic updates from Ingo Molnar:
       "Improve the spreading of managed IRQs at allocation time"
      
      * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irq/matrix: Spread managed interrupts on allocation
        irq/matrix: Split out the CPU selection code into a helper
      cbbfb0ae
    • Linus Torvalds's avatar
      Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 42f52e1c
      Linus Torvalds authored
      Pull scheduler updates from Ingo Molnar:
       "The main changes are:
      
         - Migrate CPU-intense 'misfit' tasks on asymmetric capacity systems,
           to better utilize (much) faster 'big core' CPUs. (Morten Rasmussen,
           Valentin Schneider)
      
         - Topology handling improvements, in particular when CPU capacity
           changes and related load-balancing fixes/improvements (Morten
           Rasmussen)
      
         - ... plus misc other improvements, fixes and updates"
      
      * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (28 commits)
        sched/completions/Documentation: Add recommendation for dynamic and ONSTACK completions
        sched/completions/Documentation: Clean up the document some more
        sched/completions/Documentation: Fix a couple of punctuation nits
        cpu/SMT: State SMT is disabled even with nosmt and without "=force"
        sched/core: Fix comment regarding nr_iowait_cpu() and get_iowait_load()
        sched/fair: Remove setting task's se->runnable_weight during PELT update
        sched/fair: Disable LB_BIAS by default
        sched/pelt: Fix warning and clean up IRQ PELT config
        sched/topology: Make local variables static
        sched/debug: Use symbolic names for task state constants
        sched/numa: Remove unused numa_stats::nr_running field
        sched/numa: Remove unused code from update_numa_stats()
        sched/debug: Explicitly cast sched_feat() to bool
        sched/core: Disable SD_PREFER_SIBLING on asymmetric CPU capacity domains
        sched/fair: Don't move tasks to lower capacity CPUs unless necessary
        sched/fair: Set rq->rd->overload when misfit
        sched/fair: Wrap rq->rd->overload accesses with READ/WRITE_ONCE()
        sched/core: Change root_domain->overload type to int
        sched/fair: Change 'prefer_sibling' type to bool
        sched/fair: Kick nohz balance if rq->misfit_task_load
        ...
      42f52e1c
    • Linus Torvalds's avatar
      Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0d1b82cd
      Linus Torvalds authored
      Pull RAS updates from Ingo Molnar:
       "Misc smaller fixes and cleanups"
      
      * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mcelog: Remove one mce_helper definition
        x86/mce: Add macros for the corrected error count bit field
        x86/mce: Use BIT_ULL(x) for bit mask definitions
        x86/mce-inject: Reset injection struct after injection
      0d1b82cd
    • Linus Torvalds's avatar
      Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c05f3642
      Linus Torvalds authored
      Pull perf updates from Ingo Molnar:
       "The main updates in this cycle were:
      
         - Lots of perf tooling changes too voluminous to list (big perf trace
           and perf stat improvements, lots of libtraceevent reorganization,
           etc.), so I'll list the authors and refer to the changelog for
           details:
      
             Benjamin Peterson, Jérémie Galarneau, Kim Phillips, Peter
             Zijlstra, Ravi Bangoria, Sangwon Hong, Sean V Kelley, Steven
             Rostedt, Thomas Gleixner, Ding Xiang, Eduardo Habkost, Thomas
             Richter, Andi Kleen, Sanskriti Sharma, Adrian Hunter, Tzvetomir
             Stoyanov, Arnaldo Carvalho de Melo, Jiri Olsa.
      
           ... with the bulk of the changes written by Jiri Olsa, Tzvetomir
           Stoyanov and Arnaldo Carvalho de Melo.
      
         - Continued intel_rdt work with a focus on playing well with perf
           events. This also imported some non-perf RDT work due to
           dependencies. (Reinette Chatre)
      
         - Implement counter freezing for Arch Perfmon v4 (Skylake and newer).
           This allows to speed up the PMI handler by avoiding unnecessary MSR
           writes and make it more accurate. (Andi Kleen)
      
         - kprobes cleanups and simplification (Masami Hiramatsu)
      
         - Intel Goldmont PMU updates (Kan Liang)
      
         - ... plus misc other fixes and updates"
      
      * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (155 commits)
        kprobes/x86: Use preempt_enable() in optimized_callback()
        x86/intel_rdt: Prevent pseudo-locking from using stale pointers
        kprobes, x86/ptrace.h: Make regs_get_kernel_stack_nth() not fault on bad stack
        perf/x86/intel: Export mem events only if there's PEBS support
        x86/cpu: Drop pointless static qualifier in punit_dev_state_show()
        x86/intel_rdt: Fix initial allocation to consider CDP
        x86/intel_rdt: CBM overlap should also check for overlap with CDP peer
        x86/intel_rdt: Introduce utility to obtain CDP peer
        tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file
        tools lib traceevent: Separate out tep_strerror() for strerror_r() issues
        perf python: More portable way to make CFLAGS work with clang
        perf python: Make clang_has_option() work on Python 3
        perf tools: Free temporary 'sys' string in read_event_files()
        perf tools: Avoid double free in read_event_file()
        perf tools: Free 'printk' string in parse_ftrace_printk()
        perf tools: Cleanup trace-event-info 'tdata' leak
        perf strbuf: Match va_{add,copy} with va_end
        perf test: S390 does not support watchpoints in test 22
        perf auxtrace: Include missing asm/bitsperlong.h to get BITS_PER_LONG
        tools include: Adopt linux/bits.h
        ...
      c05f3642
    • Linus Torvalds's avatar
      Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0200fbdd
      Linus Torvalds authored
      Pull locking and misc x86 updates from Ingo Molnar:
       "Lots of changes in this cycle - in part because locking/core attracted
        a number of related x86 low level work which was easier to handle in a
        single tree:
      
         - Linux Kernel Memory Consistency Model updates (Alan Stern, Paul E.
           McKenney, Andrea Parri)
      
         - lockdep scalability improvements and micro-optimizations (Waiman
           Long)
      
         - rwsem improvements (Waiman Long)
      
         - spinlock micro-optimization (Matthew Wilcox)
      
         - qspinlocks: Provide a liveness guarantee (more fairness) on x86.
           (Peter Zijlstra)
      
         - Add support for relative references in jump tables on arm64, x86
           and s390 to optimize jump labels (Ard Biesheuvel, Heiko Carstens)
      
         - Be a lot less permissive on weird (kernel address) uaccess faults
           on x86: BUG() when uaccess helpers fault on kernel addresses (Jann
           Horn)
      
         - macrofy x86 asm statements to un-confuse the GCC inliner. (Nadav
           Amit)
      
         - ... and a handful of other smaller changes as well"
      
      * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (57 commits)
        locking/lockdep: Make global debug_locks* variables read-mostly
        locking/lockdep: Fix debug_locks off performance problem
        locking/pvqspinlock: Extend node size when pvqspinlock is configured
        locking/qspinlock_stat: Count instances of nested lock slowpaths
        locking/qspinlock, x86: Provide liveness guarantee
        x86/asm: 'Simplify' GEN_*_RMWcc() macros
        locking/qspinlock: Rework some comments
        locking/qspinlock: Re-order code
        locking/lockdep: Remove duplicated 'lock_class_ops' percpu array
        x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y
        futex: Replace spin_is_locked() with lockdep
        locking/lockdep: Make class->ops a percpu counter and move it under CONFIG_DEBUG_LOCKDEP=y
        x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs
        x86/cpufeature: Macrofy inline assembly code to work around GCC inlining bugs
        x86/extable: Macrofy inline assembly code to work around GCC inlining bugs
        x86/paravirt: Work around GCC inlining bugs when compiling paravirt ops
        x86/bug: Macrofy the BUG table section handling, to work around GCC inlining bugs
        x86/alternatives: Macrofy lock prefixes to work around GCC inlining bugs
        x86/refcount: Work around GCC inlining bug
        x86/objtool: Use asm macros to work around GCC inlining bugs
        ...
      0200fbdd
    • Linus Torvalds's avatar
      Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · de3fbb2a
      Linus Torvalds authored
      Pull EFI updates from Ingo Molnar:
       "The main changes are:
      
         - Add support for enlisting the help of the EFI firmware to create
           memory reservations that persist across kexec.
      
         - Add page fault handling to the runtime services support code on x86
           so we can more gracefully recover from buggy EFI firmware.
      
         - Fix command line handling on x86 for the boot path that omits the
           stub's PE/COFF entry point.
      
         - Other assorted fixes and updates"
      
      * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: boot: Fix EFI stub alignment
        efi/x86: Call efi_parse_options() from efi_main()
        efi/x86: earlyprintk - Add 64bit efi fb address support
        efi/x86: drop task_lock() from efi_switch_mm()
        efi/x86: Handle page faults occurring while running EFI runtime services
        efi: Make efi_rts_work accessible to efi page fault handler
        efi/efi_test: add exporting ResetSystem runtime service
        efi/libstub: arm: support building with clang
        efi: add API to reserve memory persistently across kexec reboot
        efi/arm: libstub: add a root memreserve config table
        efi: honour memory reservations passed via a linux specific config table
      de3fbb2a
    • Linus Torvalds's avatar
      Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cee1352f
      Linus Torvalds authored
      Pull RCU updates from Ingo Molnar:
       "The biggest change in this cycle is the conclusion of the big
        'simplify RCU to two primary flavors' consolidation work - i.e.
        there's a single RCU flavor for any kernel variant (PREEMPT and
        !PREEMPT):
      
          - Consolidate the RCU-bh, RCU-preempt, and RCU-sched flavors into a
            single flavor similar to RCU-sched in !PREEMPT kernels and into a
            single flavor similar to RCU-preempt (but also waiting on
            preempt-disabled sequences of code) in PREEMPT kernels.
      
            This branch also includes a refactoring of
            rcu_{nmi,irq}_{enter,exit}() from Byungchul Park.
      
          - Now that there is only one RCU flavor in any given running kernel,
            the many "rsp" pointers are no longer required, and this cleanup
            series removes them.
      
          - This branch carries out additional cleanups made possible by the
            RCU flavor consolidation, including inlining now-trivial
            functions, updating comments and definitions, and removing
            now-unneeded rcutorture scenarios.
      
          - Now that there is only one flavor of RCU in any running kernel,
            there is also only on rcu_data structure per CPU. This means that
            the rcu_dynticks structure can be merged into the rcu_data
            structure, a task taken on by this branch. This branch also
            contains a -rt-related fix from Mike Galbraith.
      
        There were also other updates:
      
          - Documentation updates, including some good-eye catches from Joel
            Fernandes.
      
          - SRCU updates, most notably changes enabling call_srcu() to be
            invoked very early in the boot sequence.
      
          - Torture-test updates, including some preliminary work towards
            making rcutorture better able to find problems that result in
            insufficient grace-period forward progress.
      
          - Initial changes to RCU to better promote forward progress of grace
            periods, including fixing a bug found by Marius Hillenbrand and
            David Woodhouse, with the fix suggested by Peter Zijlstra"
      
      * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (140 commits)
        srcu: Make early-boot call_srcu() reuse workqueue lists
        rcutorture: Test early boot call_srcu()
        srcu: Make call_srcu() available during very early boot
        rcu: Convert rcu_state.ofl_lock to raw_spinlock_t
        rcu: Remove obsolete ->dynticks_fqs and ->cond_resched_completed
        rcu: Switch ->dynticks to rcu_data structure, remove rcu_dynticks
        rcu: Switch dyntick nesting counters to rcu_data structure
        rcu: Switch urgent quiescent-state requests to rcu_data structure
        rcu: Switch lazy counts to rcu_data structure
        rcu: Switch last accelerate/advance to rcu_data structure
        rcu: Switch ->tick_nohz_enabled_snap to rcu_data structure
        rcu: Merge rcu_dynticks structure into rcu_data structure
        rcu: Remove unused rcu_dynticks_snap() from Tiny RCU
        rcu: Convert "1UL << x" to "BIT(x)"
        rcu: Avoid resched_cpu() when rescheduling the current CPU
        rcu: More aggressively enlist scheduler aid for nohz_full CPUs
        rcu: Compute jiffies_till_sched_qs from other kernel parameters
        rcu: Provide functions for determining if call_rcu() has been invoked
        rcu: Eliminate ->rcu_qs_ctr from the rcu_dynticks structure
        rcu: Motivate Tiny RCU forward progress
        ...
      cee1352f