Skip to content
Permalink
Cai-Huoqing/kt…
Switch branches/tags

Commits on Oct 21, 2021

  1. trace/hwlat: Make use of the helper macro kthread_run_on_cpu()

    Repalce kthread_create_on_cpu/wake_up_process()
    with kthread_run_on_cpu() to simplify the code.
    
    Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
    Cai Huoqing authored and intel-lab-lkp committed Oct 21, 2021
  2. trace/osnoise: Make use of the helper macro kthread_run_on_cpu()

    Repalce kthread_create_on_cpu/wake_up_process()
    with kthread_run_on_cpu() to simplify the code.
    
    Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
    Cai Huoqing authored and intel-lab-lkp committed Oct 21, 2021
  3. rcutorture: Make use of the helper macro kthread_run_on_cpu()

    Repalce kthread_create_on_node//kthread_bind/wake_up_process()
    with kthread_run_on_cpu() to simplify the code.
    
    Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
    Cai Huoqing authored and intel-lab-lkp committed Oct 21, 2021
  4. ring-buffer: Make use of the helper macro kthread_run_on_cpu()

    Repalce kthread_create/kthread_bind/wake_up_process()
    with kthread_run_on_cpu() to simplify the code.
    
    Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
    Cai Huoqing authored and intel-lab-lkp committed Oct 21, 2021
  5. RDMA/siw: Make use of the helper macro kthread_run_on_cpu()

    Repalce kthread_create/kthread_bind/wake_up_process()
    with kthread_run_on_cpu() to simplify the code.
    
    Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
    Cai Huoqing authored and intel-lab-lkp committed Oct 21, 2021
  6. kthread: Add the helper macro kthread_run_on_cpu()

    the helper macro kthread_run_on_cpu() inculdes
    kthread_create_on_cpu/wake_up_process().
    In some cases, use kthread_run_on_cpu() directly instead of
    kthread_create_on_node/kthread_bind/wake_up_process() or
    kthread_create_on_cpu/wake_up_process() or
    kthreadd_create/kthread_bind/wake_up_process() to simplify the code.
    
    Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
    Cai Huoqing authored and intel-lab-lkp committed Oct 21, 2021

Commits on Oct 19, 2021

  1. powerpc/perf: Fix data source encodings for L2.1 and L3.1 accesses

    Fix the data source encodings to represent L2.1/L3.1(another core's
    L2/L3 on the same node) accesses properly for power10 and older
    plaforms.
    
    Add new macros(LEVEL/REM) which can be used to add mem_lvl_num and remote
    field data inside perf_mem_data_src structure.
    
    Result in power9 system with patch changes:
    
    localhost:~/linux/tools/perf # ./perf mem report | grep Remote
         0.01%             1  252           Remote core, same node L3 or L3 hit  [.] 0x0000000000002dd0                producer_consumer   [.] 0x00007fff7f25eb90
    anon               HitM          N/A                     No       N/A        0              0
         0.01%             1  220           Remote core, same node L3 or L3 hit  [.] 0x0000000000002dd0                producer_consumer   [.] 0x00007fff77776d90
    anon               HitM          N/A                     No       N/A        0              0
         0.01%             1  220           Remote core, same node L3 or L3 hit  [.] 0x0000000000002dd0                producer_consumer   [.] 0x00007fff817d9410
    anon               HitM          N/A                     No       N/A        0              0
    
    Fixes: 79e96f8 ("powerpc/perf: Export memory hierarchy info to user space")
    Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lore.kernel.org/r/20211006140654.298352-5-kjain@linux.ibm.com
    kjain101 authored and Peter Zijlstra committed Oct 19, 2021
  2. tools/perf: Add mem_hops field in perf_mem_data_src structure

    Going forward, future generation systems can have more hierarchy
    within the node/package level but currently we don't have any data source
    encoding field in perf, which can be used to represent this level of data.
    
    Add a new field called 'mem_hops' in the perf_mem_data_src structure
    which can be used to represent intra-node/package or inter-node/off-package
    details. This field is of size 3 bits where PERF_MEM_HOPS_{NA, 0..6} value
    can be used to present different hop levels data.
    
    Also add corresponding macros to define mem_hop field values
    and shift value.
    
    Currently we define macro for HOPS_0 which corresponds
    to data coming from another core but same node.
    
    Add functionality to represent mem_hop field data in
    perf_mem__lvl_scnprintf function with the help of added string
    array called mem_hops.
    
    For ex: Encodings for mem_hops fields with L2 cache:
    
    L2                      - local L2
    L2 | REMOTE | HOPS_0    - remote core, same node L2
    
    Since with the addition of HOPS field, now remote can be used to
    denote cache access from the same node but different core, a check
    is added in the c2c_decode_stats function to set mrem only when HOPS
    is zero along with set remote field.
    
    Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lore.kernel.org/r/20211006140654.298352-4-kjain@linux.ibm.com
    kjain101 authored and Peter Zijlstra committed Oct 19, 2021
  3. perf: Add mem_hops field in perf_mem_data_src structure

    Going forward, future generation systems can have more hierarchy
    within the node/package level but currently we don't have any data source
    encoding field in perf, which can be used to represent this level of data.
    
    Add a new field called 'mem_hops' in the perf_mem_data_src structure
    which can be used to represent intra-node/package or inter-node/off-package
    details. This field is of size 3 bits where PERF_MEM_HOPS_{NA, 0..6} value
    can be used to present different hop levels data.
    
    Also add corresponding macros to define mem_hop field values
    and shift value.
    
    Currently we define macro for HOPS_0 which corresponds
    to data coming from another core but same node.
    
    For ex: Encodings for mem_hops fields with L2 cache:
    
    L2			- local L2
    L2 | REMOTE | HOPS_0	- remote core, same node L2
    
    Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lore.kernel.org/r/20211006140654.298352-3-kjain@linux.ibm.com
    kjain101 authored and Peter Zijlstra committed Oct 19, 2021
  4. perf: Add comment about current state of PERF_MEM_LVL_* namespace and…

    … remove an extra line
    
    Add a comment about PERF_MEM_LVL_* namespace being depricated
    to some extent in favour of added PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_}
    fields.
    
    Remove an extra line present in perf_mem__lvl_scnprintf function.
    
    Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lore.kernel.org/r/20211006140654.298352-2-kjain@linux.ibm.com
    kjain101 authored and Peter Zijlstra committed Oct 19, 2021

