From: Alexander Graf <agraf@suse.de>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: paulus@samba.org, linuxppc-dev@lists.ozlabs.org,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest
Date: Tue, 06 May 2014 18:18:10 +0200 [thread overview]
Message-ID: <53690B42.1090707@suse.de> (raw)
In-Reply-To: <87ha52ritd.fsf@linux.vnet.ibm.com>
On 05/06/2014 06:08 PM, Aneesh Kumar K.V wrote:
> Alexander Graf <agraf@suse.de> writes:
>
>> On 05/06/2014 05:06 PM, Aneesh Kumar K.V wrote:
>>> Alexander Graf <agraf@suse.de> writes:
>>>
>>>> On 05/06/2014 11:26 AM, Benjamin Herrenschmidt wrote:
>>>>> On Tue, 2014-05-06 at 11:12 +0200, Alexander Graf wrote:
>>>>>
>>> .....
>>>
>>>
>>> I updated the commit message as below. Let me know if this is ok.
>>>
>>> KVM: PPC: BOOK3S: HV: THP support for guest
>> This has nothing to do with THP.
> THP support in guest depend on KVM advertising MPSS feature. We already
> have rest of the changes needed to support transparent huge pages
> upstream. (We do support THP with PowerVM LPAR already). The primary
> motivation of this patch is to enable THP in powerkvm guest.
But KVM doesn't care. KVM cares about MPSS. It's like saying "Support
fork()" in a subject line while your patch implements page faults.
>
>>>
>>> On recent IBM Power CPUs, while the hashed page table is looked up using
>>> the page size from the segmentation hardware (i.e. the SLB), it is
>>> possible to have the HPT entry indicate a larger page size. Thus for
>>> example it is possible to put a 16MB page in a 64kB segment, but since
>>> the hash lookup is done using a 64kB page size, it may be necessary to
>>> put multiple entries in the HPT for a single 16MB page. This
>>> capability is called mixed page-size segment (MPSS). With MPSS,
>>> there are two relevant page sizes: the base page size, which is the
>>> size used in searching the HPT, and the actual page size, which is the
>>> size indicated in the HPT entry. [ Note that the actual page size is
>>> always >= base page size ].
>>>
>>> We advertise MPSS feature to guest only if the host CPU supports the
>>> same. We use "ibm,segment-page-sizes" device tree node to advertise
>>> the MPSS support. The penc encoding indicate whether we support
>>> a specific combination of base page size and actual page size
>>> in the same segment. It is also the value used in the L|LP encoding
>>> of HPTE entry.
>>>
>>> In-order to support MPSS in guest, KVM need to handle the below details
>>> * advertise MPSS via ibm,segment-page-sizes
>>> * Decode the base and actual page size correctly from the HPTE entry
>>> so that we know what we are dealing with in H_ENTER and and can do
>> Which code path exactly changes for H_ENTER?
> There is no real code path changes. Any code path that use
> hpte_page_size() is impacted. We return actual page size there.
Ah, I see :).
>
>>> the appropriate TLB invalidation in H_REMOVE and evictions.
>> Apart from the grammar (which is pretty broken for the part that is not
>> copied from Paul) and the subject line this sounds quite reasonable.
>>
> Wll try to fix.
Awesome. Thanks a lot!
Alex
next prev parent reply other threads:[~2014-05-06 16:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-04 17:30 [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest Aneesh Kumar K.V
2014-05-04 17:36 ` Aneesh Kumar K.V
2014-05-05 11:38 ` Alexander Graf
2014-05-05 14:47 ` Aneesh Kumar K.V
2014-05-06 4:20 ` Paul Mackerras
2014-05-06 14:25 ` Aneesh Kumar K.V
2014-05-06 9:12 ` Alexander Graf
2014-05-06 9:26 ` Benjamin Herrenschmidt
2014-05-06 9:39 ` Alexander Graf
2014-05-06 15:06 ` Aneesh Kumar K.V
2014-05-06 15:23 ` Alexander Graf
2014-05-06 16:08 ` Aneesh Kumar K.V
2014-05-06 16:18 ` Alexander Graf [this message]
2014-05-06 20:35 ` Benjamin Herrenschmidt
2014-05-06 14:23 ` Aneesh Kumar K.V
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=53690B42.1090707@suse.de \
--to=agraf@suse.de \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/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).