From: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
To: Mike Waychison <mikew@google.com>
Cc: Ying Han <yinghan@google.com>, Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.cz>,
Johannes Weiner <hannes@cmpxchg.org>, Mel Gorman <mel@csn.ul.ie>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Hillf Danton <dhillf@gmail.com>, Hugh Dickins <hughd@google.com>,
Dan Magenheimer <dan.magenheimer@oracle.com>,
linux-mm@kvack.org, kvm@vger.kernel.org,
Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Eric Northup <digitaleric@google.com>
Subject: Re: [PATCH] kvm: don't call mmu_shrinker w/o used_mmu_pages
Date: Sat, 21 Apr 2012 11:29:32 +0900 [thread overview]
Message-ID: <20120421112932.3e4bd031d1defc8fe7915ade@gmail.com> (raw)
In-Reply-To: <CAGTjWtB_n+40MEHaQNxZuNhQpXJNGsfeV=Rbz3C12Ar9iPkW8Q@mail.gmail.com>
On Fri, 20 Apr 2012 19:15:24 -0700
Mike Waychison <mikew@google.com> wrote:
> In our situation, we simple disable the shrinker altogether. My
> understanding is that we EPT or NPT, the amount of memory used by
> these tables is bounded by the size of guest physical memory, whereas
> with software shadowed tables, it is bounded by the addresses spaces
> in the guest. This bound makes it reasonable to not do any reclaim
> and charge it as a "system overhead tax".
IIRC, KVM's mmu_shrink is mainly for protecting the host from pathological
guest without EPT or NPT.
You can see Avi's summary: -- http://www.spinics.net/lists/kvm/msg65671.html
===
We should aim for the following:
- normal operation causes very little shrinks (some are okay)
- high pressure mostly due to kvm results in kvm being shrunk (this is a
pathological case caused by a starting a guest with a huge amount of
memory, and mapping it all to /dev/zero (or ksm), and getting the guest
the create shadow mappings for all of it)
- general high pressure is shared among other caches like dcache and icache
The cost of reestablishing an mmu page can be as high as half a
millisecond of cpu time, which is the reason I want to be conservative.
===
Thanks,
Takuya
WARNING: multiple messages have this Message-ID (diff)
From: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
To: Mike Waychison <mikew@google.com>
Cc: Ying Han <yinghan@google.com>, Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.cz>,
Johannes Weiner <hannes@cmpxchg.org>, Mel Gorman <mel@csn.ul.ie>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Hillf Danton <dhillf@gmail.com>, Hugh Dickins <hughd@google.com>,
Dan Magenheimer <dan.magenheimer@oracle.com>,
linux-mm@kvack.org, kvm@vger.kernel.org,
Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Eric Northup <digitaleric@google.com>
Subject: Re: [PATCH] kvm: don't call mmu_shrinker w/o used_mmu_pages
Date: Sat, 21 Apr 2012 11:29:32 +0900 [thread overview]
Message-ID: <20120421112932.3e4bd031d1defc8fe7915ade@gmail.com> (raw)
In-Reply-To: <CAGTjWtB_n+40MEHaQNxZuNhQpXJNGsfeV=Rbz3C12Ar9iPkW8Q@mail.gmail.com>
On Fri, 20 Apr 2012 19:15:24 -0700
Mike Waychison <mikew@google.com> wrote:
> In our situation, we simple disable the shrinker altogether. My
> understanding is that we EPT or NPT, the amount of memory used by
> these tables is bounded by the size of guest physical memory, whereas
> with software shadowed tables, it is bounded by the addresses spaces
> in the guest. This bound makes it reasonable to not do any reclaim
> and charge it as a "system overhead tax".
IIRC, KVM's mmu_shrink is mainly for protecting the host from pathological
guest without EPT or NPT.
You can see Avi's summary: -- http://www.spinics.net/lists/kvm/msg65671.html
===
We should aim for the following:
- normal operation causes very little shrinks (some are okay)
- high pressure mostly due to kvm results in kvm being shrunk (this is a
pathological case caused by a starting a guest with a huge amount of
memory, and mapping it all to /dev/zero (or ksm), and getting the guest
the create shadow mappings for all of it)
- general high pressure is shared among other caches like dcache and icache
The cost of reestablishing an mmu page can be as high as half a
millisecond of cpu time, which is the reason I want to be conservative.
===
Thanks,
Takuya
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-04-21 2:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 22:38 [PATCH] kvm: don't call mmu_shrinker w/o used_mmu_pages Ying Han
2012-04-14 11:44 ` Hillf Danton
2012-04-16 16:43 ` Ying Han
2012-04-20 22:11 ` Andrew Morton
2012-04-20 22:11 ` Andrew Morton
2012-04-20 22:53 ` Rik van Riel
2012-04-20 23:07 ` Ying Han
2012-04-21 1:56 ` Takuya Yoshikawa
2012-04-21 2:15 ` Mike Waychison
2012-04-21 2:29 ` Takuya Yoshikawa [this message]
2012-04-21 2:29 ` Takuya Yoshikawa
2012-04-21 2:48 ` Mike Waychison
2012-04-21 2:48 ` Mike Waychison
2012-04-22 9:16 ` Avi Kivity
2012-04-22 19:05 ` Eric Northup
2012-04-23 8:37 ` Avi Kivity
2012-04-22 9:04 ` Avi Kivity
2012-04-22 9:35 ` Avi Kivity
2012-04-23 16:40 ` Ying Han
2012-04-23 16:48 ` Rik van Riel
2012-04-23 16:57 ` 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=20120421112932.3e4bd031d1defc8fe7915ade@gmail.com \
--to=takuya.yoshikawa@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=dan.magenheimer@oracle.com \
--cc=dhillf@gmail.com \
--cc=digitaleric@google.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kvm@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=mhocko@suse.cz \
--cc=mikew@google.com \
--cc=mtosatti@redhat.com \
--cc=riel@redhat.com \
--cc=yinghan@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.