Commits on Oct 15, 2021

  1. perf/core: Allow ftrace for functions in kernel/event/core.c

    It is useful to trace functions in kernel/event/core.c. Allow ftrace for
    them by removing $(CC_FLAGS_FTRACE) from Makefile.
    
    Signed-off-by: Song Liu <songliubraving@fb.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/20211006210732.2826289-1-songliubraving@fb.com
    liu-song-6 authored and Peter Zijlstra committed Oct 15, 2021
  2. perf/x86: Add new event for AUX output counter index

    PEBS-via-PT records contain a mask of applicable counters. To identify
    which event belongs to which counter, a side-band event is needed. Until
    now, there has been no side-band event, and consequently users were limited
    to using a single event.
    
    Add such a side-band event. Note the event is optimised to output only
    when the counter index changes for an event. That works only so long as
    all PEBS-via-PT events are scheduled together, which they are for a
    recording session because they are in a single group.
    
    Also no attribute bit is used to select the new event, so a new
    kernel is not compatible with older perf tools.  The assumption
    being that PEBS-via-PT is sufficiently esoteric that users will not
    be troubled by this.
    
    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/20210907163903.11820-2-adrian.hunter@intel.com
    ahunter6 authored and Peter Zijlstra committed Oct 15, 2021

Commits on Sep 17, 2021

  1. perf/x86: Add compiler barrier after updating BTS

    Since BTS is coherent, simply add a compiler barrier to separate the BTS
    update and aux_head store.
    
    Signed-off-by: Leo Yan <leo.yan@linaro.org>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/20210809111407.596077-5-leo.yan@linaro.org
    Leo-Yan authored and Peter Zijlstra committed Sep 17, 2021

