From: Jens Axboe <axboe@kernel.dk>
To: Jeff Layton <jlayton@redhat.com>, Christoph Hellwig <hch@infradead.org>
Cc: Hannes Reinecke <hare@suse.de>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: attempting to format brd device results in OOM kills
Date: Sun, 18 Jun 2017 16:21:36 -0600 [thread overview]
Message-ID: <7e8cdef3-7062-0a11-63c1-e19fabcd117c@kernel.dk> (raw)
In-Reply-To: <1497803428.21567.4.camel@redhat.com>
On 06/18/2017 10:30 AM, Jeff Layton wrote:
> I've run across a regression from v4.11. If I boot a v4.12-rc1 or later
> kernel, make a large brd device and try to format it, it quickly slows
> down to a crawl and then the OOM killer kicks in.
>
> I ran a bisect and it landed here:
>
> commit f09a06a193d942a12c1a33c153388b3962222006 (HEAD, refs/bisect/bad)
> Author: Christoph Hellwig <hch@lst.de>
> Date: Wed Apr 5 19:21:16 2017 +0200
>
> brd: remove discard support
>
> It's just a in-driver reimplementation of writing zeroes to the pages,
> which fails if the discards aren't page aligned.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Hannes Reinecke <hare@suse.com>
> Signed-off-by: Jens Axboe <axboe@fb.com>
>
>
> I've been reproducing it in a VM with ~8G allocated to it:
>
> I have a modprobe.d file with this in it:
>
> options brd rd_nr=1 rd_size=1073741824
>
> I then just:
>
> # modprobe brd
> # mkfs -t ext2 /dev/ram0
>
> It keels over pretty quickly after that.
Just checked, and creating a 1TB ram disk and then running mkfs.ext2 on it
writes 16851MiB of data. I can't say I'm surprised you OOM, if you run that
in a 8G VM, as you're about 8G short.
I'm puzzled as to why the discard change would make any difference, however.
--
Jens Axboe
next prev parent reply other threads:[~2017-06-18 22:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-18 16:30 attempting to format brd device results in OOM kills Jeff Layton
2017-06-18 22:21 ` Jens Axboe [this message]
2017-06-18 22:27 ` Jens Axboe
2017-06-18 22:43 ` Jeff Layton
2017-06-19 1:42 ` Jens Axboe
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=7e8cdef3-7062-0a11-63c1-e19fabcd117c@kernel.dk \
--to=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=jlayton@redhat.com \
--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