All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	Len Brown <len.brown@intel.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Aubrey Li <aubrey.li@linux.intel.com>,
	Amit Kucheria <amitk@kernel.org>, Andi Kleen <ak@linux.intel.com>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	"Ravi V. Shankar" <ravi.v.shankar@intel.com>,
	Ricardo Neri <ricardo.neri@intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 0/7] Thermal: Introduce the Hardware Feedback Interface for thermal and performance management
Date: Thu, 3 Feb 2022 19:57:25 +0100	[thread overview]
Message-ID: <CAJZ5v0j7+xkYOGB8kLxGwwD3ReaXt4oMRK-D-5t2zKeMxd-CYA@mail.gmail.com> (raw)
In-Reply-To: <CAJZ5v0gcK10TiVbc8+j1pVN+T2p3EZHEK9Ga2=2ZxeGd=iVkhw@mail.gmail.com>

On Sun, Jan 30, 2022 at 4:23 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Thu, Jan 27, 2022 at 8:33 PM Ricardo Neri
> <ricardo.neri-calderon@linux.intel.com> wrote:
> >
> > Hi,
> >
> > This is v5 of this patchset after having incorporated the feedback from
> > reviewers. Please find v1, v2, v3, and v4 in [1], [2], [3], and [4],
> > respectively.
> >
> > The Intel Hardware Feedback Interface (HFI) [5] provides information about
> > the performance and energy efficiency of each CPU in the system. It uses a
> > table that is shared between hardware and the operating system. The
> > contents of the table may be updated as a result of changes in the
> > operating conditions of the system (e.g., reaching a thermal limit) or the
> > action of external factors (e.g., changes in the thermal design power).
> >
> > The information that HFI provides are specified as numeric, unit-less
> > capabilities relative to other CPUs in the system. These capabilities have
> > a range of [0-255] where higher numbers represent higher capabilities.
> > Energy efficiency and performance are reported in separate capabilities.
> > If either the performance or energy capabilities efficiency of a CPU are 0,
> > the hardware recommends to not schedule any tasks on such CPU for
> > performance, energy efficiency or thermal reasons, respectively.
> >
> > The kernel or user space may use the information from the HFI to modify
> > task placement and/or adjust power limits. This patchset focuses on the
> > user space. The thermal notification framework is extended to relay
> > updates of CPU capacity. Thus, a userspace daemon can affinitize workloads
> > to certain CPUs and/or offline CPUs whose capabilities are zero.
> >
> > The frequency of HFI updates is specific to each processor model. On some
> > systems, there is just a single HFI update at boot. On other systems, there
> > may be updates every tens of milliseconds. In order to not overwhelm
> > userspace with too many updates, they are limited to one update every
> > CONFIG_HZ jiffies.
> >
> > Thanks and BR,
> > Ricardo
> >
> > [1]. https://lore.kernel.org/lkml/20211106013312.26698-1-ricardo.neri-calderon@linux.intel.com/
> > [2]. https://lore.kernel.org/lkml/20211220151438.1196-1-ricardo.neri-calderon@linux.intel.com/
> > [3]. https://lore.kernel.org/lkml/20220106025059.25847-8-ricardo.neri-calderon@linux.intel.com/
> > [4]. https://lore.kernel.org/lkml/20220108034743.31277-1-ricardo.neri-calderon@linux.intel.com/
> > [5]. https://www.intel.com/sdm
> >
> > Changes since v4:
> >  ++ Unchanged patches: 1, 2.
> >  * Reworded description hfi_instance::hdr and hfi_instance::data.
> >    (Patch 3; Srinivas)
> >  * Call intel_hfi_online() before enabling the thermal vector at the
> >    local APIC is enabled. This makes sure that a CPU has an associated
> >    HFI instance when an HFI event happens. Reworded the commit message to
> >    reflect this change. (Patch 4; Srinivas)
> >  * Set hfi_instances to NULL if we fail to allocate memory for
> >    hfi_instance::cpus. (Patch 4; Srinivas)
> >  * Delayed initialization of local variables until after the check for a
> >    non-NULL hfi_instances in intel_hfi_online(). (Patch 4; Srinivas)
> >  * Optimized the error path in init_hfi_init() to not needlessly
> >    free the memory of cpumasks that have not been allocated. (Patch 4;
> >    Srinivas)
> >  * Removed pointless checks for X86_FEATURE_HFI in
> >    intel_hfi_[on|off]line(). It is sufficient to check for a non-NULL
> >    hfi_instances or a CPU's hfi_instance. (Patch 4)
> >  * Added a dedicated (i.e., not system_wq) workqueue to process HFI updates.
> >    Reworded commit message accordingly. (Patch 5; Rafael)
> >  * Repurposed comment on possibly receiving an HFI event with a NULL
> >    hfi_cpu_info::instance. Patch 4 fixed this potential issue. Instead,
> >    add a debug statement. (Patch 5; Srinivas)
> >  * Wrapped check for NULL hfi_cpu_info::instance in the unlikely macro.
> >    (Patch 5; Srinivas)
> >  * Renamed struct cpu_capability as struct thermal_genl_cpu_caps.
> >    (Patch 6; Rafael)
> >  * Removed automatic variable ret from
> >    thermal_genl_event_cpu_capability_change() and instead always return
> >    -EMSGSIZE on error. (Patch 6; Rafael)
> >  * Reworked parsing of HFI capabilities into chunks of
> >    HFI_MAX_THERM_NOTIFY_COUNT CPUs at a time to reduce the time
> >    we spend with interrupts disabled. (Patch7; Srinivas)
> >  * Protected hfi_instance::cpus when iterating over them. (Patch 7;
> >    Rafael)
>
> All patches in the series look good to me now, so I will be queuing it
> up for 5.18 unless there are any objections or concerns.

