Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1668667

Re: attempting to format brd device results in OOM kills

From Jens Axboe <axboe@kernel.dk>
Newsgroups linux.kernel
Subject Re: attempting to format brd device results in OOM kills
Date 2017-06-19 00:30 +0200
Message-ID <tTQRH-2AF-1@gated-at.bofh.it> (permalink)
References <tTLp2-7x8-49@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: attempting to format brd device results in OOM kills Jens Axboe <axboe@kernel.dk> - 2017-06-19 00:30 +0200
  Re: attempting to format brd device results in OOM kills Jens Axboe <axboe@kernel.dk> - 2017-06-19 00:30 +0200
    Re: attempting to format brd device results in OOM kills Jeff Layton <jlayton@redhat.com> - 2017-06-19 00:50 +0200
      Re: attempting to format brd device results in OOM kills Jens Axboe <axboe@kernel.dk> - 2017-06-19 03:50 +0200

csiph-web