From: Andreas Herrmann <aherrmann@suse.com>
To: Sitsofe Wheeler <sitsofe@gmail.com>
Cc: Jens Axboe <axboe@fb.com>, fio <fio@vger.kernel.org>
Subject: Re: [PATCH 3/3] cgroup: Try to use blkio.bfq.weight if blkio.weight is not available
Date: Mon, 31 Aug 2020 07:54:17 +0200 [thread overview]
Message-ID: <20200831055417.GK6041@suselix> (raw)
In-Reply-To: <CALjAwxhUcbqQoAKJQYoxeKzw+XfbAbiSe-yKSFHW85hzE0SEQw@mail.gmail.com>
On Fri, Aug 28, 2020 at 06:29:38PM +0100, Sitsofe Wheeler wrote:
> On Thu, 27 Aug 2020 at 13:26, Andreas Herrmann <aherrmann@suse.com> wrote:
> >
> > Newer kernels just provide blkio.bfq.weight for blkio contoller. Try
> > to use this attribute when legacy file is not available.
> >
> > Signed-off-by: Andreas Herrmann <aherrmann@suse.com>
> > ---
> > cgroup.c | 10 ++++++++--
> > 1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/cgroup.c b/cgroup.c
> > index 43513733..6edb5b14 100644
> > --- a/cgroup.c
> > +++ b/cgroup.c
> > @@ -218,8 +218,14 @@ int cgroup_setup(struct thread_data *td, struct flist_head *clist, struct cgroup
> > }
> > if (write_int_to_file(td, root, "blkio.weight",
> > td->o.cgroup_weight,
> > - "cgroup open weight"))
> > - goto err;
> > + "cgroup open blkio.weight")) {
> > + td_clear_error(td);
> > + log_err("Trying to use blkio.bfq.weight\n");
>
> It doesn't feel right to print an error just because you tried a
> fallback. Maybe try both and print an error if neither works?
Ok.
Most likely it's better to merge this patch into patch 2 of my second
submission.
Thanks.
> > + if (write_int_to_file(td, root, "blkio.bfq.weight",
> > + td->o.cgroup_weight,
> > + "cgroup open blkio.bfq.weight"))
> > + goto err;
> > + }
> > }
> >
> > if (!cgroup_write_pid(td, root, (*mnt)->cgroup2)) {
> > --
> > 2.28.0
> >
>
>
> --
> Sitsofe | http://sucs.org/~sits/
>
--
Regards,
Andreas
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer (HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2020-08-31 5:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 12:07 [PATCH 0/3] cgroup: Misc fixes Andreas Herrmann
2020-08-27 12:08 ` [PATCH 1/3] cgroup: Fix typo Andreas Herrmann
2020-08-27 12:12 ` [PATCH 2/3] cgroup: Fix handling when cgroup blkio and cgroup-v2 are mounted Andreas Herrmann
2020-08-27 12:15 ` [PATCH 3/3] cgroup: Try to use blkio.bfq.weight if blkio.weight is not available Andreas Herrmann
2020-08-28 17:29 ` Sitsofe Wheeler
2020-08-31 5:54 ` Andreas Herrmann [this message]
2020-08-31 7:33 ` [PATCH 0/3] cgroup: Misc fixes Andreas Herrmann
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=20200831055417.GK6041@suselix \
--to=aherrmann@suse.com \
--cc=axboe@fb.com \
--cc=fio@vger.kernel.org \
--cc=sitsofe@gmail.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