From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH RFC 1/4] lib: add new cgroup test API
Date: Wed, 27 May 2020 03:11:04 -0400 (EDT) [thread overview]
Message-ID: <1731864663.13759097.1590563464850.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <CAEemH2cGa5tvgWAPbyoanBKh7MbM4kuo+Ws_i0Z2vmbCts1yYQ@mail.gmail.com>
----- Original Message -----
> > We should probably handle also EBUSY, for cases when controller is already
> > part
> > of existing hierarchy. E.g. cpu,cpuacct is mounted together, and someone
> > tries to mount just cpu:
> > mount("none", "/mnt/cgroup", "cgroup", MS_MGC_VAL, "cpu") = -1 EBUSY
> > (Device or resource busy)
> >
>
> That's true.
>
> But in general, people are not permitted to use tst_cgroup*_mount()
> directly, it is only as the low-level/internal function to hide details we
> mount cgroup. My previous thought is that, in v1, cpu,cpuacct are bound
> together(as system way) in tst_croup_cpu().
They don't need to use tst_cgroup*_mount() directly, they could change their
system config and mount cpu,cpuacct,memcg together. Though chances of that
happening are low.
> > tst_cgroup_create(enum tst_cgroup_ctrl, const char *dir)
> >
>
> Maybe we can drop the second parameter "dir", the mount
> functions are internal and we just use path macros in sub-function
> which like what I did.
I wanted to keep some flexibility in case test needs multiple cgroups.
I'll have a look at v1 you posted today.
prev parent reply other threads:[~2020-05-27 7:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-22 1:23 [LTP] [PATCH RFC 1/4] lib: add new cgroup test API Li Wang
2020-05-22 1:23 ` [LTP] [PATCH RFC 2/4] mem: take use of new cgroup API Li Wang
2020-05-22 1:23 ` [LTP] [PATCH RFC 3/4] mem: remove the old " Li Wang
2020-05-22 1:23 ` [LTP] [PATCH RFC 4/4] mm: add cpuset01 to runtest file Li Wang
2020-05-26 8:27 ` [LTP] [PATCH RFC 1/4] lib: add new cgroup test API Jan Stancek
2020-05-26 10:01 ` Li Wang
2020-05-27 7:11 ` Jan Stancek [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=1731864663.13759097.1590563464850.JavaMail.zimbra@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox