ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 05/16] API/cgroup: Add more controllers to tst_cgroup
Date: Mon, 24 Jan 2022 11:36:24 +0000	[thread overview]
Message-ID: <87fspdz6oh.fsf@suse.de> (raw)
In-Reply-To: <b000b664ed74dc8e52c7afe0061471c7f8e20d10.1642601554.git.luke.nowakowskikrijger@canonical.com>

Hello Luke,

Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com> writes:

> Add more controllers so that they can be mounted and used using the
> cgroup C api.
>
> Most of the controllers used in controllers tests are added and a
> reasonable working set of the controller control files that I came
> across are added as well.
>
> Signed-off-by: Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com>
> ---
>  lib/tst_cgroup.c | 153 ++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 152 insertions(+), 1 deletion(-)
>
> diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
> index df541d26a..3d56a3364 100644
> --- a/lib/tst_cgroup.c
> +++ b/lib/tst_cgroup.c
> @@ -84,8 +84,20 @@ enum cgroup_ctrl_indx {
>  	CTRL_MEMORY = 1,
>  	CTRL_CPU,
>  	CTRL_CPUSET,
> +	CTRL_IO,
> +	CTRL_PIDS,
> +	CTRL_RDMA,
> +	CTRL_HUGETLB,
> +	CTRL_CPUACCT,
> +	CTRL_DEVICES,
> +	CTRL_FREEZER,
> +	CTRL_NETCLS,
> +	CTRL_NETPRIO,
> +	CTRL_BLKIO,
> +	CTRL_MISC,
> +	CTRL_PERFEVENT
>  };
> -#define CTRLS_MAX CTRL_CPUSET
> +#define CTRLS_MAX CTRL_PERFEVENT
>  
>  /* At most we can have one cgroup V1 tree for each controller and one
>   * (empty) v2 tree.
> @@ -181,6 +193,109 @@ static const struct cgroup_file cpuset_ctrl_files[] = {
>  	{ }
>  };
>  
> +static const struct cgroup_file io_ctrl_files[] = {
> +	{ "io.state", NULL, CTRL_IO },
> +	{ "io.cost.qos", NULL, CTRL_IO },
> +	{ "io.cost.model", NULL, CTRL_IO },
> +	{ "io.weight", NULL, CTRL_IO },
> +	{ "io.max", NULL, CTRL_IO },
> +	{ "io.pressure", NULL, CTRL_IO },
> +	{ }
> +};
> +
> +static const struct cgroup_file pids_ctrl_files[] = {
> +	{ "pids.max", "pids.max", CTRL_PIDS },
> +	{ "pids.current", "pids.current", CTRL_PIDS },
> +	{ }
> +};
> +
> +static const struct cgroup_file rdma_ctrl_files[] = {
> +	{ "rdma.max", "rdma.max", CTRL_RDMA },
> +	{ "rdma.current", "rdma.current", CTRL_RDMA },
> +	{ }
> +};

Please don't add stuff we don't have an immediate requirement for!

We don't have any tests for RDMA yet. I can't even find the "rdma|RDMA"
in the LTP codebase. We may never test most of these controllers, it's
just dead code that will have to be rewritten if/when we have to
implement a more complex V1/V2 compatability layer. Also, as with blkio
and io, you may be adding the same controllers twice under V1 and V2
names.

Just add the exact things we need for existing tests.

-- 
Thank you,
Richard.

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

  parent reply	other threads:[~2022-01-24 11:58 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19 14:44 [LTP] [PATCH 00/16] Expand Cgroup lib and modify controller tests Luke Nowakowski-Krijger
2022-01-19 14:44 ` [LTP] [PATCH v2 01/16] API/cgroup: Modify tst_cgroup_print_config for easier parsing and consumption Luke Nowakowski-Krijger
2022-01-24 11:16   ` Richard Palethorpe
2022-01-19 14:44 ` [LTP] [PATCH 02/16] API/cgroup: Add option for specific pid to tst_cgroup_opts Luke Nowakowski-Krijger
2022-01-19 14:44 ` [LTP] [PATCH v2 03/16] API/cgroup: Add cgroup_find_root helper function Luke Nowakowski-Krijger
2022-01-19 14:44 ` [LTP] [PATCH v2 04/16] API/cgroup: Implement tst_cgroup_load_config() Luke Nowakowski-Krijger
2022-01-24 12:05   ` Richard Palethorpe
2022-03-02 18:08     ` Luke Nowakowski-Krijger
2022-01-19 14:44 ` [LTP] [PATCH 05/16] API/cgroup: Add more controllers to tst_cgroup Luke Nowakowski-Krijger
2022-01-24  7:10   ` Li Wang
2022-01-24  7:21     ` Li Wang
2022-01-24 11:36   ` Richard Palethorpe [this message]
2022-01-19 14:44 ` [LTP] [PATCH 06/16] API/cgroup: Change to TWARN when v2 controllers change Luke Nowakowski-Krijger
2022-01-24 10:44   ` Richard Palethorpe
2022-01-19 14:44 ` [LTP] [PATCH 07/16] testcases/lib: Implement tst_cgctl binary Luke Nowakowski-Krijger
2022-01-24  7:54   ` Li Wang
2022-01-19 14:44 ` [LTP] [PATCH v2 08/16] controllers: Expand cgroup_lib shell library Luke Nowakowski-Krijger
2022-01-19 14:44 ` [LTP] [PATCH 09/16] controllers: Update cgroup_fj_* to use newer cgroup lib and test lib Luke Nowakowski-Krijger
2022-01-24  8:51   ` Li Wang
2022-03-02 23:41     ` Luke Nowakowski-Krijger
2022-01-19 14:44 ` [LTP] [PATCH 10/16] controllers: Update memcg_control_test to newer test lib and cgroup lib Luke Nowakowski-Krijger
2022-01-24  9:43   ` Li Wang
2022-01-24 12:24     ` Richard Palethorpe
2022-03-02 21:37     ` Luke Nowakowski-Krijger
2022-03-04  7:11       ` Li Wang
2022-01-19 14:44 ` [LTP] [PATCH 11/16] controllers: Update memcg/regression/* to new test " Luke Nowakowski-Krijger
2022-01-19 14:44 ` [LTP] [PATCH 12/16] controllers: Update memcg_stress_test to use newer " Luke Nowakowski-Krijger
2022-01-19 14:44 ` [LTP] [PATCH 13/16] controllers: update memcg/functional " Luke Nowakowski-Krijger
2022-01-19 14:44 ` [LTP] [PATCH 14/16] controllers: Update pids.sh " Luke Nowakowski-Krijger
2022-01-24 12:26   ` Richard Palethorpe
2022-01-19 14:44 ` [LTP] [PATCH 15/16] controllers: update cpuset_regression_test.sh " Luke Nowakowski-Krijger
2022-01-19 14:44 ` [LTP] [PATCH 16/16] controllers: update cgroup_regression_test " Luke Nowakowski-Krijger
2022-01-24  9:40 ` [LTP] [PATCH 00/16] Expand Cgroup lib and modify controller tests Richard Palethorpe

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=87fspdz6oh.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=ltp@lists.linux.it \
    --cc=luke.nowakowskikrijger@canonical.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;
as well as URLs for NNTP newsgroup(s).