All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: KVM list <kvm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Sean Christopherson <seanjc@google.com>, Willy Tarreau <w@1wt.eu>,
	Kees Cook <keescook@chromium.org>,
	syzbot+e0de2333cbf95ea473e8@syzkaller.appspotmail.com
Subject: Re: [PATCH] mm: allow huge kvmalloc() calls if they're accounted to memcg
Date: Sat, 16 Oct 2021 08:39:49 -0700	[thread overview]
Message-ID: <CAHk-=wijGo_yd7GiTMcgR+gv0ESRykwnOn+XHCEvs3xW3x6dCg@mail.gmail.com> (raw)
In-Reply-To: <20211016064302.165220-1-pbonzini@redhat.com>

On Fri, Oct 15, 2021 at 11:43 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Use memcg accounting as evidence that the crazy large allocations are
> expected---in which case, it is indeed a good idea to have them
> properly accounted---and exempt them from the warning.

This is not sensible.

The big allocation warnings are not about whether we have the memory
or not, or about whether it's accounted or not.

It's about bugs and overflows. Which we've had.

At least GFP_NOWARN would be somewhat sensible - although still wrong.
It should really be about "I've been careful with growing my
allocations", not about whether accounting or similar should be
disabled.

If the allocations really are expected to be that big, and it's
actually valid, just do vmalloc(), which doesn't warn.

                      Linus

  reply	other threads:[~2021-10-16 15:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-16  6:43 [PATCH] mm: allow huge kvmalloc() calls if they're accounted to memcg Paolo Bonzini
2021-10-16 15:39 ` Linus Torvalds [this message]
2021-10-16 17:53   ` Paolo Bonzini
2021-10-16 18:10     ` Linus Torvalds
2021-10-16 23:17       ` Paolo Bonzini
2021-10-18 15:19         ` Kees Cook
2021-10-18 15:24           ` Paolo Bonzini
2021-10-16  6:51 Paolo Bonzini
2021-10-18 15:09 ` Kees Cook

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='CAHk-=wijGo_yd7GiTMcgR+gv0ESRykwnOn+XHCEvs3xW3x6dCg@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=syzbot+e0de2333cbf95ea473e8@syzkaller.appspotmail.com \
    --cc=w@1wt.eu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.