linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
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 19:53:35 +0200	[thread overview]
Message-ID: <510287f2-84ae-b1d2-13b5-22e847284588@redhat.com> (raw)
In-Reply-To: <CAHk-=wijGo_yd7GiTMcgR+gv0ESRykwnOn+XHCEvs3xW3x6dCg@mail.gmail.com>

On 16/10/21 17:39, Linus Torvalds wrote:
> 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.

Yes, I understand that...

> At least GFP_NOWARN would be somewhat sensible - although still wrong.

... and it also seemed wrong to overload GFP_NOWARN.

> 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.
Sounds good, and you'll get a pull request for that tomorrow.  Then I'll 
send via Andrew a patch to add __vcalloc, so that the accounting is 
restored.

Paolo


  reply	other threads:[~2021-10-16 17:53 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
2021-10-16 17:53   ` Paolo Bonzini [this message]
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=510287f2-84ae-b1d2-13b5-22e847284588@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=keescook@chromium.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanjc@google.com \
    --cc=syzbot+e0de2333cbf95ea473e8@syzkaller.appspotmail.com \
    --cc=torvalds@linux-foundation.org \
    --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 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).