From: Richard Palethorpe <rpalethorpe@suse.de>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] controllers/cpuset: add cpuset files check for different OS
Date: Wed, 10 Nov 2021 10:06:34 +0000 [thread overview]
Message-ID: <87czn8qpkd.fsf@suse.de> (raw)
In-Reply-To: <20190313115844.GB2606@dell5510>
Hello,
Petr Vorel <pvorel@suse.cz> writes:
> Hi Li,
>
>> While mounting cpuset cgroup, the subsystem directory entries
>> differ in different OS release.
>> eg, cpuset.cpus file on Ubuntu and cpus on some other release.
> Which ones, please? I'm not aware of anyone.
Unfortunately it is possible. cpuset can be mounted without a prefix
using a legacy compatability option. OTOH this is really ancient.
>
>> So we add cpuset files checker to make sure the test work well
>> on all OS release.
>
> ...
>> +++ b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
> ...
>> +cpus_file=
>> +cpu_exclusive_file=
>> +mems_file=
>> +memory_pressure_file=
>> +memory_pressure_enabled_file=
>> +mem_exclusive_file=
>> +mem_hardwall_file=
>> +memory_migrate_file=
>> +memory_spread_page_file=
>> +memory_spread_slab_file=
>> +sched_load_balance_file=
>> +sched_relax_domain_level_file=
> Maybe move the ones in $CPUSET/cpuset.cpus clause here as the default ones
> and move those from else clause into setup.
>
> ...
>> +# check cpuset cgroup files for different OS
>> +cpuset_files_check()
>> +{
>> + setup
> I guess this should be vice versa, i.e. cpuset_files_check() be part of setup()
> And then not needed to be added into all functions using cpuset_funcs.sh
Probably we could just do
if [ -f $CPUSET/cpuset.cpus" ]; then
cpuset_prefix="cpuset."
else
cpuset_prefix=
fi
then replace cpuset. with $cpuset_prefix
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2021-11-10 10:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-28 9:02 [LTP] [PATCH] controllers/cpuset: add cpuset files check for different OS Li Jinyue
2019-03-13 11:58 ` Petr Vorel
2021-11-10 10:06 ` Richard Palethorpe [this message]
2021-11-10 11:15 ` Petr Vorel
2022-01-24 14:44 ` Petr Vorel
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=87czn8qpkd.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/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