From: Reinette Chatre <reinette.chatre@intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Fenghua Yu" <fenghua.yu@intel.com>,
"Shuah Khan" <shuah@kernel.org>,
"Maciej Wieczor-Retman" <maciej.wieczor-retman@intel.com>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 1/1] selftests/resctrl: Don't fail MBM test when schemata doesn't support MB:x=x line
Date: Tue, 17 Oct 2023 09:17:55 -0700 [thread overview]
Message-ID: <fc9266f3-ea4b-4df5-82ab-697ca6742176@intel.com> (raw)
In-Reply-To: <20231017121750.15433-1-ilpo.jarvinen@linux.intel.com>
Hi Ilpo,
The subject could be shortened to:
selftests/resctrl: Fix MBM test failure when MBA unavailable
On 10/17/2023 5:17 AM, Ilpo Järvinen wrote:
> Commit 20d96b25cc4c ("selftests/resctrl: Fix schemata write error
> check") exposed a problem in feature detection logic in MBM selftest.
> If schemata does not support MB:x=x entries, the schemata write to
> initialize 100% memory bandwidth allocation in mbm_setup() will now
> fail with -EINVAL due to the error handling corrected by 20d96b25cc4c.
> Commit 20d96b25cc4c just uncovers the failed write, it is not wrong
> itself.
>
> If MB:x=x is not supported by schemata, it is safe to assume 100%
> memory bandwidth is always set. Therefore, the previously ignored error
> does not make the MBM test itself wrong.
>
> Restore the previous behavior of MBM test by checking MB support before
> attempting to write it into schemata which results in behavior
> equivalent to ignoring the write error.
>
> Fixes: 20d96b25cc4c ("selftests/resctrl: Fix schemata write error check")
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> tools/testing/selftests/resctrl/mbm_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c
> index d3c0d30c676a..85987957e7f5 100644
> --- a/tools/testing/selftests/resctrl/mbm_test.c
> +++ b/tools/testing/selftests/resctrl/mbm_test.c
> @@ -95,7 +95,7 @@ static int mbm_setup(struct resctrl_val_param *p)
> return END_OF_TESTS;
>
> /* Set up shemata with 100% allocation on the first run. */
> - if (p->num_of_runs == 0)
> + if ((p->num_of_runs == 0) && validate_resctrl_feature_request("MB", NULL))
> ret = write_schemata(p->ctrlgrp, "100", p->cpu_no,
> p->resctrl_val);
>
Thank you for catching this.
Could you please ensure that this patch passes a "checkpatch.pl --strict" check?
With that addressed:
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reinette
prev parent reply other threads:[~2023-10-17 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 12:17 Ilpo Järvinen
2023-10-17 16:17 ` Reinette Chatre [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=fc9266f3-ea4b-4df5-82ab-697ca6742176@intel.com \
--to=reinette.chatre@intel.com \
--cc=fenghua.yu@intel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maciej.wieczor-retman@intel.com \
--cc=shuah@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
all inboxes | Powered by JetHome®