From: Andrea Righi <andrea.righi@canonical.com>
To: Josef Bacik <josef@toxicpanda.com>
Cc: Tejun Heo <tj@kernel.org>, Li Zefan <lizefan@huawei.com>,
Paolo Valente <paolo.valente@linaro.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Jens Axboe <axboe@kernel.dk>, Vivek Goyal <vgoyal@redhat.com>,
Dennis Zhou <dennis@kernel.org>,
cgroups@vger.kernel.org, linux-block@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/3] blkcg: sync() isolation
Date: Fri, 8 Mar 2019 18:32:15 +0100 [thread overview]
Message-ID: <20190308173215.GA10148@xps-13> (raw)
In-Reply-To: <20190308172219.clcu6ehjav6y2hxi@MacBook-Pro-91.local>
On Fri, Mar 08, 2019 at 12:22:20PM -0500, Josef Bacik wrote:
> On Thu, Mar 07, 2019 at 07:08:31PM +0100, Andrea Righi wrote:
> > = Problem =
> >
> > When sync() is executed from a high-priority cgroup, the process is forced to
> > wait the completion of the entire outstanding writeback I/O, even the I/O that
> > was originally generated by low-priority cgroups potentially.
> >
> > This may cause massive latencies to random processes (even those running in the
> > root cgroup) that shouldn't be I/O-throttled at all, similarly to a classic
> > priority inversion problem.
> >
> > This topic has been previously discussed here:
> > https://patchwork.kernel.org/patch/10804489/
> >
>
> Sorry to move the goal posts on you again Andrea, but Tejun and I talked about
> this some more offline.
>
> We don't want cgroup to become the arbiter of correctness/behavior here. We
> just want it to be isolating things.
>
> For you that means you can drop the per-cgroup flag stuff, and only do the
> priority boosting for multiple sync(2) waiters. That is a real priority
> inversion that needs to be fixed. io.latency and io.max are capable of noticing
> that a low priority group is going above their configured limits and putting
> pressure elsewhere accordingly.
Alright, so IIUC that means we just need patch 1/3 for now (with the
per-bdi lock instead of the global lock). If that's the case I'll focus
at that patch then.
>
> Tejun said he'd rather see the sync(2) isolation be done at the namespace level.
> That way if you have fs namespacing you are already isolated to your namespace.
> If you feel like tackling that then hooray, but that's a separate dragon to slay
> so don't feel like you have to right now.
Makes sense. I can take a look and see what I can do after posting the
new patch with the priority inversion fix only.
>
> This way we keep cgroup doing its job, controlling resources. Then we allow
> namespacing to do its thing, isolating resources. Thanks,
>
> Josef
Looks like a good plan to me. Thanks for the update.
-Andrea
prev parent reply other threads:[~2019-03-08 17:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-07 18:08 [PATCH v2 0/3] blkcg: sync() isolation Andrea Righi
2019-03-07 18:08 ` [PATCH v2 1/3] blkcg: prevent priority inversion problem during sync() Andrea Righi
2019-03-07 22:10 ` Josef Bacik
2019-03-08 7:38 ` Andrea Righi
2019-03-07 18:08 ` [PATCH v2 2/3] blkcg: introduce io.sync_isolation Andrea Righi
2019-03-07 22:11 ` Josef Bacik
2019-03-07 18:08 ` [PATCH v2 3/3] blkcg: implement sync() isolation Andrea Righi
2019-03-07 22:07 ` Josef Bacik
2019-03-08 7:39 ` Andrea Righi
2019-03-08 17:22 ` [PATCH v2 0/3] blkcg: " Josef Bacik
2019-03-08 17:32 ` Andrea Righi [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=20190308173215.GA10148@xps-13 \
--to=andrea.righi@canonical.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=dennis@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan@huawei.com \
--cc=paolo.valente@linaro.org \
--cc=tj@kernel.org \
--cc=vgoyal@redhat.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 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.