All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: David Matlack <dmatlack@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Fuad Tabba <tabba@google.com>,  Peter Gonda <pgonda@google.com>,
	Ackerley Tng <ackerleytng@google.com>,
	 Chao Peng <chao.p.peng@linux.intel.com>,
	Vishal Annapurve <vannapurve@google.com>,
	 Michael Roth <michael.roth@amd.com>,
	Andrew Jones <ajones@ventanamicro.com>,
	kvm@vger.kernel.org,  nrb@linux.ibm.com
Subject: Re: [PATCH] KVM: selftests: Create memslot 0 at GPA 0x100000000 on x86_64
Date: Fri, 15 Mar 2024 10:25:42 -0700	[thread overview]
Message-ID: <ZfSEliJnY5u7y5uT@google.com> (raw)
In-Reply-To: <CALzav=cLRJOtCyY+DVRWBxBMaV5S8Cy9bBKxmfdUhGLwS0+_6A@mail.gmail.com>

On Fri, Mar 15, 2024, David Matlack wrote:
> On Thu, Mar 14, 2024 at 4:14 PM Sean Christopherson <seanjc@google.com> wrote:
> > > >   5. Use separate memslots for CODE, DATA, and PT by default.  This will allow
> > > >      for more precise sizing of the CODE and DATA slots.
> > >
> > > What do you mean by "[separate memslots] will allow for more precise sizing"?
> >
> > I suspect there is a _lot_ of slop in the arbitrary 512 pages that are tacked on
> > by vm_nr_pages_required().  Those 2MiBs probably don't matter, I just don't like
> > completely magical numbers.
> 
> That makes sense, we can probably tighten up those heuristics and
> maybe even get rid of the magic numbers. But I wasn't following what
> _separate memslots_ has to do with it?

Ah, don't dwell on that too much, it was somewhat of a passing thought.

My thinking was that the gorilla math for the page tables makes it hard to determine
how much of those 512 pages is actually for DATA, versus how much is actually a
weird recursive calculation for the page tables themselves.  I.e. it's hard to
trim down @nr_pages, because it might no be easy to tell if DATA shrank too much,
or if it actually caused to PT to shrink too much, and so no one touches that mess.

  reply	other threads:[~2024-03-15 17:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07 19:42 [PATCH] KVM: selftests: Create memslot 0 at GPA 0x100000000 on x86_64 David Matlack
2024-03-07 22:37 ` Sean Christopherson
2024-03-07 23:27   ` David Matlack
2024-03-07 23:53     ` David Matlack
2024-03-13 14:31       ` Sean Christopherson
2024-03-14 21:11         ` David Matlack
2024-03-14 23:14           ` Sean Christopherson
2024-03-15 16:16             ` David Matlack
2024-03-15 17:25               ` Sean Christopherson [this message]
2024-04-08 13:47           ` Nico Boehr

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=ZfSEliJnY5u7y5uT@google.com \
    --to=seanjc@google.com \
    --cc=ackerleytng@google.com \
    --cc=ajones@ventanamicro.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=michael.roth@amd.com \
    --cc=nrb@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=pgonda@google.com \
    --cc=tabba@google.com \
    --cc=vannapurve@google.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 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.