Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4014963imu; Mon, 12 Nov 2018 04:30:21 -0800 (PST) X-Google-Smtp-Source: AJdET5cKvBTAO7SUau7TIScmDOeEFmnII1+CruJ++qb4DxkGx9vHH0h3LITqlRwsRRF1UIh21bD+ X-Received: by 2002:a63:9501:: with SMTP id p1mr655114pgd.149.1542025821569; Mon, 12 Nov 2018 04:30:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542025821; cv=none; d=google.com; s=arc-20160816; b=V79Z3OQdQNm/nwawA+l2XlnX1Uu9LGtpzyx7PSs5WqtyYResjkTzXp217i2zCkB3JD J0pkIjYaPky+PQc2fY+cnYr9fNgC8klaNT3u7cJBR/Swne/sOcCK993ORXhfxppdP58I 5kuRg1dV9lEgvNvlqxmW0qJ3z+WZ3P7MaoLW6nUq6EyRbFNn1IpD9VBeeqh2s9ChflUG p12Cg3yBjUV4wVrXHnZLHChFw0ZoVzIBhJWWIqnNCSEwwnlEn9mQuGgt91l+Ss7iVmEH MSDyz/xmKNAoQ4OkdskVGTUZOk/rZHhvbfS2EdmpXPpZDnKc+gfk68k9QQDCZs3IM/oW pGsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:date:subject:cc:to :from:message-id:mime-version; bh=A0THHEz3iLrSSlSEsSFERj6vMnC1aJ6ZXQYmMf8FS8Q=; b=r3ZiCgsan8jPmz4jzJ4CKQ4zQNeIsDOpYsTQdJNbYBhC3Zt/G1kFi0W5epL3jUh6AL HUY5AEq7rHyB8p4nAaIaZgb9UESvQp2oySbyQ7RD1GKgDWYPnyDf9ngkNMdtCyWp90m4 7cqVcpfIb4fcMMlGoWJ537gjM+H8x8SCrlsEvpMknsdV+bEkAgjWoLyjxi5OCRcdzhyK LUT1kx8ZbhAPi+DlZQmsUaN6L6BYboctJUute3AcCfYwv6/kD5Y4NVhCm4lQbsoSg2cI Ioa/axVlpTXguLHPbDdCoVifAZSzFZ5HH/Y4mtn9Qepw4Ahtjqfcr80aHieTgV6Es08E 0nJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8-v6si15297010pgj.409.2018.11.12.04.30.05; Mon, 12 Nov 2018 04:30:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729540AbeKLWWe (ORCPT + 99 others); Mon, 12 Nov 2018 17:22:34 -0500 Received: from mout.gmx.net ([212.227.15.19]:46339 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729244AbeKLWWd (ORCPT ); Mon, 12 Nov 2018 17:22:33 -0500 Received: from [74.104.183.64] ([74.104.183.64]) by msvc-mesg-gmx021.server.lan (via HTTP); Mon, 12 Nov 2018 13:29:07 +0100 MIME-Version: 1.0 Message-ID: From: "Qian Cai" To: "Martin Schwidefsky" Cc: linux-mm@kvack.org, "Catalin Marinas" , "linux kernel" , "Kirill A. Shutemov" Subject: Re: crashkernel=512M is no longer working on this aarch64 server Content-Type: text/plain; charset=UTF-8 Date: Mon, 12 Nov 2018 13:29:07 +0100 In-Reply-To: <20181112070151.51ea5caf@mschwideX1> References: <1A7E2E89-34DB-41A0-BBA2-323073A7E298@gmx.us> <20181111123553.3a35a15c@mschwideX1> <77E3BE32-F509-43B3-8C5F-252416C04B7C@gmx.us> <20181112070151.51ea5caf@mschwideX1> X-Provags-ID: V03:K1:5nEyHRY7vAmmiAvbR2rI2uNlq3Qirbqd01ONwt6ClXUOx2mbE/BKe1BpOxxHQyCDdqduv uETOvSv3ZQNdYHwL056pSWQKP5imFu9UpNXxRW7/7rFth41vSf8cRmZvOpF5SJv9sCfhmEoj1RSy Mbyp9VpD6i1kXedEX7MZANJHaeGvElaxRIMQ1SNYkvA33MJLdZ3UPp4V0e0d4gsAgogIFLDNYgII FIrdcW+DcVW0//8MUBPEGCbEGcDAJjv0/VXSQj9LH8/4oT/hsE9Tg4NZMKv7BZHuIPCsY7LIy5PS OYaaeV4+Api0zGMybMRohdx X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:YVaoaq/pv8I=:OClDvjwsKDRIxP/aqswBYH Rq/Mm0/QZFiULqMjKrN5KrKR+/QkMMNAd9msqXdKZ9Er2o/H/SF3dKa6Qx6Ub5EJxs0bKj615 QXats7DGSEg4ME0ZGAaMt2MRC2RvnZwdjlyvf/UJ/HQaE5f+Dqyl1jliDvpQXyzy+V76o1G6Z 7zISANWuBASab5EuRH4lUnugHFrYfImSRh/n3PX53WtRKYEVW146PNO8z4ROHi20OMEkl7hD/ avi1c/omZtbOeTn9oZxPm8f/dxaXRfyTT654z59GMeBikpL6m1M2yOK9moJCSDLUVWpq02FBm hBQZ87Aud/BTZ1NCcSqPVrKyJueofHyWGHSsUkTUPF2taMmVNXTFotYM3z87JeDU6MJIXJGtr K/yUI0i4KojFgiw4LOQiozjrjWipracWEndxAdTSp3CnRDGPHogPcf8JWQ7lynxIsJvj3LCeM NczCE+x3kkYxdICzEP4dkqr0ez2YBK59JR5cp5PstH88HNjEfcOHyGN5v/s9IetZOD/djMsRW IQpN8RNbXWALA9U0f2WQos/5Lieupcmy4gVyWwfCL0p/ZVxa6fTBN3PbNfTQyRdPFXyaOmY3v ZVLKoPtD6NIrsfg6JsNbzPDyKKbXT94RT3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/12/18 at 1:01 AM, Martin Schwidefsky wrote: > On Sun, 11 Nov 2018 08:36:09 -0500 > Qian Cai wrote: > > > > On Nov 11, 2018, at 6:35 AM, Martin Schwidefsky wrote: > > > > > > On Sat, 10 Nov 2018 23:41:34 -0500 > > > Qian Cai wrote: > > > > > >> It was broken somewhere between b00d209241ff and 3541833fd1f2. > > >> > > >> [ 0.000000] cannot allocate crashkernel (size:0x20000000) > > >> > > >> Where a good one looks like this, > > >> > > >> [ 0.000000] crashkernel reserved: 0x0000000008600000 - 0x0000000028600000 (512 MB) > > >> > > >> Some commits look more suspicious than others. > > >> > > >> mm: add mm_pxd_folded checks to pgtable_bytes accounting functions > > >> mm: introduce mm_[p4d|pud|pmd]_folded > > >> mm: make the __PAGETABLE_PxD_FOLDED defines non-empty > > > > > > The intent of these three patches is to add extra checks to the > > > pgtable_bytes accounting function. If applied incorrectly the expected > > > result would be warnings like this: > > > BUG: non-zero pgtables_bytes on freeing mm: 16384 > > > > > > The change Linus worried about affects the __PAGETABLE_PxD_FOLDED defines. > > > These defines are used with #ifdef, #ifndef, and __is_defined() for the > > > new mm_p?d_folded() macros. I can not see how this would make a difference > > > for your iomem setup. > > > > > >> # diff -u ../iomem.good.txt ../iomem.bad.txt > > >> --- ../iomem.good.txt 2018-11-10 22:28:20.092614398 -0500 > > >> +++ ../iomem.bad.txt 2018-11-10 20:39:54.930294479 -0500 > > >> @@ -1,9 +1,8 @@ > > >> 00000000-3965ffff : System RAM > > >> 00080000-018cffff : Kernel code > > >> - 018d0000-020affff : reserved > > >> - 020b0000-045affff : Kernel data > > >> - 08600000-285fffff : Crash kernel > > >> - 28730000-2d5affff : reserved > > >> + 018d0000-0762ffff : reserved > > >> + 07630000-09b2ffff : Kernel data > > >> + 231b0000-2802ffff : reserved > > >> 30ec0000-30ecffff : reserved > > >> 35660000-3965ffff : reserved > > >> 39660000-396fffff : reserved > > >> @@ -127,7 +126,7 @@ > > >> 7c5200000-7c520ffff : 0004:48:00.0 > > >> 1040000000-17fbffffff : System RAM > > >> 13fbfd0000-13fdfdffff : reserved > > >> - 16fba80000-17fbfdffff : reserved > > >> + 16fafd0000-17fbfdffff : reserved > > >> 17fbfe0000-17fbffffff : reserved > > >> 1800000000-1ffbffffff : System RAM > > >> 1bfbff0000-1bfdfeffff : reserved > > > > > > The easiest way to verify if the three commits have something to do with your > > > problem is to revert them and run your test. Can you do that please ? > > Yes, you are right. Those commits have nothing to do with the problem. I should > > realized it earlier as those are virtual memory vs physical memory. Sorry for the > > nosie. > > > > It turned out I made a wrong assumption that if kmemleak is disabled by default, > > there should be no memory reserved for kmemleak at all which is not the case. > > > > CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=600000 > > CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y > > > > Even without kmemleak=on in the kernel cmdline, it still reserve early log memory > > which causes not enough memory for crashkernel. > > > > Since there seems no way to turn kmemleak on later after boot, is there any > > reasons for the current behavior? > > Well seems like you do have CONFIG_DEBUG_KMEMLEAK=y in your config. The code > contains data structures for the case that you want to use the kmemleak checker. > The presence of these structures will change the sizes. The last commit in regard > to the 'early_log' buffer has been from 2009 with this change: > > @@ -232,8 +232,9 @@ struct early_log { > }; > > /* early logging buffer and current position */ > -static struct early_log early_log[CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE]; > -static int crt_early_log; > +static struct early_log > + early_log[CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE] __initdata; > +static int crt_early_log __initdata; > > static void kmemleak_disable(void); > > The current behavior is imho nothing new. > > Would it be possible to disable CONFIG_DEBUG_KMEMLEAK for your kdump kernel? > That seems like the simplest solution. Ah, okay. Those are static memory allocations regardless of the kmemleak runtime setting. The problem is that it has to disable kmemleak entirely and re-compile the kernel for the first-kernel as well, as crashkernel reservation happens in the first-kernel. Hence, it loses flexibility to enable kmemleak during boot time as well. I can live with it, although it does not seem ideal.