Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Cristian Marussi <cristian.marussi@arm.com>
Cc: Christian Brauner <brauner@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org,
	sudeep.holla@kernel.org, james.quinlan@broadcom.com,
	f.fainelli@gmail.com, vincent.guittot@linaro.org,
	etienne.carriere@st.com, peng.fan@oss.nxp.com,
	michal.simek@amd.com, d-gole@ti.com, jic23@kernel.org,
	elif.topuz@arm.com, lukasz.luba@arm.com, philip.radford@arm.com,
	souvik.chakravarty@arm.com, leitao@kernel.org, kas@kernel.org,
	puranjay@kernel.org, usama.arif@linux.dev, kernel-team@meta.com
Subject: Re: [PATCH v4 00/31] Introduce SCMI Telemetry FS support
Date: Mon, 22 Jun 2026 14:20:07 +0200	[thread overview]
Message-ID: <eba18827-5ef5-464c-90f0-2444a996acac@kernel.org> (raw)
In-Reply-To: <ajU7UqwPZBlwRGkf@pluto>

>>>
>>> There is more stuff that indeed is configurable per the SCMI spec
>>> but these additional params are hidden into the SCMI Telemetry protocol
>>> layer (the initial patches in this series) and NOT made available to
>>> the driver/users of the protocol (like the SCMI FS driver that sits on
>>> top)
>>
>> Do you assume that there will get significantly more config options added in the
>> future for user space to configure?
> 
> No, I dont think so...the only planned extensions were to support more
> performant read access mechanisms, i.e. direct mmap'ability of FW/Kernel
> SCMI Telemetry shared memory areas...BUT that will immediately dump all
> the bulk of the lower layer protocol work into the tools domain...and

Right. I guess you would hide that in library code, and provide a stable API
towards tools such that they won't have to worry about the implementation
details regarding how the values are obtained exactly.

[...]

>>>
>>> ...most of the other entries in the tree are simply RO properties of the DEs
>>> that have been discovered at enumeration time.
>>
>> Is this bulk-reading relevant for performance or just a "nice to have" ?
>>
> 
> I suppose depends on your usage pattern: it is definitely relevant
> because the main collection mechanism are shared memory areas (SHMTIs)
> between the platform firmware and the Kernel: such areas being accessed
> from 2 differnt worlds concurrently come with a SCMI-specified
> synchro/consistency mechanism based simply on a pair of sequence numbers
> placed at the start and at the end of the SHMTI, so that the FW increases
> such magic numbers in a well-known way before and after updating the SHMTI
> values, so that the kernel can detect (without any interlocking mechanism)
> if a platform write happened in the middle of its reads...

Okay, so sequence counters to detect concurrent changes and retry.

> 
> ...so if you read one single DE 64bit value, under the hood the kernel
> would have had to really perform at leats 3 reads from the SHMTI to check
> the consistecy of that single read...
> 
> ... while if you do a bulk_read the overhead due to the consistecy
> checks gets 'spread' across a number of DEs because the kernel will snapshot
> the whole SHMTIs (potentially KBytes) between the 2 consistency reads

That makes sense.

I guess a user space library could implement some kind of caching (bulk-read,
then provide clean access to individual DEs) to hide the details from the tools?

> 
> ...the good side effect of all of this is that I can leverage such
> sequence number to optimize reads..i.e. do NOT even try to read anything
> if the new sequnce number is unchanged from the last one I cached on the
> last successfull read of this value...

Right.

> 
> So at the end I would say it is NOT simply a nice to have BUT it is
> certainly only the first step towards a more performant alternative access
> (like with mmaps)...it depends on the usage pattern...I am not sure what
> mechanism is used by our tools more...

Okay.

>>
>> Yes. How high-priority is the fs side? Or would a tool using a library to access
>> this information also work in the first step?
>>
> 
> I have to sync with tools on this...because they are stiil probably
> using currently the FS, but it was already planned for the future to move to
> a more low level access (ioctl/mmap)...
> 
> ...my aim would be, at this point, to favour this transition without sudden
> breaking their current world (and have to expatriate :P)
> 
> ..from my personal point of view, I would certainly like to still have the
> FUSE layer for ease of testing and verification on my side...but it is just
> a nice to have... 

Okay, what I thought. I assume the most important part is to be able to grab
telemetry data in an efficient way on a system to then share it with some
monitoring agent. Manually digging through the FS to inspect data (debugging,
..) is probably less relevant for the target use case.

>> Okay, so a single writer (admin) changing stuff could get picked up my possibly
>> many concurrent readers?
> 
> Mmm...not sure what you mean here...
> 
> If you configure your Telemetry as you desire and start collecting data via
> readers, BUT then some other process changes configs under your belt, that is
> allowed as said, and so your analisys could be impacted...(something turned off
> as an example, or update interval changed)...