Commits on Aug 31, 2021

  1. perf/x86/intel/uncore: Fix Intel SPR M3UPI event constraints

    SPR M3UPI have the exact same event constraints as ICX, so add the
    constraints.
    
    Fixes: 2a8e51e ("perf/x86/intel/uncore: Add Sapphire Rapids server M3UPI support")
    Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/1629991963-102621-8-git-send-email-kan.liang@linux.intel.com
    Kan Liang authored and Peter Zijlstra committed Aug 31, 2021
  2. perf/x86/intel/uncore: Fix Intel SPR M2PCIE event constraints

    Similar to the ICX M2PCIE  events, some of the SPR M2PCIE events also
    have constraints. Add the constraints for SPR M2PCIE.
    
    Fixes: f85ef89 ("perf/x86/intel/uncore: Add Sapphire Rapids server M2PCIe support")
    Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/1629991963-102621-7-git-send-email-kan.liang@linux.intel.com
    Kan Liang authored and Peter Zijlstra committed Aug 31, 2021
  3. perf/x86/intel/uncore: Fix Intel SPR IIO event constraints

    SPR IIO events have the exact same event constraints as ICX, so add the
    constraints.
    
    Fixes: 3ba7095 ("perf/x86/intel/uncore: Add Sapphire Rapids server IIO support")
    Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/1629991963-102621-6-git-send-email-kan.liang@linux.intel.com
    Kan Liang authored and Peter Zijlstra committed Aug 31, 2021
  4. perf/x86/intel/uncore: Fix Intel SPR CHA event constraints

    SPR CHA events have the exact same event constraints as SKX, so add the
    constraints.
    
    Fixes: 949b113 ("perf/x86/intel/uncore: Add Sapphire Rapids server CHA support")
    Reported-by: Stephane Eranian <eranian@google.com>
    Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/1629991963-102621-5-git-send-email-kan.liang@linux.intel.com
    Kan Liang authored and Peter Zijlstra committed Aug 31, 2021
  5. perf/x86/intel/uncore: Fix Intel ICX IIO event constraints

    According to the latest uncore document, both NUM_OUTSTANDING_REQ_OF_CPU
    (0x88) event and COMP_BUF_OCCUPANCY(0xd5) event also have constraints. Add
    them into the event constraints table.
    
    Fixes: 2b3b76b ("perf/x86/intel/uncore: Add Ice Lake server uncore support")
    Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/1629991963-102621-4-git-send-email-kan.liang@linux.intel.com
    Kan Liang authored and Peter Zijlstra committed Aug 31, 2021
  6. perf/x86/intel/uncore: Fix invalid unit check

    The uncore unit with the type ID 0 and the unit ID 0 is missed.
    
    The table3 of the uncore unit maybe 0. The
    uncore_discovery_invalid_unit() mistakenly treated it as an invalid
    value.
    
    Remove the !unit.table3 check.
    
    Fixes: edae1f0 ("perf/x86/intel/uncore: Parse uncore discovery tables")
    Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Reviewed-by: Andi Kleen <ak@linux.intel.com>
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/1629991963-102621-3-git-send-email-kan.liang@linux.intel.com
    Kan Liang authored and Peter Zijlstra committed Aug 31, 2021
  7. perf/x86/intel/uncore: Support extra IMC channel on Ice Lake server

    There are three channels on a Ice Lake server, but only two channels
    will ever be active. Current perf only enables two channels.
    
    Support the extra IMC channel, which may be activated on some Ice Lake
    machines. For a non-activated channel, the SW can still access it. The
    write will be ignored by the HW. 0 is always returned for the reading.
    
    Fixes: 2b3b76b ("perf/x86/intel/uncore: Add Ice Lake server uncore support")
    Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Reviewed-by: Andi Kleen <ak@linux.intel.com>
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/1629991963-102621-2-git-send-email-kan.liang@linux.intel.com
    Kan Liang authored and Peter Zijlstra committed Aug 31, 2021

