linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Matthias Dahl <ml_linux-kernel@binary-island.eu>
Cc: linux-mm@kvack.org, dm-devel@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [4.7.0rc6] Page Allocation Failures with dm-crypt
Date: Mon, 11 Jul 2016 09:30:51 -0400	[thread overview]
Message-ID: <20160711133051.GA28308@redhat.com> (raw)
In-Reply-To: <20160711131818.GA28102@redhat.com>

Inlining reply below after thinking further.

On Mon, Jul 11 2016 at  9:18am -0400,
Mike Snitzer <snitzer@redhat.com> wrote:

> On Mon, Jul 11 2016 at  4:31am -0400,
> Matthias Dahl <ml_linux-kernel@binary-island.eu> wrote:
> 
> > Hello,
> > 
> > I made a few more tests and here my observations:
> > 
> > - kernels 4.4.8 and 4.5.5 show the same behavior
> > 
> > - the moment dd starts, memory usage spikes rapidly and within a just
> >   a few seconds has filled up all 32 GiB of RAM

But that is expected given you're doing an unbounded buffered write to
the device.  What isn't expected, to me anyway, is that the mm subsystem
(or the default knobs for buffered writeback) would be so aggressive
about delaying writeback.

> > - dd w/ direct i/o works just fine

Given that directio works the unbounded buffered IO write you're doing
with dd certainly speaks to that specific area of the mm subsystem.

Why are you doing this test anyway?  Such a large buffered write doesn't
seem to accurately model any application I'm aware of (but obviously it
should still "work").

> > - mkfs.ext4 unfortunately shows the same behavior as dd w/o direct i/o
> >   and such makes creation of an ext4 fs on dm-crypt a game of luck
> > 
> >   (much more exposed so with e2fsprogs 1.43.1)

Now that is weird.  Are you (or the distro you're using) setting any mm
subsystem tunables to really broken values?

> > I am kind of puzzled that this bug has seemingly gone so long unnoticed
> > since it is rather severe and makes dm-crypt unusable to a certain
> > degree
> > for fs encryption (or at least the initial creation of the fs). Am I
> > missing something here or doing something terribly stupid?
> 
> Not clear.  Certainly haven't had any reports of memory leaks with
> dm-crypt.  Something must explain the execessive nature of your leak but
> it isn't a known issue.
> 
> Have you tried running with kmemleak enabled?

I'm now doubting this is a leak...

Mike

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2016-07-11 13:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-09 13:40 [4.7.0rc6] Page Allocation Failures with dm-crypt Matthias Dahl
2016-07-11  8:31 ` Matthias Dahl
2016-07-11 13:18   ` Mike Snitzer
2016-07-11 13:27     ` [dm-devel] " Matthias Dahl
2016-07-11 13:44       ` Mike Snitzer
2016-07-11 13:30     ` Mike Snitzer [this message]
2016-07-11 14:47       ` [dm-devel] " Matthias Dahl
2016-07-12  8:06         ` Matthias Dahl

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=20160711133051.GA28308@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ml_linux-kernel@binary-island.eu \
    /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).