1. 20 4月, 2021 2 次提交
    • K
      perf: Extend PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE · 55bcf6ef
      Kan Liang 提交于
      Current Hardware events and Hardware cache events have special perf
      types, PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE. The two types don't
      pass the PMU type in the user interface. For a hybrid system, the perf
      subsystem doesn't know which PMU the events belong to. The first capable
      PMU will always be assigned to the events. The events never get a chance
      to run on the other capable PMUs.
      
      Extend the two types to become PMU aware types. The PMU type ID is
      stored at attr.config[63:32].
      
      Add a new PMU capability, PERF_PMU_CAP_EXTENDED_HW_TYPE, to indicate a
      PMU which supports the extended PERF_TYPE_HARDWARE and
      PERF_TYPE_HW_CACHE.
      
      The PMU type is only required when searching a specific PMU. The PMU
      specific codes will only be interested in the 'real' config value, which
      is stored in the low 32 bit of the event->attr.config. Update the
      event->attr.config in the generic code, so the PMU specific codes don't
      need to calculate it separately.
      
      If a user specifies a PMU type, but the PMU doesn't support the extended
      type, error out.
      
      If an event cannot be initialized in a PMU specified by a user, error
      out immediately. Perf should not try to open it on other PMUs.
      
      The new PMU capability is only set for the X86 hybrid PMUs for now.
      Other architectures, e.g., ARM, may need it as well. The support on ARM
      may be implemented later separately.
      Suggested-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: NKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: https://lkml.kernel.org/r/1618237865-33448-22-git-send-email-kan.liang@linux.intel.com
      55bcf6ef
    • K
      perf/x86: Add structures for the attributes of Hybrid PMUs · a9c81ccd
      Kan Liang 提交于
      Hybrid PMUs have different events and formats. In theory, Hybrid PMU
      specific attributes should be maintained in the dedicated struct
      x86_hybrid_pmu, but it wastes space because the events and formats are
      similar among Hybrid PMUs.
      
      To reduce duplication, all hybrid PMUs will share a group of attributes
      in the following patch. To distinguish an attribute from different
      Hybrid PMUs, a PMU aware attribute structure is introduced. A PMU type
      is required for the attribute structure. The type is internal usage. It
      is not visible in the sysfs API.
      
      Hybrid PMUs may support the same event name, but with different event
      encoding, e.g., the mem-loads event on an Atom PMU has different event
      encoding from a Core PMU. It brings issue if two attributes are
      created for them. Current sysfs_update_group finds an attribute by
      searching the attr name (aka event name). If two attributes have the
      same event name, the first attribute will be replaced.
      To address the issue, only one attribute is created for the event. The
      event_str is extended and stores event encodings from all Hybrid PMUs.
      Each event encoding is divided by ";". The order of the event encodings
      must follow the order of the hybrid PMU index. The event_str is internal
      usage as well. When a user wants to show the attribute of a Hybrid PMU,
      only the corresponding part of the string is displayed.
      Signed-off-by: NKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Link: https://lkml.kernel.org/r/1618237865-33448-18-git-send-email-kan.liang@linux.intel.com
      a9c81ccd
  2. 17 4月, 2021 2 次提交
  3. 16 4月, 2021 5 次提交
  4. 14 3月, 2021 7 次提交
  5. 11 3月, 2021 5 次提交
  6. 10 3月, 2021 7 次提交
  7. 09 3月, 2021 2 次提交
  8. 08 3月, 2021 3 次提交
  9. 06 3月, 2021 2 次提交
  10. 05 3月, 2021 1 次提交
    • J
      kernel: provide create_io_thread() helper · cc440e87
      Jens Axboe 提交于
      Provide a generic helper for setting up an io_uring worker. Returns a
      task_struct so that the caller can do whatever setup is needed, then call
      wake_up_new_task() to kick it into gear.
      
      Add a kernel_clone_args member, io_thread, which tells copy_process() to
      mark the task with PF_IO_WORKER.
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      cc440e87
  11. 04 3月, 2021 4 次提交