From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/4] lib: add new cgroup test API
Date: Fri, 5 Jun 2020 12:14:43 +0200 [thread overview]
Message-ID: <20200605101443.GA6826@janakin.usersys.redhat.com> (raw)
In-Reply-To: <CAEemH2ey08M+-ddqh1DNWSOWSi7RNYz8ho=MSPQryYHSqamffg@mail.gmail.com>
On Wed, Jun 03, 2020 at 08:51:37PM +0800, Li Wang wrote:
>> I don't get why global variables are necessary.
>>
>
>The only reason to export them as global variables is to make the legacy
>read/write_cpuse_files() happy. So that I said it is a compromise.
>
>$ git grep tst_cgroup_new_path
>cpuset/cpuset01.c: write_cpuset_files(tst_cgroup_new_path, "cpus",
>buf);
>cpuset/cpuset01.c: write_cpuset_files(tst_cgroup_new_path, "mems",
>mems);
>cpuset/cpuset01.c: write_cpuset_files(tst_cgroup_new_path, "mems",
>buf);
>cpuset/cpuset01.c: write_cpuset_files(tst_cgroup_new_path, "mems",
>buf);
>lib/mem.c: write_cpuset_files(tst_cgroup_new_path, "mems", buf);
>lib/mem.c: write_cpuset_files(tst_cgroup_new_path, "cpus",
>cpus);
>lib/mem.c: write_cpuset_files(tst_cgroup_new_path, "cpus",
>"0");
>oom/oom04.c: write_cpuset_files(tst_cgroup_new_path,
>"memory_migrate", "1");
>oom/oom05.c: write_cpuset_files(tst_cgroup_new_path,
>"memory_migrate", "1");
What if we provided access to it via API? Would we still need these
global variables?
char *tst_cgroup_get_path(const char *cgroup_mnt)
// return ptr to tst_cgroup_paths->new_path
mount path is always known to test, because it passes it to tst_cgroup_mount(),
so it just needs to find out "new path".
Would that satisfy the need of this legacy test?
next prev parent reply other threads:[~2020-06-05 10:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 10:04 [LTP] [PATCH v2 1/4] lib: add new cgroup test API Li Wang
2020-06-01 10:04 ` [LTP] [PATCH v2 2/4] mem: take use of new cgroup API Li Wang
2020-06-01 10:04 ` [LTP] [PATCH v2 3/4] mem: remove the old " Li Wang
2020-06-01 10:04 ` [LTP] [PATCH v2 4/4] mm: add cpuset01 to runtest file Li Wang
2020-06-01 10:58 ` [LTP] [PATCH v2 1/4] lib: add new cgroup test API Li Wang
2020-06-01 13:57 ` Jan Stancek
2020-06-02 4:42 ` Li Wang
2020-06-02 12:12 ` Jan Stancek
2020-06-03 1:38 ` Li Wang
2020-06-03 10:43 ` Jan Stancek
2020-06-03 12:51 ` Li Wang
2020-06-05 10:14 ` Jan Stancek [this message]
2020-06-08 8:53 ` Li Wang
2020-06-08 9:48 ` Jan Stancek
2020-06-08 10:18 ` Li Wang
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=20200605101443.GA6826@janakin.usersys.redhat.com \
--to=jstancek@redhat.com \
--cc=ltp@lists.linux.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.