mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	Michal Hocko <mhocko@suse.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: Fix rmap allocation for very large memslots
Date: Fri, 28 Jan 2022 21:47:54 +0000	[thread overview]
Message-ID: <YfRkivAI2P6urdfn@google.com> (raw)
In-Reply-To: <1acaee7fa7ef7ab91e51f4417572b099caf2f400.1643405658.git.maciej.szmigiero@oracle.com>

On Fri, Jan 28, 2022, Maciej S. Szmigiero wrote:
> From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
> 
> Commit 7661809d493b ("mm: don't allow oversized kvmalloc() calls") has
> forbidden using kvmalloc() to make allocations larger than INT_MAX (2 GiB).
> 
> Unfortunately, adding a memslot exceeding 1 TiB in size will result in rmap
> code trying to make an allocation exceeding this limit.
> Besides failing this allocation, such operation will also trigger a
> WARN_ON_ONCE() added by the aforementioned commit.
> 
> Since we probably still want to use kernel slab for small rmap allocations
> let's only redirect such oversized allocations to vmalloc.
> 
> A possible alternative would be to add some kind of a __GFP_LARGE flag to
> skip the INT_MAX check behind kvmalloc(), however this will impact the
> common kernel memory allocation code, not just KVM.

Paolo has a cleaner fix for this[1][2], but it appears to have stalled out somewhere.

Paolo???

[1] https://lore.kernel.org/all/20211015165519.135670-1-pbonzini@redhat.com
[2] https://lore.kernel.org/all/20211016064302.165220-1-pbonzini@redhat.com

  reply	other threads:[~2022-01-28 21:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 21:36 Maciej S. Szmigiero
2022-01-28 21:47 ` Sean Christopherson [this message]
2022-02-10 21:00   ` Maciej S. Szmigiero

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=YfRkivAI2P6urdfn@google.com \
    --to=seanjc@google.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@maciej.szmigiero.name \
    --cc=mhocko@suse.com \
    --cc=pbonzini@redhat.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.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

Powered by JetHome