public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	kvm@vger.kernel.org
Subject: Re: [PATCH] kvm mmu: reduce 50% memory usage
Date: Thu, 06 May 2010 15:03:48 +0800	[thread overview]
Message-ID: <4BE269D4.9090108@cn.fujitsu.com> (raw)
In-Reply-To: <20100430154427.GA32340@amt.cnet>

Marcelo Tosatti wrote:
> On Thu, Apr 29, 2010 at 09:43:40PM +0300, Avi Kivity wrote:
>> On 04/29/2010 09:09 PM, Marcelo Tosatti wrote:
>>> You missed quadrant on 4mb large page emulation with shadow (see updated
>>> patch below).
>> Good catch.
>>
>>> Also for some reason i can't understand the assumption
>>> does not hold for large sptes with TDP, so reverted for now.
>> It's unrelated to TDP, same issue with shadow.  I think the
>> calculation is correct.  For example the 4th spte for a level=2 page
>> will yield gfn=4*512.
> 
> Under testing i see sp at level 2, with sp->gfn == 4096, mmu_set_spte
> setting index 8 to gfn 4096 (whereas kvm_mmu_page_get_gfn returns 4096 +
> 8*512).
> 
> Lai, can you please take a look at it? You should see the
> kvm_mmu_page_set_gfn BUG_ON by using -mem-path on hugetlbfs.
> 

Could you tell me how you test it? It will be better if I follow
your test steps.

I also hit the kvm_mmu_page_set_gfn BUG_ON, It is because
FNAME(fetch)() set sp->gfn wrong. The patch:
[PATCH] kvm: calculate correct gfn for small host pages which emulates large guest pages
fix it.

I can not hit kvm_mmu_page_set_gfn BUG_ON after this patch also
applied.

So could you tell me your test steps:
The host: ept/npt enabled? 64bit? testing codes in host?
The guest: OS? PAE? 32bit? 64bit? testing codes in guest?

Lai

  reply	other threads:[~2010-05-06  7:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28 11:57 [PATCH] kvm mmu: reduce 50% memory usage Lai Jiangshan
2010-04-28 13:01 ` Avi Kivity
2010-04-28 18:05 ` Marcelo Tosatti
2010-04-29 18:09 ` Marcelo Tosatti
2010-04-29 18:43   ` Avi Kivity
     [not found]     ` <4BDA3F9B.8040708@cn.fujitsu.com>
2010-04-30  7:26       ` Avi Kivity
     [not found]         ` <4BDA9AAC.6060303@cn.fujitsu.com>
2010-04-30 10:00           ` Avi Kivity
2010-04-30 15:44     ` Marcelo Tosatti
2010-05-06  7:03       ` Lai Jiangshan [this message]
2010-05-06 19:04         ` Marcelo Tosatti
2010-05-07  8:25           ` Lai Jiangshan
2010-05-07 20:14             ` Marcelo Tosatti
2010-05-26  8:48           ` [RESEND PATCH 2/3] kvm, tdp: calculate correct base gfn for non-DIR level Lai Jiangshan
2010-05-26 10:15             ` Avi Kivity

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=4BE269D4.9090108@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.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