public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Martin <Dave.Martin@arm.com>
To: Aaron Tomlin <atomlin@atomlin.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
	"Chatre, Reinette" <reinette.chatre@intel.com>,
	"james.morse@arm.com" <james.morse@arm.com>,
	"babu.moger@amd.com" <babu.moger@amd.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"bp@alien8.de" <bp@alien8.de>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/1] fs/resctrl: Show domain CPU list in schema output
Date: Mon, 3 Nov 2025 16:19:05 +0000	[thread overview]
Message-ID: <aQjV+Q25+O/8DpBS@e133380.arm.com> (raw)
In-Reply-To: <c26dierez6gzngp2syreufhdwhx64iuiox6cqrpeomz2ieuwkh@4l35mbkc4ez6>

Hi,

On Fri, Oct 31, 2025 at 05:25:41PM -0400, Aaron Tomlin wrote:
> On Fri, Oct 31, 2025 at 07:03:15PM +0000, Luck, Tony wrote:
> > 1) You'd also need to change the "write" path for the schemata file
> > (treating the CPU list as read-only).
> > 
> > 2) This would break user ABI, so is not going to happen.
> 
> Hi Tony,
> 
> Thank you for following up.
> 
> If I understand correctly, parse_cbm() and parse_bw() would return -EINVAL
> if the user incorrectly included the CPU list, no?
> 
> I suspect the issue is if one can read something from a file, one should be
> able to write the same thing back and have it either succeed or process
> only the valid parts. I agree maintaining ABI compatibility while allowing
> the new verbose output on the read path is not ideal.

Partly, but existing software that reads the file is also likely to get
confused by the new syntax appearing when reading the file.

(Nothing requires the data read out from the file to resemble what is
written in, though it certainly less surprising for userspace if it
looks the same, and if the data read will be accepted, with the same
meaning, when written back in.)


Note, using a comma as a delimiter may be problematic with %pbl-style
lists, since if the list is discontiguous then the pretty-printed list
can contain commas too.

On my system:

$ cat /sys/devices/system/cpu/cpu0/cache/index3/shared_cpu_list
-->
0-15,32-47

> > Users can see the association between the domain numbers and
> > CPUs in sysfs.
> > 
> > $ cat /sys/devices/system/cpu/cpu0/cache/index3/id
> > 0
> > $ cat /sys/devices/system/cpu/cpu0/cache/index3/shared_cpu_list
> > 0-27
> > 
> > Maybe not as convenient as a direct read-out in the schemata file.
> > But the information is easily accessible.
> 
> No, using the above to establish the association is absolutely fine. 

In theory, a alternate write syntax could be supported without
breaking compatibility, say:

	cpu<n>=<mask>

instead of

	<domain>=<main>

as a alternative way of referring to the control domain containing
CPU <n>.

But I think that this may do as much harm as good -- if the user
doesn't understand the topology, trying to program the masks on a per-
CPU basis isn't going to work do what the user wants anyway.

So I think we'd want a good argument as to why this is needed / useful.

Cheers
---Dave

  reply	other threads:[~2025-11-03 16:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-31 18:17 [PATCH 0/1] fs/resctrl: Show domain CPU list in schema output Aaron Tomlin
2025-10-31 18:17 ` [PATCH 1/1] " Aaron Tomlin
2025-10-31 19:03 ` [PATCH 0/1] " Luck, Tony
2025-10-31 21:25   ` Aaron Tomlin
2025-11-03 16:19     ` Dave Martin [this message]
2025-11-06  4:41       ` Aaron Tomlin

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=aQjV+Q25+O/8DpBS@e133380.arm.com \
    --to=dave.martin@arm.com \
    --cc=atomlin@atomlin.com \
    --cc=babu.moger@amd.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    /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