Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753396AbdFSBma (ORCPT ); Sun, 18 Jun 2017 21:42:30 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:34811 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753236AbdFSBm1 (ORCPT ); Sun, 18 Jun 2017 21:42:27 -0400 Subject: Re: attempting to format brd device results in OOM kills To: Jeff Layton , Christoph Hellwig Cc: Hannes Reinecke , LKML References: <1497803428.21567.4.camel@redhat.com> <7e8cdef3-7062-0a11-63c1-e19fabcd117c@kernel.dk> <1497825821.21567.6.camel@redhat.com> From: Jens Axboe Message-ID: <40b16be0-da8a-2043-630f-6113c9597326@kernel.dk> Date: Sun, 18 Jun 2017 19:42:23 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <1497825821.21567.6.camel@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1221 Lines: 31 On 06/18/2017 04:43 PM, Jeff Layton wrote: >>> 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. >> >> Reverted the patch, and I see identical behavior. The only difference is that >> the whole device is trimmed first, as expected. But it still writes ~16G >> afterwards. >> >> Are you sure this commit is what broke things for you? Honestly, I don't see >> how it could ever work with 1TB ram disk, 8G of RAM, and 16G of data written. >> > > My mistake! My brd rd_size parameter was too large by a factor of 1024 > (I missed that it was in kbytes and not bytes). With it sanely sized to > 1G (as I had actually intended), it works fine. > > It's interesting that the older kernel survives this and the newer one > doesn't, but since it's such a pathological setup I'm not too worried > about it. Beats me, I don't see how anything could make a 16G ram disk work on an 8G setup? If the above has any change in behavior, I'd be inclined to point at vm changes. Puzzled! -- Jens Axboe