public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf-l3A5Bk7waGM@public.gmane.org>
To: Avi Kivity <avi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	KVM list <kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linuxppc-dev
	<linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: [PATCH] KVM: PPC: Add generic hpte management functions
Date: Mon, 28 Jun 2010 15:32:53 +0200	[thread overview]
Message-ID: <4C28A485.1050403@suse.de> (raw)
In-Reply-To: <4C28A409.9090207-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Avi Kivity wrote:
> On 06/28/2010 04:25 PM, Alexander Graf wrote:
>>>
>>>>> Less and simpler code, better reporting through slabtop, less wastage
>>>>> of partially allocated slab pages.
>>>>>
>>>>>          
>>>> But it also means that one VM can spill the global slab cache and kill
>>>> another VM's mm performance, no?
>>>>
>>>>        
>>> What do you mean by spill?
>>>      
>
>
> Well?

I was thinking of a global capping, but I guess I could still do it
per-vcpu. So yes, doing a global slab doesn't hurt.

>
>>> btw, in the midst of the nit-picking frenzy I forgot to ask how the
>>> individual hash chain lengths as well as the per-vm allocation were
>>> limited.
>>>
>>> On x86 we have a per-vm limit and we allow the mm shrinker to reduce
>>> shadow mmu data structures dynamically.
>>>
>>>      
>> Very simple. I keep an int with the number of allocated entries around
>> and if that hits a define'd threshold, I flush all shadow pages.
>>    
>
> A truly nefarious guest will make all ptes hash to the same chain,
> making some operations very long (O(n^2) in the x86 mmu, don't know
> about ppc) under a spinlock.  So we had to limit hash chains, not just
> the number of entries.
>
> But your mmu is per-cpu, no?  In that case, no spinlock, and any
> damage the guest does is limited to itself.

Yes, it is. No locking. The vcpu can kill its own performance, but I
don't care about that.


Alex

  parent reply	other threads:[~2010-06-28 13:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25 23:16 [PATCH] Faster MMU lookups for Book3s Alexander Graf
2010-06-25 23:16 ` [PATCH] KVM: PPC: Add generic hpte management functions Alexander Graf
2010-06-25 23:18   ` Alexander Graf
     [not found]   ` <1277507817-626-2-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-06-28  8:28     ` Avi Kivity
     [not found]       ` <4C285D1C.5060508-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-28  8:55         ` Alexander Graf
     [not found]           ` <20417D40-9345-485B-9201-8B3722B7457F-l3A5Bk7waGM@public.gmane.org>
2010-06-28  9:12             ` Avi Kivity
     [not found]               ` <4C286770.6010204-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-28  9:27                 ` Alexander Graf
2010-06-28  9:34                   ` Avi Kivity
     [not found]                     ` <4C286C98.8060903-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-28  9:55                       ` Alexander Graf
     [not found]                         ` <4C2871A8.1060706-l3A5Bk7waGM@public.gmane.org>
2010-06-28 10:01                           ` Avi Kivity
     [not found]                             ` <4C2872F5.20501-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-28 13:25                               ` Alexander Graf
2010-06-28 13:30                                 ` Avi Kivity
     [not found]                                   ` <4C28A409.9090207-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-28 13:32                                     ` Alexander Graf [this message]
2010-06-29 12:56                 ` Alexander Graf
     [not found]                   ` <4C29ED94.6060904-l3A5Bk7waGM@public.gmane.org>
2010-06-29 13:05                     ` Avi Kivity
2010-06-29 13:06                       ` Alexander Graf
2010-06-29 13:13                         ` Avi Kivity
     [not found] ` <1277507817-626-1-git-send-email-agraf-l3A5Bk7waGM@public.gmane.org>
2010-06-25 23:16   ` [PATCH] KVM: PPC: Make use of hash based Shadow MMU Alexander Graf

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=4C28A485.1050403@suse.de \
    --to=agraf-l3a5bk7wagm@public.gmane.org \
    --cc=avi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.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