public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Richard Palethorpe <rpalethorpe@suse.de>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] controllers/cpuset: add cpuset files check for different OS
Date: Mon, 24 Jan 2022 15:44:04 +0100	[thread overview]
Message-ID: <Ye67NAYQaz0NS6v/@pevik> (raw)
In-Reply-To: <YYupzZpiGXDNwrus@pevik>

Hi Li,

> Hi Richie, Li,

> > 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.

> Thanks for info.


> > >> 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

> +1, just maybe tiny improvement to remove else part:

> cpuset_prefix=
> if [ -f $CPUSET/cpuset.cpus" ]; then
> 	cpuset_prefix="cpuset."
> fi

Would you mind to send v2 with code suggested by Richie?

Kind regards,
Petr

> Kind regards,
> Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2022-01-24 14:44 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
2021-11-10 11:15     ` Petr Vorel
2022-01-24 14:44       ` Petr Vorel [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=Ye67NAYQaz0NS6v/@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=rpalethorpe@suse.de \
    /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