Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2204705imu; Sat, 10 Nov 2018 09:42:50 -0800 (PST) X-Google-Smtp-Source: AJdET5cAL5HnOxPD0l9hTLE0aNUdTqgYM96vguEsB6v3VFUCVacp76eY+0ESvHhVN6jL+rbrpeMg X-Received: by 2002:a17:902:396a:: with SMTP id e39-v6mr10079755plg.65.1541871770664; Sat, 10 Nov 2018 09:42:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541871770; cv=none; d=google.com; s=arc-20160816; b=iwgdPloxKGru28H35NorVKQZ4v91WHB4ycejyFPHKBpkPfc2BSwelV/o1c+DaN4kNG 7UiOadDrwVAS+dIh6fHgmze5S7TxGdOlD0PMdr2P7KZVO0zEowBpgEdebuxcOx4TkMpB Hn8Bh9Z2/yXuXdkExO7xKhnNOPaIKJ2DwexkS9dKbNXHF9erMHbXihlq2iAHEfiPZd6D WqETChLzvH+jsTukK9BXv4QyJGxgkXBd4kZ0VmLIakZP2VF00G9fSp8PGC9DkNroflj/ d02gqYpHF96SvtX8aQ230dPAS4zAYwlFHdA+sdeD70owaNWwoxPCJnroH9t6JPy5wPH4 SFSQ== 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=QF8Psn2GG7DyaEyJwJMp5aAozL/XQtQKcqRxxRPFQtA=; b=npJfdbEX6/PW9CpkphYtRABD+V4cYFVABtKc1Zua3MoNlMOY8fFzV1blx9v51QDzUA i3YMlsSRh77WSK5fJGDo5vWfS1tqXDCaExK0XlUMxzvzGXm4t254410SaSD5naXkpKak 7al/wknwH8Zu586oEeAWMTXcWtwyR0E/e8RJTbzppsfeCcYXHpULK6PBe/9RHvBcsYds ibHr0Ps8kQ1q39Me4XqrdM3QqFhlfZDUzDAPjwz3hE0uv0t1njD4gifdL8Pv1dSyXzRJ TJLXPUJ/B3GZBMuDRdeD1Iz4wT1hZ8pQgTaUWC64UIAee8hvbfOiXBYOhN13fkObKjBp qQpw== 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 d69si10665160pga.184.2018.11.10.09.42.34; Sat, 10 Nov 2018 09:42:50 -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 S1726718AbeKKD2C (ORCPT + 99 others); Sat, 10 Nov 2018 22:28:02 -0500 Received: from mout.gmx.net ([212.227.17.22]:43545 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726244AbeKKD2B (ORCPT ); Sat, 10 Nov 2018 22:28:01 -0500 Received: from [74.104.183.64] ([74.104.183.64]) by msvc-mesg-gmx021.server.lan (via HTTP); Sat, 10 Nov 2018 18:42:12 +0100 MIME-Version: 1.0 Message-ID: From: "Qian Cai" To: "Catalin Marinas" Cc: "open list" , linux-mm@kvack.org Subject: Re: kmemleak: Early log buffer exceeded (525980) during boot Content-Type: text/plain; charset=UTF-8 Date: Sat, 10 Nov 2018 18:42:12 +0100 In-Reply-To: <20181110165938.lbt6dfamk2ljafcv@localhost> References: <1541712198.12945.12.camel@gmx.us> <20181110165938.lbt6dfamk2ljafcv@localhost> X-Provags-ID: V03:K1:a/ITToIz1siVpz6C4OHsosXAoElTdUiLnpegM2s5P90vJaNITEFZwfS7aKmvF1zPVpa7H KPozHNcebPBKgXo925fy5fuSD1yrlaqGBgZDUJVcZ0kdIgEpULIf0P0HNWbzrMI3ZrqdUjsVUC2G H6tUiu8kZgafpPx1/xJVzMErKNwZcI/bO4kONzm+9Ai9+WTDEUh/wKnDh4rdeceFgzmTjMwYWaHK 6/ExTJaTN92KCxCJzO+8xAPJMU/DZEjjMpL8PBo7FU710cGUitMeSuG2q7YZi0hqUggAUkHQRIX7 y153rr/lXVeFiMuK0rsWZNF X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:RzBKsLZG3S8=:E2jnOtwI07SXi5reBwmCY+ jfoMwuDsjpsPb3ZuTAWMRXXgaShKDisSAe5WyAnoPn6dd3hyrFH2iTrTA8/1iDOXEsRUakbCO xH0wcUd5hHzpsZJR6b31fuvHjcYqDznNPwud2B7v676gMijrQHYHVap+Lm/4FyojZUl4dpQgE uVjX8LdHPQnHuEFV1NhoAPUqZ2ynrtBe4lAyWEWDZJdC8w9ATTuoQztAQkN/f5/yoAElTf9Yl fp/fgMZTXKx1IzbH/jMuwQc8vY3Kz6ld2YwlCbC7dN9tT1yfUu7534i3W1VaMkpn2zlQS3Z9T LMbD7J9VPzUG6iHuObGKOudVgHzyv4sYtyEuJ+PK2nyOUf+kcXJVnyqyZc2GagT1yTXcCqcKy 6nkZLtlN6LmwUOuAbgpiFRiJCZeFqUTEuNXYnyHJBhKWhTVMGUwnjbSmK5MqEhsGExiCMOADo yeFsiNiDpSvMN3RJLK3rikZaTNVnWqMlDTOIUVJVYiClqxdJ9DcfvSwbMLqFMfXT03F7YkIWH 5FbhNUdysDzjOAc8xvOyZyMkZZL2TuZHJltoYSXNaXatrfcea82p/tUdC/qfnFO+2bFazfDco 3c9r/BXBW8gkOu3I+uSXQXiehHviJuqvhj Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/10/18 at 11:59 AM, Catalin Marinas wrote: > On Sat, Nov 10, 2018 at 10:08:10AM -0500, Qian Cai wrote: > > On Nov 8, 2018, at 4:23 PM, Qian Cai wrote: > > > The maximum value for DEBUG_KMEMLEAK_EARLY_LOG_SIZE is only 40000, so it > > > disables kmemleak every time on this aarch64 server running the latest mainline > > > (b00d209). > > > > > > # echo scan > /sys/kernel/debug/kmemleak > > > -bash: echo: write error: Device or resource busy > > > > > > Any idea on how to enable kmemleak there? > > > > I have managed to hard-code DEBUG_KMEMLEAK_EARLY_LOG_SIZE to 600000, > > That's quite a high number, I wouldn't have thought it is needed. > Basically the early log buffer is only used until the slub allocator > gets initialised and kmemleak_init() is called from start_kernel(). I > don't know what allocates that much memory so early. > > What else is in your .config? https://c.gmx.com/@642631272677512867/tqD5eulbQAC-1h-fkVe1Iw Does the dmesg helps? https://paste.ubuntu.com/p/BnhvXXhn7k/ > > > diff --git a/mm/kmemleak.c b/mm/kmemleak.c > > index 877de4fa0720..c10119102c10 100644 > > --- a/mm/kmemleak.c > > +++ b/mm/kmemleak.c > > @@ -280,7 +280,7 @@ struct early_log { > > > > /* early logging buffer and current position */ > > static struct early_log > > - early_log[CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE] __initdata; > > + early_log[600000] __initdata; > > You don't need to patch the kernel, the config variable is there to be > changed. Right, but the maximum is only 40000 in kconfig, so anything bigger than that will be rejected.