linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Nicolas Boichat <drinkcat@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Kees Cook <keescook@chromium.org>, Petr Mladek <pmladek@suse.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Joe Lawrence <joe.lawrence@redhat.com>,
	Uladzislau Rezki <urezki@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Matthias Kaehlcke <mka@chromium.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Manoj Gupta <manojgupta@google.com>
Subject: Re: [PATCH] kmemleak: Increase maximum early log entries to 1000000
Date: Tue, 23 Jul 2019 15:17:33 -0700	[thread overview]
Message-ID: <CAD=FV=Wse7tGi-RP5Rq1314AdLqMS3JNy6a-gFbmVZuroSWozw@mail.gmail.com> (raw)
In-Reply-To: <CACT4Y+YkjCpEdH0rvgp8b1hqAWfo66FY76qhn1xj_yNAER-XoQ@mail.gmail.com>

Hi,

On Tue, Jul 23, 2019 at 1:21 AM Dmitry Vyukov <dvyukov@google.com> wrote:
>
> On Tue, Jul 23, 2019 at 10:13 AM Nicolas Boichat <drinkcat@chromium.org> wrote:
> >
> > On Tue, Jul 23, 2019 at 3:46 PM Dmitry Vyukov <dvyukov@google.com> wrote:
> > >
> > > On Tue, Jul 23, 2019 at 9:26 AM Nicolas Boichat <drinkcat@chromium.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?

-Doug

  reply	other threads:[~2019-07-23 22:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23  7:26 [PATCH] kmemleak: Increase maximum early log entries to 1000000 Nicolas Boichat
2019-07-23  7:46 ` Dmitry Vyukov
2019-07-23  8:13   ` Nicolas Boichat
2019-07-23  8:21     ` Dmitry Vyukov
2019-07-23 22:17       ` Doug Anderson [this message]
2019-07-24  7:10         ` Dmitry Vyukov
2019-07-24  9:00     ` Andrey Ryabinin
2019-07-30 15:22       ` Nicolas Boichat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD=FV=Wse7tGi-RP5Rq1314AdLqMS3JNy6a-gFbmVZuroSWozw@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=catalin.marinas@arm.com \
    --cc=drinkcat@chromium.org \
    --cc=dvyukov@google.com \
    --cc=joe.lawrence@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manojgupta@google.com \
    --cc=mka@chromium.org \
    --cc=ndesaulniers@google.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=pmladek@suse.com \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    --cc=urezki@gmail.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).