From: Omar Sandoval <osandov@osandov.com>
To: Dennis Zhou <dennis@kernel.org>
Cc: Omar Sandoval <osandov@fb.com>, Ming Lei <ming.lei@redhat.com>,
kernel-team@fb.com, linux-block@vger.kernel.org
Subject: Re: [PATCH blktests 1/2] blktests: split out cgroup2 controller and file check
Date: Wed, 19 Dec 2018 10:34:30 -0800 [thread overview]
Message-ID: <20181219183430.GA11852@vader> (raw)
In-Reply-To: <20181212230959.69975-2-dennis@kernel.org>
On Wed, Dec 12, 2018 at 06:09:58PM -0500, Dennis Zhou wrote:
> This is a prep patch for a new test that will race blkg association and
> request_queue cleanup. As blkg association is a underlying cgroup io
> controller feature, we need the ability to check if the controller is
> available.
>
> Signed-off-by: Dennis Zhou <dennis@kernel.org>
> ---
> common/cgroup | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/common/cgroup b/common/cgroup
> index d445093..3481458 100644
> --- a/common/cgroup
> +++ b/common/cgroup
> @@ -37,19 +37,27 @@ _have_cgroup2()
> return 0
> }
>
> -_have_cgroup2_controller_file()
> +_have_cgroup2_controller()
> {
> - _have_cgroup2 || return 1
> -
> local controller="$1"
> - local file="$2"
> - local dir
> +
> + _have_cgroup2 || return 1
>
> dir="$(_cgroup2_base_dir)"
> +
> if ! grep -q "$controller" "$dir/cgroup.controllers"; then
> SKIP_REASON="no support for $controller cgroup controller; if it is enabled, you may need to boot with cgroup_no_v1=$controller"
> return 1
> fi
> +}
> +
> +_have_cgroup2_controller_file()
> +{
> + local controller="$1"
> + local file="$2"
> + local dir
> +
> + _have_cgroup_2_controller "$controller" || return 1
This should be _have_cgroup2_controller. I'll fix it when I apply it.
>
> mkdir "$dir/blktests"
> echo "+$controller" > "$dir/cgroup.subtree_control"
> --
> 2.17.1
>
next prev parent reply other threads:[~2018-12-19 18:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-12 23:09 [PATCH blktests 0/2] Add scsi-stress-remove to blktests Dennis Zhou
2018-12-12 23:09 ` [PATCH blktests 1/2] blktests: split out cgroup2 controller and file check Dennis Zhou
2018-12-19 18:34 ` Omar Sandoval [this message]
2018-12-12 23:09 ` [PATCH blktests 2/2] blktests: add Ming Lei's scsi-stress-remove Dennis Zhou
2018-12-13 1:24 ` Ming Lei
2018-12-13 18:21 ` Dennis Zhou
2018-12-13 18:28 ` [PATCH blktests v2 " Dennis Zhou
2018-12-14 0:31 ` Ming Lei
2018-12-19 22:49 ` Omar Sandoval
2018-12-19 22:57 ` Dennis Zhou
-- strict thread matches above, loose matches on Subject: below --
2018-12-20 18:18 [PATCH blktests v2 0/2] Add scsi-stress-remove to blktests Dennis Zhou
2018-12-20 18:18 ` [PATCH blktests 1/2] blktests: split out cgroup2 controller and file check Dennis Zhou
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=20181219183430.GA11852@vader \
--to=osandov@osandov.com \
--cc=dennis@kernel.org \
--cc=kernel-team@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=osandov@fb.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