From: Tejun Heo <tj@kernel.org>
To: Josef Bacik <josef@toxicpanda.com>
Cc: axboe@kernel.dk, kernel-team@fb.com, linux-block@vger.kernel.org,
akpm@linux-foundation.org, hannes@cmpxchg.org,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Josef Bacik <jbacik@fb.com>
Subject: Re: [PATCH 06/13] blkcg: add generic throttling mechanism
Date: Tue, 5 Jun 2018 13:45:56 -0700 [thread overview]
Message-ID: <20180605204556.GJ1351649@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <20180605132948.1664-7-josef@toxicpanda.com>
On Tue, Jun 05, 2018 at 09:29:41AM -0400, Josef Bacik wrote:
> From: Josef Bacik <jbacik@fb.com>
>
> Since IO can be issued from literally anywhere it's almost impossible to
> do throttling without having some sort of adverse effect somewhere else
> in the system because of locking or other dependencies. The best way to
> solve this is to do the throttling when we know we aren't holding any
> other kernel resources. Do this by tracking throttling in a per-blkg
> basis, and if we require throttling flag the task that it needs to check
> before it returns to user space and possibly sleep there.
>
> This is to address the case where a process is doing work that is
> generating IO that can't be throttled, whether that is directly with a
> lot of REQ_META IO, or indirectly by allocating so much memory that it
> is swamping the disk with REQ_SWAP. We can't use task_add_work as we
> don't want to induce a memory allocation in the IO path, so simply
> saving the request queue in the task and flagging it to do the
> notify_resume thing achieves the same result without the overhead of a
> memory allocation.
>
> Signed-off-by: Josef Bacik <jbacik@fb.com>
Acked-by: Tejun Heo <tj@kernel.org>
--
tejun
next prev parent reply other threads:[~2018-06-05 20:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 13:29 [PATCH 00/13][V2] Introduce io.latency io controller for cgroups Josef Bacik
2018-06-05 13:29 ` [PATCH 01/13] block: add bi_blkg to the bio " Josef Bacik
2018-06-05 13:29 ` [PATCH 02/13] block: introduce bio_issue_as_root_blkg Josef Bacik
2018-06-05 13:29 ` [PATCH 03/13] blk-cgroup: allow controllers to output their own stats Josef Bacik
2018-06-05 13:29 ` [PATCH 04/13] blk: introduce REQ_SWAP Josef Bacik
2018-06-05 13:29 ` [PATCH 05/13] swap,blkcg: issue swap io with the appropriate context Josef Bacik
2018-06-05 19:41 ` Tejun Heo
2018-06-11 14:06 ` Johannes Weiner
2018-06-05 13:29 ` [PATCH 06/13] blkcg: add generic throttling mechanism Josef Bacik
2018-06-05 20:45 ` Tejun Heo [this message]
2018-06-05 13:29 ` [PATCH 07/13] memcontrol: schedule throttling if we are congested Josef Bacik
2018-06-05 20:46 ` Tejun Heo
2018-06-11 14:08 ` Johannes Weiner
2018-06-05 13:29 ` [PATCH 08/13] blk-stat: export helpers for modifying blk_rq_stat Josef Bacik
2018-06-05 13:29 ` [PATCH 09/13] blk-rq-qos: refactor out common elements of blk-wbt Josef Bacik
2018-06-05 13:29 ` [PATCH 10/13] block: remove external dependency on wbt_flags Josef Bacik
2018-06-05 13:29 ` [PATCH 11/13] rq-qos: introduce dio_bio callback Josef Bacik
2018-06-05 13:29 ` [PATCH 12/13] block: introduce blk-iolatency io controller Josef Bacik
2018-06-05 13:29 ` [PATCH 13/13] Documentation: add a doc for blk-iolatency Josef Bacik
-- strict thread matches above, loose matches on Subject: below --
2018-05-29 21:17 [PATCH 00/13] Introdue io.latency io controller for cgroups Josef Bacik
2018-05-29 21:17 ` [PATCH 06/13] blkcg: add generic throttling mechanism Josef Bacik
2018-05-30 13:11 ` Johannes Weiner
2018-05-30 16:26 ` Tejun Heo
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=20180605204556.GJ1351649@devbig577.frc2.facebook.com \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=hannes@cmpxchg.org \
--cc=jbacik@fb.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).