From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/5] platform/x86/intel-uncore-freq: Add attributes to show agent types
Date: Wed, 07 May 2025 07:17:56 -0700 [thread overview]
Message-ID: <06d57c763f54082c01ab7f1ced896910b0e8a680.camel@linux.intel.com> (raw)
In-Reply-To: <d80e1c91-64c4-8942-921a-91c78b6cbf05@linux.intel.com>
On Wed, 2025-05-07 at 16:02 +0300, Ilpo Järvinen wrote:
> On Mon, 28 Apr 2025, Srinivas Pandruvada wrote:
>
> > Currently, users need detailed hardware information to understand
> > the
> > scope of controls within each uncore domain. Uncore frequency
> > controls
> > manage subsystems such as core, cache, memory, and I/O. The UFS
> > TPMI
> > provides this information, which can be used to present the scope
> > more
> > clearly.
> >
> > Each uncore domain consists of one or more agent types, with each
> > agent
> > type controlling one or more uncore hardware subsystems. For
> > example, a
> > single agent might control both the core and cache.
> >
> > Introduce a new attribute called "agent_types." This attribute
> > displays
> > a list of agents, separated by space character.
> >
> > The string representations for agent types are as follows:
> > For core agent: core
> > For cache agent: cache
> > For memory agent: memory
> > For I/O agent: io
> >
> > These agent types are read during probe time for each cluster and
> > stored
> > as part of the struct uncore_data.
> >
> > Signed-off-by: Srinivas Pandruvada
> > <srinivas.pandruvada@linux.intel.com>
> > ---
> > v2:
> > No change
> >
> > .../uncore-frequency-common.c | 24
> > ++++++++++++++++
> > .../uncore-frequency-common.h | 17 ++++++++++-
> > .../uncore-frequency/uncore-frequency-tpmi.c | 28
> > +++++++++++++++++++
> > 3 files changed, 68 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-
> > frequency-common.c b/drivers/platform/x86/intel/uncore-
> > frequency/uncore-frequency-common.c
> > index 4e2c6a2d7e6e..cfa3039a0e39 100644
> > --- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-
> > common.c
> > +++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-
> > common.c
> > @@ -43,6 +43,28 @@ static ssize_t show_package_id(struct kobject
> > *kobj, struct kobj_attribute *attr
> > return sprintf(buf, "%u\n", data->package_id);
> > }
> >
> > +static ssize_t show_agent_types(struct kobject *kobj, struct
> > kobj_attribute *attr, char *buf)
> > +{
> > + struct uncore_data *data = container_of(attr, struct
> > uncore_data, agent_types_kobj_attr);
> > + int length = 0;
> > +
> > + if (data->agent_type_mask & AGENT_TYPE_CORE)
> > + length += sysfs_emit_at(buf, length, "core ");
> > +
> > + if (data->agent_type_mask & AGENT_TYPE_CACHE)
> > + length += sysfs_emit_at(buf, length, "cache ");
> > +
> > + if (data->agent_type_mask & AGENT_TYPE_MEMORY)
> > + length += sysfs_emit_at(buf, length, "memory ");
> > +
> > + if (data->agent_type_mask & AGENT_TYPE_IO)
> > + length += sysfs_emit_at(buf, length, "io ");
>
> Is this set going to get expanded soon?
Unlikely, as this list is adding every frequency scaled subsystem.
But I will try to change to loop. No issue.
Thanks,
Srinivas
> It would feel more future proof to
> do this mapping using a loop and array. You also chose the quick and
> dirty
> approach wrt. trailing spaces as getting rid of the extra space is a
> bit
> tedious when open coding the mapping like that ;-).
>
next prev parent reply other threads:[~2025-05-07 14:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 17:03 [PATCH v2 0/5] intel-uncore-freq: Add agent_types and die_id attributes Srinivas Pandruvada
2025-04-28 17:03 ` [PATCH v2 1/5] platform/x86/intel-uncore-freq: Add attributes to show agent types Srinivas Pandruvada
2025-05-07 13:02 ` Ilpo Järvinen
2025-05-07 14:17 ` srinivas pandruvada [this message]
2025-04-28 17:03 ` [PATCH v2 2/5] Documentation: admin-guide: pm: Add documentation for agent_types Srinivas Pandruvada
2025-04-28 17:03 ` [PATCH v2 3/5] platform/x86/intel: power-domains: Add interface to get Linux die ID Srinivas Pandruvada
2025-04-28 17:03 ` [PATCH v2 4/5] platform/x86/intel-uncore-freq: Add attributes to show die_id Srinivas Pandruvada
2025-04-28 17:03 ` [PATCH v2 5/5] Documentation: admin-guide: pm: Add documentation for die_id Srinivas Pandruvada
2025-05-07 13:09 ` Ilpo Järvinen
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=06d57c763f54082c01ab7f1ced896910b0e8a680.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox