linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: 张本龙 <zbl.lkml@gmail.com>
Cc: Shaohua Li <shli@kernel.org>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH V2] xfs: implement cgroup writeback support
Date: Mon, 26 Mar 2018 08:59:04 +1100	[thread overview]
Message-ID: <20180325215904.GH18129@dastard> (raw)
In-Reply-To: <CAJDdQW29Vjs9=PqREJZa_xHyA33Qdjf6NN95yGyan3ENwDfGZw@mail.gmail.com>

On Fri, Mar 23, 2018 at 10:24:03PM +0800, 张本龙 wrote:
> Hi Shaohua and XFS,
> 
> May I ask how are we gonna handle REQ_META issued from XFS? As you
> mentioned about charging to root cgroup (also in an earlier email
> discussion), and seems the 4.16.0-rc6 code is not handling it
> separately.
> 
> In our case to support XFS cgroup writeback control, which was ported
> and slightly adapted to 3.10.0, ignoring xfs log bios resulted in
> trouble. Threads from throttled docker might submit_bio in following
> path by its own identity, this docker blkcg accumulated large amounts
> of data (e.g., 20GB), thus such log gets blocked.

And thus displaying the reason why I originally refused to merge
this code until regression tests were added to fstests to exercise
these sorts of issues. This stuff adds new internal filesystem IO
ordering constraints, so we need tests that exercise it and ensure
we don't accidentally break it in future.


> Not familiar with XFS, but seems log bios are partially stuck in
> throttled cgroups, leaving other innocent groups waiting for
> completion. To cope with this we bypassed REQ_META log bios in
> blk_throtl_bio().

Yup, the log is global and should not be throttled. Metadata is less
obvious as to what the correct thing to do is, because writes are
always done from internal kernel threads but reads are done from a
mix of kernel threads, user cgroup contexts and user data IO
completions. Hence there are situations where metadata reads may
need to be throttled because they are cgroup context only (e.g.
filesystem directory traversal) but others where reads should not
be throttled because they have global context (e.g. inside a
transaction when other buffers are already locked).

Getting this right and keeping it working requires regression tests
that get run on every release, whether it be upstream or distro
kernels, and that means we need tests in fstests to cover cgroup IO
control....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2018-03-25 21:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22 21:11 [PATCH V2] xfs: implement cgroup writeback support Shaohua Li
2018-03-23 14:00 ` Chris Mason
2018-03-23 14:24 ` 张本龙
2018-03-25 21:59   ` Dave Chinner [this message]
2018-03-26 16:28     ` Brian Foster
2018-03-27  0:55       ` Shaohua Li
2018-03-27 11:36         ` Brian Foster
2018-03-27 21:56           ` Dave Chinner
2018-03-28 11:32             ` Brian Foster
2018-03-28 22:35               ` Dave Chinner
2018-03-28  4:37           ` 张本龙
2018-03-28 11:24             ` Brian Foster
     [not found]       ` <CAJDdQW3gOa8ry_XVkcCMf2QT7wC7MvU4b94hMhwJsg9MjYoKgQ@mail.gmail.com>
2018-03-27 11:50         ` Brian Foster
2018-03-28  9:55           ` 张本龙
2018-03-23 14:37 ` Brian Foster
  -- strict thread matches above, loose matches on Subject: below --
2017-10-15  5:07 Shaohua Li
2017-10-15 22:22 ` Dave Chinner
2017-10-16  3:35   ` Shaohua Li
2017-10-16  6:22     ` Dave Chinner
2017-10-18  5:18       ` Shaohua Li
2017-10-19  7:35 ` Christoph Hellwig

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=20180325215904.GH18129@dastard \
    --to=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=shli@kernel.org \
    --cc=zbl.lkml@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;
as well as URLs for NNTP newsgroup(s).