I was rather wondering about "turning on more" concurrently. But yeah, makes sense.

(it's the same situation other system-wide settings. If one app enables KSM and
the another one disables KSM, inconsistency is unavoidable)

>>
> 
> Thanks a lot, David !

Let's hope for some guidance regarding the FS side soon.

But yeah, avoiding the in-kernel FS sounds completely reasonable at this point.

-- 
Cheers,

David


      reply	other threads:[~2026-06-22 12:20 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 22:37 [PATCH v4 00/31] Introduce SCMI Telemetry FS support Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 01/31] firmware: arm_scmi: Add new SCMIv4.0 error codes definitions Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 02/31] firmware: arm_scmi: Reduce the scope of protocols mutex Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 03/31] firmware: arm_scmi: Allow registration of unknown-size events/reports Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 04/31] firmware: arm_scmi: Allow protocols to register for notifications Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 05/31] uapi: Add ARM SCMI definitions Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 06/31] dt-bindings: firmware: arm,scmi: Add support for telemetry protocol Cristian Marussi
2026-06-15 22:14   ` Rob Herring (Arm)
2026-06-12 22:37 ` [PATCH v4 07/31] include: trace: Add Telemetry trace events Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 08/31] firmware: arm_scmi: Add basic Telemetry support Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 09/31] firmware: arm_scmi: Add support to parse SHMTIs areas Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 10/31] firmware: arm_scmi: Add Telemetry configuration operations Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 11/31] firmware: arm_scmi: Add Telemetry DataEvent read capabilities Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 12/31] firmware: arm_scmi: Add support for Telemetry reset Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 13/31] firmware: arm_scmi: Add Telemetry notification support Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 14/31] firmware: arm_scmi: Add support for boot-on Telemetry Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 15/31] firmware: arm_scmi: Add Telemetry generation counter Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 16/31] firmware: arm_scmi: Add common per-protocol debugfs support Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 17/31] firmware: arm_scmi: Add Telemetry debugfs SHMTI dump support Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 18/31] firmware: arm_scmi: Add Telemetry debugfs ABI documentation Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 19/31] firmware: arm_scmi: stlmfs: Add System Telemetry filesystem driver Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 20/31] fs/stlmfs: Document ARM SCMI Telemetry filesystem Cristian Marussi
2026-06-13  5:27   ` Randy Dunlap
2026-06-12 22:37 ` [PATCH v4 21/31] firmware: arm_scmi: stlmfs: Add basic mount options Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 22/31] fs/stlmfs: Document ARM SCMI Telemetry FS " Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 23/31] firmware: arm_scmi: stlmfs: Add ioctls support Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 24/31] fs/stlmfs: Document alternative ioctl based binary interface Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 25/31] firmware: arm_scmi: stlmfs: Add by-components view Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 26/31] fs/stlmfs: Document alternative topological view Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 27/31] firmware: arm_scmi: stlmfs: Add generation file Cristian Marussi
2026-06-12 22:37 ` [PATCH v4 28/31] [RFC] docs: stlmfs: Document ARM SCMI Telemetry FS ABI Cristian Marussi
2026-06-13  5:30   ` Randy Dunlap
2026-06-12 22:37 ` [PATCH v4 29/31] firmware: arm_scmi: stlmfs: Add lazy population support Cristian Marussi
2026-06-12 22:38 ` [PATCH v4 30/31] fs/stlmfs: Document lazy mode and related mount option Cristian Marussi
2026-06-12 22:38 ` [PATCH v4 31/31] [RFC] tools/scmi: Add SCMI Telemetry testing tool Cristian Marussi
2026-06-13  5:35 ` [PATCH v4 00/31] Introduce SCMI Telemetry FS support Randy Dunlap
2026-06-17 12:58 ` Christian Brauner
2026-06-17 17:11   ` Cristian Marussi
2026-06-18 17:22     ` David Hildenbrand (Arm)
2026-06-18 17:27       ` David Hildenbrand (Arm)
2026-06-18 23:28       ` Cristian Marussi
2026-06-19 10:16         ` David Hildenbrand (Arm)
2026-06-19 12:51           ` Cristian Marussi
2026-06-22 12:20             ` David Hildenbrand (Arm) [this message]

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=eba18827-5ef5-464c-90f0-2444a996acac@kernel.org \
    --to=david@kernel.org \
    --cc=arm-scmi@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=d-gole@ti.com \
    --cc=elif.topuz@arm.com \
    --cc=etienne.carriere@st.com \
    --cc=f.fainelli@gmail.com \
    --cc=james.quinlan@broadcom.com \
    --cc=jic23@kernel.org \
    --cc=kas@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=leitao@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=michal.simek@amd.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=philip.radford@arm.com \
    --cc=puranjay@kernel.org \
    --cc=souvik.chakravarty@arm.com \
    --cc=sudeep.holla@kernel.org \
    --cc=usama.arif@linux.dev \
    --cc=vincent.guittot@linaro.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