[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+a2REA5quUgOLr50LV7KGCvwBQMy77kk2aVPAPr4R+Y7w@mail.gmail.com>
Date: Wed, 24 Jul 2019 09:10:20 +0200
From: Dmitry Vyukov <dvyukov@...gle.com>
To: Doug Anderson <dianders@...omium.org>
Cc: Nicolas Boichat <drinkcat@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Kees Cook <keescook@...omium.org>,
Petr Mladek <pmladek@...e.com>,
Thomas Gleixner <tglx@...utronix.de>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Joe Lawrence <joe.lawrence@...hat.com>,
Uladzislau Rezki <urezki@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
LKML <linux-kernel@...r.kernel.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Catalin Marinas <catalin.marinas@....com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Matthias Kaehlcke <mka@...omium.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Manoj Gupta <manojgupta@...gle.com>
Subject: Re: [PATCH] kmemleak: Increase maximum early log entries to 1000000
On Wed, Jul 24, 2019 at 12:17 AM Doug Anderson <dianders@...omium.org> wrote:
>
> Hi,
>
> On Tue, Jul 23, 2019 at 1:21 AM Dmitry Vyukov <dvyukov@...gle.com> wrote:
> >
> > On Tue, Jul 23, 2019 at 10:13 AM Nicolas Boichat <drinkcat@...omium.org> wrote:
> > >
> > > On Tue, Jul 23, 2019 at 3:46 PM Dmitry Vyukov <dvyukov@...gle.com> wrote:
> > > >
> > > > On Tue, Jul 23, 2019 at 9:26 AM Nicolas Boichat <drinkcat@...omium.org> wrote:
> > > > >
> > > > > When KASan is enabled, a lot of memory is allocated early on,
> > > > > and kmemleak complains (this is on a 4GB RAM system):
> > > > > kmemleak: Early log buffer exceeded (129846), please increase
> > > > > DEBUG_KMEMLEAK_EARLY_LOG_SIZE
> > > > >
> > > > > Let's increase the upper limit to 1M entry. That would take up
> > > > > 160MB of RAM at init (each early_log entry is 160 bytes), but
> > > > > the memory would later be freed (early_log is __initdata).
> > > >
> > > > Interesting. Is it on an arm64 system?
> > >
> > > Yes arm64. And this is chromiumos-4.19 tree. I didn't try to track
> > > down where these allocations come from...
> >
> > So perhaps it's due to arm64, or you have even more configs, or maybe
> > running on real hardware. But I guess it's fine as is, just wondered
> > why such a radical difference. Thanks.
>
> If I had to guess I'd guess gcc vs. clang. I think we've noticed a
> few places where clang+kasan produces much bloatier code than
> gcc+kasan. Oh look, I just invented a new word: bloatier. :-P
>
> ...could you try building with gcc and see if that explains the problems?
Just in case, there is no problem per se. There is just a difference :)
Whom have you asked? We use gcc with KEMEMLEAK atm. But compiler
should not affect number of kernel heap allocations.
Powered by blists - more mailing lists