Commits on Aug 26, 2021

  1. perf/x86/amd/ibs: Add bitfield definitions in new <asm/amd-ibs.h> header

    Add <asm/amd-ibs.h> with bitfield definitions for IBS MSRs,
    and demonstrate usage within the driver.
    
    Also move 'struct perf_ibs_data' where it can be shared with
    the perf tool that will soon be using it.
    
    No functional changes.
    
    Signed-off-by: Kim Phillips <kim.phillips@amd.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20210817221048.88063-9-kim.phillips@amd.com
    kimphillamd authored and Ingo Molnar committed Aug 26, 2021
  2. perf/amd/uncore: Allow the driver to be built as a module

    Add support to build the AMD uncore driver as a module.
    
    This is in order to facilitate development without having
    to reboot the kernel in most cases.
    
    Signed-off-by: Kim Phillips <kim.phillips@amd.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20210817221048.88063-8-kim.phillips@amd.com
    kimphillamd authored and Ingo Molnar committed Aug 26, 2021
  3. x86/cpu: Add get_llc_id() helper function

    Factor out a helper function rather than export cpu_llc_id, which is
    needed in order to be able to build the AMD uncore driver as a module.
    
    Signed-off-by: Kim Phillips <kim.phillips@amd.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20210817221048.88063-7-kim.phillips@amd.com
    kimphillamd authored and Ingo Molnar committed Aug 26, 2021
  4. perf/amd/uncore: Clean up header use, use <linux/ include paths inste…

    …ad of <asm/
    
    Found by checkpatch.
    
    Signed-off-by: Kim Phillips <kim.phillips@amd.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20210817221048.88063-6-kim.phillips@amd.com
    kimphillamd authored and Ingo Molnar committed Aug 26, 2021
  5. perf/amd/uncore: Simplify code, use free_percpu()'s built-in check fo…

    …r NULL
    
    free_percpu() has its own check for NULL, no need to open-code it.
    
    Signed-off-by: Kim Phillips <kim.phillips@amd.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20210817221048.88063-5-kim.phillips@amd.com
    kimphillamd authored and Ingo Molnar committed Aug 26, 2021
  6. perf/hw_breakpoint: Replace deprecated CPU-hotplug functions

    The functions get_online_cpus() and put_online_cpus() have been
    deprecated during the CPU hotplug rework. They map directly to
    cpus_read_lock() and cpus_read_unlock().
    
    Replace deprecated CPU-hotplug functions with the official version.
    The behavior remains unchanged.
    
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20210803141621.780504-12-bigeasy@linutronix.de
    Sebastian Andrzej Siewior authored and Ingo Molnar committed Aug 26, 2021
  7. perf/x86/intel: Replace deprecated CPU-hotplug functions

    The functions get_online_cpus() and put_online_cpus() have been
    deprecated during the CPU hotplug rework. They map directly to
    cpus_read_lock() and cpus_read_unlock().
    
    Replace deprecated CPU-hotplug functions with the official version.
    The behavior remains unchanged.
    
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20210803141621.780504-11-bigeasy@linutronix.de
    Sebastian Andrzej Siewior authored and Ingo Molnar committed Aug 26, 2021
  8. perf/x86: Remove unused assignment to pointer 'e'

    The pointer 'e' is being assigned a value that is never read, the assignment
    is redundant and can be removed.
    
    Addresses-Coverity: ("Unused value")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lkml.kernel.org/r/20210804115710.109608-1-colin.king@canonical.com
    Colin Ian King authored and Ingo Molnar committed Aug 26, 2021
  9. Merge branch 'perf/urgent' into perf/core, to pick up fixes

    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Ingo Molnar committed Aug 26, 2021
  10. perf/x86/amd/power: Assign pmu.module

    Assign pmu.module so the driver can't be unloaded whilst in use.
    
    Signed-off-by: Kim Phillips <kim.phillips@amd.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20210817221048.88063-4-kim.phillips@amd.com
    kimphillamd authored and Ingo Molnar committed Aug 26, 2021
  11. perf/x86/amd/ibs: Extend PERF_PMU_CAP_NO_EXCLUDE to IBS Op

    Commit:
    
       2ff4025 ("perf/core, arch/x86: Use PERF_PMU_CAP_NO_EXCLUDE for exclusion incapable PMUs")
    
    neglected to do so.
    
    Fixes: 2ff4025 ("perf/core, arch/x86: Use PERF_PMU_CAP_NO_EXCLUDE for exclusion incapable PMUs")
    Signed-off-by: Kim Phillips <kim.phillips@amd.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20210817221048.88063-2-kim.phillips@amd.com
    kimphillamd authored and Ingo Molnar committed Aug 26, 2021
  12. perf/x86/amd/ibs: Work around erratum #1197

    Erratum #1197 "IBS (Instruction Based Sampling) Register State May be
    Incorrect After Restore From CC6" is published in a document:
    
      "Revision Guide for AMD Family 19h Models 00h-0Fh Processors" 56683 Rev. 1.04 July 2021
    
      https://bugzilla.kernel.org/show_bug.cgi?id=206537
    
    Implement the erratum's suggested workaround and ignore IBS samples if
    MSRC001_1031 == 0.
    
    Signed-off-by: Kim Phillips <kim.phillips@amd.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20210817221048.88063-3-kim.phillips@amd.com
    kimphillamd authored and Ingo Molnar committed Aug 26, 2021
  13. perf/x86/intel/uncore: Fix integer overflow on 23 bit left shift of a…

    … u32
    
    The u32 variable pci_dword is being masked with 0x1fffffff and then left
    shifted 23 places. The shift is a u32 operation,so a value of 0x200 or
    more in pci_dword will overflow the u32 and only the bottow 32 bits
    are assigned to addr. I don't believe this was the original intent.
    Fix this by casting pci_dword to a resource_size_t to ensure no
    overflow occurs.
    
    Note that the mask and 12 bit left shift operation does not need this
    because the mask SNR_IMC_MMIO_MEM0_MASK and shift is always a 32 bit
    value.
    
    Fixes: ee49532 ("perf/x86/intel/uncore: Add IMC uncore support for Snow Ridge")
    Addresses-Coverity: ("Unintentional integer overflow")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
    Link: https://lore.kernel.org/r/20210706114553.28249-1-colin.king@canonical.com
    Colin Ian King authored and Ingo Molnar committed Aug 26, 2021

Commits on Aug 25, 2021

  1. perf/x86/intel/pt: Fix mask of num_address_ranges

    Per SDM, bit 2:0 of CPUID(0x14,1).EAX[2:0] reports the number of
    configurable address ranges for filtering, not bit 1:0.
    
    Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Link: https://lkml.kernel.org/r/20210824040622.4081502-1-xiaoyao.li@intel.com
    calmisi authored and Peter Zijlstra committed Aug 25, 2021

Commits on Aug 22, 2021

  1. Linux 5.14-rc7

    torvalds committed Aug 22, 2021
Older