The series has been applied as 5.18 material, thanks!

  reply	other threads:[~2022-02-03 18:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 19:34 [PATCH v5 0/7] Thermal: Introduce the Hardware Feedback Interface for thermal and performance management Ricardo Neri
2022-01-27 19:34 ` [PATCH v5 1/7] x86/Documentation: Describe the Intel Hardware Feedback Interface Ricardo Neri
2022-01-27 19:34 ` [PATCH v5 2/7] x86/cpu: Add definitions for " Ricardo Neri
2022-01-27 19:34 ` [PATCH v5 3/7] thermal: intel: hfi: Minimally initialize the " Ricardo Neri
2022-01-27 19:34 ` [PATCH v5 4/7] thermal: intel: hfi: Handle CPU hotplug events Ricardo Neri
2022-01-27 19:34 ` [PATCH v5 5/7] thermal: intel: hfi: Enable notification interrupt Ricardo Neri
2022-01-27 19:34 ` [PATCH v5 6/7] thermal: netlink: Add a new event to notify CPU capabilities change Ricardo Neri
2022-01-30 15:20   ` Rafael J. Wysocki
2022-02-10 11:22     ` Lukasz Luba
2022-01-27 19:34 ` [PATCH v5 7/7] thermal: intel: hfi: Notify user space for HFI events Ricardo Neri
2022-01-30 15:23 ` [PATCH v5 0/7] Thermal: Introduce the Hardware Feedback Interface for thermal and performance management Rafael J. Wysocki
2022-02-03 18:57   ` Rafael J. Wysocki [this message]
2022-02-05  0:47     ` Ricardo Neri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJZ5v0j7+xkYOGB8kLxGwwD3ReaXt4oMRK-D-5t2zKeMxd-CYA@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=amitk@kernel.org \
    --cc=aubrey.li@linux.intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=len.brown@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=ravi.v.shankar@intel.com \
    --cc=ricardo.neri-calderon@linux.intel.com \
    --cc=ricardo.neri@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.