public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: "tan.shaopeng@fujitsu.com" <tan.shaopeng@fujitsu.com>,
	Fenghua Yu <fenghua.yu@intel.com>, Shuah Khan <shuah@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH 1/5] selftests/resctrl: Clear unused initalization code in MBM tests
Date: Thu, 29 Sep 2022 08:27:38 -0700	[thread overview]
Message-ID: <d28c2b1c-a974-1622-e817-942ff28ade24@intel.com> (raw)
In-Reply-To: <TYAPR01MB63302FA7919E8C95B9C56FC08B579@TYAPR01MB6330.jpnprd01.prod.outlook.com>

Hi Shaopeng,

On 9/28/2022 10:28 PM, tan.shaopeng@fujitsu.com wrote:
>> On 9/27/2022 2:01 AM, tan.shaopeng@fujitsu.com wrote:
>>>> On 9/13/2022 6:51 PM, Shaopeng Tan wrote:
>>>>> There is a comment "Set up shemata with 100% allocation on the first run"
>>>>> in function mbm_setup(), but the condition "num_of_runs == 0" will
>>>>> never be met and write_schemata() will never be called to set
>>>>> schemata to 100%.
>>>>
>>>> Thanks for catching this.
>>>>
>>>>>
>>>>> Since umount/mount resctrl file system is run on each resctrl test,
>>>>> at the same time the default schemata will also be set to 100%.
>>>>
>>>> This is the case when a test is run with struct
>>>> resctrl_val_param->mum_resctrlfs == 1, but if the test is run with
>>>> struct resctrl_val_param->mum_resctrlfs == 0 then resctrl filesystem
>>>> will not be remounted.
>>>>
>>>> I do think that this setup function should support both cases.
>>>
>>> In mbm test(mbm_test.c), resctrl_val_param.mum_resctrlfs is set to 1
>>> and never be changed, and umount/mount resctrl file system is always
>> executed.
>>> So it is not necessary to run "if (num_of_runs == 0)".
>>
>> This is true for the current usage. You could also add a warning here ("running
>> test with stale config") if a future test sets mum_resctrlfs - but with all the
>> current output of the selftests a warning may be lost in the noise.
>>
>> I think it would just be simpler to support both cases. Having the tests be more
>> robust is good.
> 
> I understand that mum_resctrlfs should support both cases(0&1).
> 
> However, "num_of_runs++" is executed before "if (num_of_runs == 0)",
> So write_schemata() is never executed regardless of mum_rectrlfs is 0 or 1.
> 
> 97         if (num_of_runs++ >= NUM_OF_RUNS)
> 105         if (num_of_runs == 0)
> 106                 ret = write_schemata(p->ctrlgrp, "100", p->cpu_no,
> 
> I will fix this in the next version
> 

Thank you very much.

Reinette

  reply	other threads:[~2022-09-29 15:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  1:51 [PATCH 0/5] selftests/resctrl: Some improvements of resctrl selftest Shaopeng Tan
2022-09-14  1:51 ` [PATCH 1/5] selftests/resctrl: Clear unused initalization code in MBM tests Shaopeng Tan
2022-09-22 17:44   ` Reinette Chatre
2022-09-27  9:01     ` tan.shaopeng
2022-09-28 15:48       ` Reinette Chatre
2022-09-29  5:28         ` tan.shaopeng
2022-09-29 15:27           ` Reinette Chatre [this message]
2022-09-14  1:51 ` [PATCH] selftests/resctrl: Return MBA check result and make it to output message Shaopeng Tan
2022-09-22 17:51   ` Reinette Chatre
2022-09-27  8:55     ` tan.shaopeng
2022-09-14  1:51 ` [PATCH 2/5] selftests/resctrl: Clear unused common codes called by CAT/MBA tests Shaopeng Tan
2022-09-22 17:44   ` Reinette Chatre
2022-09-27  9:01     ` tan.shaopeng
2022-09-14  1:51 ` [PATCH 3/5] selftests/resctrl: Remove duplicate codes that clear each test result file Shaopeng Tan
2022-09-22 17:46   ` Reinette Chatre
2022-09-27  9:01     ` tan.shaopeng
2022-09-28 15:48       ` Reinette Chatre
2022-09-29  5:28         ` tan.shaopeng
2022-09-29 15:28           ` Reinette Chatre
2022-09-14  1:51 ` [PATCH 4/5] selftests/resctrl: Kill the child process before exiting the parent process if an exception occurs Shaopeng Tan
2022-09-22 17:47   ` Reinette Chatre
2022-09-27  9:02     ` tan.shaopeng
2022-09-14  1:51 ` [PATCH 5/5] selftests/resctrl: Flush stdout file buffer before executing fork() Shaopeng Tan
2022-09-22 17:52   ` Reinette Chatre

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=d28c2b1c-a974-1622-e817-942ff28ade24@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=tan.shaopeng@fujitsu.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