Linux Test Project
 help / color / mirror / Atom feed
From: Richard Palethorpe via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Cc: Richard Palethorpe <rpalethorpe@suse.com>
Subject: [LTP] [PATCH v2 1/3] API/cgroup: Add io controller
Date: Tue, 29 Mar 2022 08:44:38 +0100	[thread overview]
Message-ID: <20220329074440.26214-1-rpalethorpe@suse.com> (raw)

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---

V2:
* Fix doc format
* abstract reading io.stat
* abstract stating the underlying device

 lib/tst_cgroup.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
index 57940ba09..feb5b3d07 100644
--- a/lib/tst_cgroup.c
+++ b/lib/tst_cgroup.c
@@ -83,6 +83,7 @@ enum cgroup_ctrl_indx {
 	CTRL_MEMORY = 1,
 	CTRL_CPU,
 	CTRL_CPUSET,
+	CTRL_IO,
 };
 #define CTRLS_MAX CTRL_CPUSET
 
@@ -191,6 +192,11 @@ static const struct cgroup_file cpuset_ctrl_files[] = {
 	{ }
 };
 
+static const struct cgroup_file io_ctrl_files[] = {
+	{ "io.stat", NULL, CTRL_IO },
+	{ }
+};
+
 /* Lookup tree for item names. */
 static struct cgroup_ctrl controllers[] = {
 	[0] = { "cgroup", cgroup_ctrl_files, 0, NULL, 0 },
@@ -203,6 +209,9 @@ static struct cgroup_ctrl controllers[] = {
 	[CTRL_CPUSET] = {
 		"cpuset", cpuset_ctrl_files, CTRL_CPUSET, NULL, 0
 	},
+	[CTRL_IO] = {
+		"io", io_ctrl_files, CTRL_IO, NULL, 0
+	},
 	{ }
 };
 
-- 
2.35.1


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

             reply	other threads:[~2022-03-29  7:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-29  7:44 Richard Palethorpe via ltp [this message]
2022-03-29  7:44 ` [LTP] [PATCH v2 2/3] API/device: Add func to stat the actual dev mounted to a path Richard Palethorpe via ltp
2022-04-12  8:46   ` Petr Vorel
2022-03-29  7:44 ` [LTP] [PATCH v2 3/3] cgroups: Add first IO controller test Richard Palethorpe via ltp
2022-04-01  8:26   ` Petr Vorel
2022-04-12 11:28     ` Richard Palethorpe
2022-04-12  8:58   ` Petr Vorel
2022-04-12  8:26 ` [LTP] [PATCH v2 1/3] API/cgroup: Add io controller 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=20220329074440.26214-1-rpalethorpe@suse.com \
    --to=ltp@lists.linux.it \
    --cc=rpalethorpe@suse.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