mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Horgan <ben.horgan@arm.com>
To: Babu Moger <bmoger@amd.com>, linux-kernel@vger.kernel.org
Cc: tony.luck@intel.com, reinette.chatre@intel.com,
	Dave.Martin@arm.com, james.morse@arm.com, babu.moger@amd.com,
	bp@alien8.de
Subject: Re: [PATCH v1] fs/resctrl: Add missing kconfig entry for CONFIG_RESCTRL_ASSIGN_FIXED
Date: Thu, 15 Jan 2026 11:41:09 +0000	[thread overview]
Message-ID: <ac274474-1a51-4ce3-9e67-a72fd465263b@arm.com> (raw)
In-Reply-To: <d07db02d-4c1c-46c5-bd90-9ab579158744@amd.com>

Hi Babu,

On 1/13/26 19:10, Babu Moger wrote:
> Hi Ben,
> 
> On 1/13/26 08:49, Ben Horgan wrote:
>> The commit 3b497c3f4f04 ("fs/resctrl: Introduce the interface to display
>> monitoring modes") introduced CONFIG_RESCTRL_ASSIGN_FIXED but did not add
>> the kconfig entry. Add this.
> Add this -> Add the missing configuration option  or Add the missing
> Kconfig option. ?

I'll update the commit message to make it clearer that the change is
adding a Kconfig option that was previously intentionally left
undefined. (As per Reinette's review comments.)

>>
>> Also, take the opportunity ensure that any user attempt to change the
>> assign mode fails from the resctrl code rather than delegating to the
>> arch
> 
> assign mode -> counter assignment mode

Ack.

> 
> 
>> specific code and let the user know by adding a message in
>> last_cmd_status.
>>
>> Fixes: 3b497c3f4f04 ("fs/resctrl: Introduce the interface to display
>> monitoring modes")
>> Signed-off-by: Ben Horgan <ben.horgan@arm.com>
>> ---
>>   fs/resctrl/Kconfig   | 8 ++++++++
>>   fs/resctrl/monitor.c | 6 ++++++
>>   2 files changed, 14 insertions(+)
>>
>> diff --git a/fs/resctrl/Kconfig b/fs/resctrl/Kconfig
>> index 21671301bd8a..bdf9e11502fa 100644
>> --- a/fs/resctrl/Kconfig
>> +++ b/fs/resctrl/Kconfig
>> @@ -37,3 +37,11 @@ config RESCTRL_RMID_DEPENDS_ON_CLOSID
>>         Enabled by the architecture when the RMID values depend on the
>> CLOSID.
>>         This causes the CLOSID allocator to search for CLOSID with clean
>>         RMID.
>> +
>> +config RESCTRL_ASSIGN_FIXED
>> +    bool
>> +    depends on RESCTRL_FS
>> +    help
>> +     Enabled by the architecture when the counter assignment mode is not
>> +     configurable. This ensures that counter assignment is not
>> advertised as
>> +     configurable and configuration attempts fail.
>> diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c
>> index 572a9925bd6c..888e303c18a2 100644
>> --- a/fs/resctrl/monitor.c
>> +++ b/fs/resctrl/monitor.c
>> @@ -1434,6 +1434,12 @@ ssize_t resctrl_mbm_assign_mode_write(struct
>> kernfs_open_file *of, char *buf,
>>         rdt_last_cmd_clear();
>>   +    if (IS_ENABLED(CONFIG_RESCTRL_ASSIGN_FIXED)) {
>> +        ret = -EINVAL;
>> +        rdt_last_cmd_puts("assign mode is not configurable\n");
> 
> assign mode -> counter assignment mode

Ack

> 
> 
>> +        goto out_unlock;
>> +    }
>> +
>>       if (!strcmp(buf, "default")) {
>>           enable = 0;
>>       } else if (!strcmp(buf, "mbm_event")) {


Thanks,

Ben


  reply	other threads:[~2026-01-15 11:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-13 14:49 Ben Horgan
2026-01-13 19:10 ` Babu Moger
2026-01-15 11:41   ` Ben Horgan [this message]
2026-01-14 19:09 ` Reinette Chatre
2026-01-15 10:32   ` Ben Horgan
2026-01-15 15:37     ` Reinette Chatre
2026-01-15 15:46       ` Ben Horgan
2026-01-15 17:19         ` Reinette Chatre
2026-01-16  9:51           ` Ben Horgan

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=ac274474-1a51-4ce3-9e67-a72fd465263b@arm.com \
    --to=ben.horgan@arm.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=bmoger@amd.com \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --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

all inboxes | Powered by JetHome®