From: "Chen, Yu C" <yu.c.chen@intel.com>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: <x86@kernel.org>, <hpa@zytor.com>, <ben.horgan@arm.com>,
<fustini@kernel.org>, <fenghuay@nvidia.com>,
<peternewman@google.com>, <tony.luck@intel.com>,
<linux-kernel@vger.kernel.org>, <patches@lists.linux.dev>,
<james.morse@arm.com>, <Dave.Martin@arm.com>,
<babu.moger@amd.com>, <tglx@linutronix.de>,
<dave.hansen@linux.intel.com>, <bp@alien8.de>
Subject: Re: [PATCH v2 09/14] fs/resctrl: Add last_cmd_status support for writes to max_threshold_occupancy
Date: Mon, 23 Mar 2026 17:14:58 +0800 [thread overview]
Message-ID: <a3e604f4-42b9-4a10-9829-928bc9fd7b4d@intel.com> (raw)
In-Reply-To: <1477243b7c470baa920d94477b30d41405fce45c.1774043709.git.reinette.chatre@intel.com>
On 3/21/2026 6:03 AM, Reinette Chatre wrote:
> info/last_cmd_status is intended to contain more information if a write to
> any resctrl file fails. Writes to max_threshold_occupancy did not receive
> last_cmd_status support during initial last_cmd_status enabling. Add it now.
>
> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
> Reviewed-by: Ben Horgan <ben.horgan@arm.com>
> ---
> Changes since v1:
> - Add Ben's RB tag.
> ---
> fs/resctrl/rdtgroup.c | 21 ++++++++++++++++-----
> 1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
> index 111bff8e33fd..6fa5c8f14e3a 100644
> --- a/fs/resctrl/rdtgroup.c
> +++ b/fs/resctrl/rdtgroup.c
> @@ -1238,16 +1238,27 @@ static ssize_t max_threshold_occ_write(struct kernfs_open_file *of,
> unsigned int bytes;
> int ret;
>
> + mutex_lock(&rdtgroup_mutex);
Maybe guard(mutex)(&rdtgroup_mutex) and return ret when failed
so we can get rid of goto out_unlock
thanks,
Chenyu
next prev parent reply other threads:[~2026-03-23 9:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 22:03 [PATCH v2 00/14] x86,fs/resctrl: Improve resctrl quality and consistency Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 01/14] MAINTAINERS: Update resctrl entry Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 02/14] fs/resctrl: Add missing return value descriptions Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 03/14] fs/resctrl: Avoid "may be used uninitialized" warning Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 04/14] fs/resctrl: Use correct format specifier for printing error pointers Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 05/14] x86/resctrl: Protect against bad shift Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 06/14] fs/resctrl: Change pattern used to track number of entries in enum Reinette Chatre
2026-03-23 10:53 ` Ben Horgan
2026-03-20 22:03 ` [PATCH v2 07/14] fs/resctrl: Use accurate type for rdt_resource::rid Reinette Chatre
2026-03-23 10:54 ` Ben Horgan
2026-03-20 22:03 ` [PATCH v2 08/14] fs/resctrl: Pass error reading event through to user space Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 09/14] fs/resctrl: Add last_cmd_status support for writes to max_threshold_occupancy Reinette Chatre
2026-03-23 9:14 ` Chen, Yu C [this message]
2026-03-23 16:56 ` Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 10/14] fs/resctrl: Use accurate and symmetric exit flows Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 11/14] fs/resctrl: Use stricter checks on input to cpus/cpus_list file Reinette Chatre
2026-03-25 18:18 ` Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 12/14] fs/resctrl: Change last_cmd_status custom during input parsing Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 13/14] fs/resctrl: Communicate resource group deleted error via last_cmd_status Reinette Chatre
2026-03-20 22:03 ` [PATCH v2 14/14] fs/resctrl: Inform user space when status buffer overflowed Reinette Chatre
2026-03-23 10:49 ` 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=a3e604f4-42b9-4a10-9829-928bc9fd7b4d@intel.com \
--to=yu.c.chen@intel.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=ben.horgan@arm.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fenghuay@nvidia.com \
--cc=fustini@kernel.org \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=peternewman@google.com \
--cc=reinette.chatre@intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@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
Powered by JetHome