[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aGa8Pg9pSCJ3XjtY@agluck-desk3>
Date: Thu, 3 Jul 2025 10:22:06 -0700
From: "Luck, Tony" <tony.luck@...el.com>
To: Reinette Chatre <reinette.chatre@...el.com>
Cc: Fenghua Yu <fenghuay@...dia.com>,
Maciej Wieczor-Retman <maciej.wieczor-retman@...el.com>,
Peter Newman <peternewman@...gle.com>,
James Morse <james.morse@....com>, Babu Moger <babu.moger@....com>,
Drew Fustini <dfustini@...libre.com>,
Dave Martin <Dave.Martin@....com>,
Anil Keshavamurthy <anil.s.keshavamurthy@...el.com>,
Chen Yu <yu.c.chen@...el.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH v6 00/30] x86,fs/resctrl telemetry monitoring
On Thu, Jul 03, 2025 at 09:45:15AM -0700, Reinette Chatre wrote:
> Hi Tony and Dave,
>
> On 6/26/25 9:49 AM, Tony Luck wrote:
> > --- 14 ---
> > Add mon_evt::is_floating_point set by resctrl file system code to limit
> > which events architecture code can request be displayed in floating point.
> >
> > Simplified the fixed-point to floating point algorithm. Reinette is
> > correct that the additional "lshift" and "rshift" operations are not
> > required. All that is needed is to multiply the fixed point fractional
> > part by 10**decimal_places, add a rounding amount equivalent to a "1"
> > in the binary place after those supplied. Finally divide by 2**binary_places
> > (with a right shift).
> >
> > Explained in commit comment how I chose the number of decimal places to
> > use for each binary places value.
> >
> > N.B. Dave Martin expressed an opinion that the kernel should not do
> > this conversion. Instead it should enumerate the scaling factor for
> > each event where hardware reported a fixed point value. This patch
> > could be dropped and replaced with one to enumerate scaling factors
> > per event if others agree with Dave.
>
> Could resctrl accommodate both usages? For example, it does not
> look too invasive to add a second file <mon_evt::name>.raw for the
> mon_evt::is_floating_point events that can output something like Dave
> suggested in [1]:
>
> .raw file format could be:
> #format:<output that depends on format>
> #fixed-point:<value>/<scaling factor>
>
> Example output:
> fixed-point:0x60000/0x40000
Dave: Is that what you want in the ".raw" file? An alternative would be
to put the format information for non-integer events into an
"info" file ("info/{RESOURCE_NAME}_MON/monfeatures.raw.formats"?)
and just put the raw value into the ".raw" file under mon_data.
>
> Reinette
>
> [1] https://lore.kernel.org/lkml/aEhMWBemtev%2Ff3yf@e133380.arm.com/
-Tony
Powered by blists - more mailing lists