From: Liu Bo <bo.liu@linux.alibaba.com>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>,
linux-ext4@vger.kernel.org, fengguang.wu@intel.com,
tj@kernel.org, cgroups@vger.kernel.org, gthelen@google.com,
linux-mm@kvack.org, yang.shi@linux.alibaba.com
Subject: Re: ext4 hang and per-memcg dirty throttling
Date: Wed, 12 Sep 2018 12:22:35 -0700 [thread overview]
Message-ID: <20180912192234.gsl2ikg572aigiit@US-160370MP2.local> (raw)
In-Reply-To: <20180912150717.GD8476@thunk.org>
On Wed, Sep 12, 2018 at 11:07:17AM -0400, Theodore Y. Ts'o wrote:
> On Wed, Sep 12, 2018 at 02:11:30PM +0200, Jan Kara wrote:
> >
> > Yes, I guess you're speaking about the one Chris Mason mentioned [1].
> > Essentially it's a priority inversion where jbd2 thread gets blocked behind
> > writeback done on behalf of a heavily restricted process. It actually is
> > not related to dirty throttling or anything like that. And the solution for
> > this priority inversion is to use unwritten extents for writeback
> > unconditionally as I wrote in that thread. The core of this is implemented
> > and hidden behind dioread_nolock mount option but it needs some serious
> > polishing work and testing...
> >
> > [1] https://marc.info/?l=linux-fsdevel&m=151688776319077
>
> I've actually be considering making dioread_nolock the default when
> page_size == block_size.
>
> Arguments in favor:
>
> 1) Improves AIO latency in some circumstances
> 2) Improves parallel DIO read performance
> 3) Should address the block-cg throttling priority inversion problem
>
> Arguments against:
>
> 1) Hasn't seen much usage outside of Google (where it makes a big
> difference for fast flash workloads; see (1) and (2) above)
> 2) Dioread_nolock only works when page_size == block_size; so this
> implies we would be using a different codepath depending on
> the block size.
> 3) generic/500 (dm-thin ENOSPC hitter with concurrent discards)
> fails with dioread_nolock, but not in the 4k workload
>
> Liu, can you try out mount -o dioread_nolock and see if this address
> your problem, if so, maybe this is the development cycle where we
> finally change the default.
>
I've confirmed that "mount -o dioread_nolock" fixed the hang, I can do
further testing (maybe in production environment) if that's needed.
Many thanks to both you and Jan.
thanks,
-liubo
next prev parent reply other threads:[~2018-09-12 19:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 0:10 Liu Bo
2018-09-12 12:11 ` Jan Kara
2018-09-12 15:07 ` Theodore Y. Ts'o
2018-09-12 19:22 ` Liu Bo [this message]
2018-09-12 19:19 ` Liu Bo
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=20180912192234.gsl2ikg572aigiit@US-160370MP2.local \
--to=bo.liu@linux.alibaba.com \
--cc=cgroups@vger.kernel.org \
--cc=fengguang.wu@intel.com \
--cc=gthelen@google.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tj@kernel.org \
--cc=tytso@mit.edu \
--cc=yang.shi@linux.alibaba.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