From: Paolo Bonzini <pbonzini@redhat.com>
To: Steven <wangwangkang@gmail.com>, KVM <kvm@vger.kernel.org>
Subject: Re: How KVM hypervisor allocates physical pages to the VM.
Date: Wed, 17 Sep 2014 09:39:03 +0200 [thread overview]
Message-ID: <54193A97.7010401@redhat.com> (raw)
In-Reply-To: <CAMTrTqWVDs6PNMHZ+gtPvQYZmjEf0_nnwc69aP_ZW6qYgAmZ+g@mail.gmail.com>
Il 17/09/2014 05:56, Steven ha scritto:
> When size = 10MB and 20MB, it looks like that KVM use
> kmem_cache_alloc_node and kmalloc_node to allocate physical pages.
> However, when size = 40MB, KVM hypervisor uses mm_page_alloc to
> allocator physical pages. The former is based on the slab allocator,
> while the latter is directly from the buddy allocator.
>
> So what is the heuristic used by the KVM to determine when to use the
> slab allocator or directly from the buddy allocator? Or is there
> anything wrong with my trace file? Thanks in advance.
I think you're simply tracking different things. You should find the
symbols associated to the call sites.
KVM doesn't do anything special to allocate physical pages. It simply
calls get_user_pages.
Paolo
next prev parent reply other threads:[~2014-09-17 7:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 3:56 How KVM hypervisor allocates physical pages to the VM Steven
2014-09-17 7:39 ` Paolo Bonzini [this message]
[not found] ` <CAMTrTqXEYHBwJRKr=wun5tU0+XwzBsZ4LpUdEq1hcD6TEW5kTg@mail.gmail.com>
[not found] ` <5419DF81.7040905@redhat.com>
[not found] ` <CAMTrTqXR_=nphEb3XKjH0i4DHYbrwn4E+TQ_jM9dWdyepAvybA@mail.gmail.com>
[not found] ` <541AAD2B.8080405@redhat.com>
2014-09-18 20:36 ` Steven
2014-10-19 6:19 ` Steven
2014-10-19 16:26 ` Steven
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=54193A97.7010401@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=wangwangkang@gmail.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.